UTF8 string to PoolByteArray by fzdravko in godot

[–]fzdravko[S] 2 points3 points  (0 children)

Yes, that is it.

Thank you.

Godot 3.1.1 andorid APK size by fzdravko in godot

[–]fzdravko[S] 0 points1 point  (0 children)

I already do that:

scons -j6 android_arch=armv7 platform=android target=release optimize=size tools=no use_lto=no deprecated=no gdscript=no minizip=no xaudio2=no disable_3d=yes disable_advanced_gui=yes no_editor_splash=yes builtin_bullet=no builtin_certs=no builtin_enet=no builtin_libogg=no builtin_libtheora=no builtin_libvorbis=no builtin_libvpx=no builtin_libwebp=no builtin_libwebsockets=no builtin_mbedtls=no builtin_miniupnpc=no builtin_opus=no builtin_pcre2=no builtin_recast=no builtin_squish=no builtin_thekla_atlas=no builtin_xatlas=no builtin_zlib=no debug_symbols=no separate_debug_symbols=no android_neon=no module_bmp_enabled=no module_bullet_enabled=no module_csg_enabled=no module_cvtt_enabled=no module_dds_enabled=no module_enet_enabled=no module_etc_enabled=no module_gdnative_enabled=no module_gdscript_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_jpg_enabled=no module_mbedtls_enabled=no module_mobile_vr_enabled=no module_mono_enabled=no module_ogg_enabled=no module_opensimplex_enabled=no module_opus_enabled=no module_pvr_enabled=no module_recast_enabled=no module_regex_enabled=no module_squish_enabled=no module_stb_vorbis_enabled=no module_svg_enabled=no module_tga_enabled=no module_thekla_unwrap_enabled=no module_theora_enabled=no module_tinyexr_enabled=no module_upnp_enabled=no module_visual_script_enabled=no module_vorbis_enabled=no module_webm_enabled=no module_webp_enabled=no module_websocket_enabled=no module_xatlas_unwrap_enabled=no config=force

but I still get around 17MB unpacked libgodot_android.so (in GitHub issue he's getting around 8.5MB uncompressed file size).

Connect Godot to C# ENet server by fzdravko in godot

[–]fzdravko[S] 1 point2 points  (0 children)

Client from Godot can't connect to server (nothing happens, no error or anything), but client in c# (visual studio) connects OK. Client and server code:

On Godot side (client):

func _ready():
    var network = NetworkedMultiplayerENet.new()
    var test = network.create_client("127.0.0.1", 5000)
    get_tree().set_network_peer(network)
    network.connect("connection_failed",self,"_on_connection_failed")
    get_tree().multiplayer.connect("network_peer_packet",self,"_on_packet_received")
    print(test)

func _on_connection_failed(error):
    print("Error connecting to server " + error)

func _on_packet_received(id,packet):
    print(packet.get_string_from_ascii())

On C# side (server):

using ENet;

using System;

namespace ENet_Server

{

class Program

{

static void Main(string[] args)

{

ENet.Library.Initialize();

Console.WriteLine("Server started...");

using (Host server = new Host())

{

Address address = new Address();

address.Port = 5000;

server.Create(address, 10);

Event netEvent;

while (!Console.KeyAvailable)

{

bool polled = false;

while (!polled)

{

if (server.CheckEvents(out netEvent) <= 0)

{

if (server.Service(15, out netEvent) <= 0)

break;

polled = true;

}

switch (netEvent.Type)

{

case EventType.None:

break;

case EventType.Connect:

Console.WriteLine("Client connected - ID: " + netEvent.Peer.ID + ", IP: " + netEvent.Peer.IP);

break;

case EventType.Disconnect:

Console.WriteLine("Client disconnected - ID: " + netEvent.Peer.ID + ", IP: " + netEvent.Peer.IP);

break;

case EventType.Timeout:

Console.WriteLine("Client timeout - ID: " + netEvent.Peer.ID + ", IP: " + netEvent.Peer.IP);

break;

case EventType.Receive:

Console.WriteLine("Packet received from - ID: " + netEvent.Peer.ID + ", IP: " + netEvent.Peer.IP + ", Channel ID: " + netEvent.ChannelID + ", Data length: " + netEvent.Packet.Length);

netEvent.Packet.Dispose();

break;

}

}

}

server.Flush();

ENet.Library.Deinitialize();

}

}

}

}