Tank Fu

Use this forum to share and discuss Uzebox games and demos.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tank Fu

Post by uze6666 »

My bad, I didn't scroll up and see L4rry's fine video. It explains things indeed! I still think putting efforts first on the client side of thing vs the host will bring much more interesting options. :)
User avatar
danboid
Posts: 1937
Joined: Sun Jun 14, 2020 12:14 am

Re: Tank Fu

Post by danboid »

D3thAdd3r wrote: Thu Mar 30, 2023 1:12 am For Deathmatch in Tank Fu, one side will be Host by using the ESP8266 Soft AP feature to broadcast a WiFi Access Point with a specific name. The password is fixed, the other side just needs to know the name of this Soft AP/WiFi SSID to join it. The Host also fixes it's IP address, so that both sides know the other ones IP if the join works. This is great since it's the most direct connection, and it works without any external access point/router or even Internet access required.

The other side will join the Host's Soft AP, by having the user specify the SSID/name(using the known fixed password). Something like:

Code: Select all

AT+CWJAP_CUR="TFABCDEF","T4nkFuN3t"
I didn't know thats how it worked! That's so cool. It'll be great to see this working in TankFu at least.

Is there any chance you might add soft AP link support to Mega Bomber Lee, to allow for 4 players using 2 Uzeboxes in the same room or house? I will be able to test that as soon as my mate builds his Uzebox.
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tank Fu

Post by D3thAdd3r »

Yes 4 player games will be sweet! Definitely want to see it happen. Thought on this more after looking at emulation possibilities, and now it seems clear. It isn't feasible to do Soft AP in CUzeBox really. Emscripten is huge since it might bring us a lot of casual players, so this pins a lot on emulation limits in my opinion.

So I probably wont add this Soft AP feature to MB, and instead opt for the direct IP method only. It would still be possible to play 4+ player games on LAN, but it adds the requirement of a separate WiFi router all Uzebox need to connect to. I suspect this dedicated router is higher performance than ESP8266 Soft AP anyway, so it doesn't seem bad. For emulation this part just works directly through IP, regardless of the Host machine hardware, thus hardware/emulator crossplay is automatic. There is only enough "WiFi emulation" that the setup tool thinks it's a real 8266.

There could be a menu for LAN where it shows the DHCP IP on the host, and other machines need to connect to that displayed IP. To simplify it for the user, the host could instead broadcast specifically crafted packets so that clients can populate a list of local games in a menu. A lot of code space for that though. Not that hard to type in an IP.

I suspect it's actually harder to coordinate a LAN only game than an Internet one. Making a LAN game dependent on an Internet server isn't ideal, but it simplifies things. Worse would be Internet lag when all your machines are next to each other. I mean if you take the server route, it handles rooms, chat, getting a connection setup between peers, etc. If you also support LAN only, you need code to coordinate all that on Uzebox as well, parse all individual network packets, etc. since the server isn't there. It could literally be more network code than game code, which would be ridiculous and no one would add it to their games :(

To answer the question, I'm looking for a direct IP way which can utilize the server for simplicity, while allowing Internet play(with lag)alongside the ability to have a "no lag" local game still using the server to reduce game code. Also...a combination of some local and some Internet. So to me "direct IP" is a given for Internet play, but it's not the full answer for LAN. I'd like to see the ability for "lag free" LAN games, but also Internet players to join players in a LAN. This sort of makes me want to say, if you really want LAN performance but also not huge code in every game...either accept the lag, or run an Uzenet server on a Pi on the LAN.

So basically if Uzenet servers can be multiple, and cooperate, there is personal incentive for people to host them on their connection. That could potentially solve all cases and make everything work in a single way.
Post Reply