A simple online multiplayer game of guiding a penguin back to the home nest. On the way home there are all kinds of dangers and obstacles. The game has Frogger esque game mechanics. Only moving keys are needed to control the game.
Currently the game has only the "Snowballs" field where players should avoid snowballs as long as possible.
The game sources are divided to cross-platform sources and platform dependent sources. This is because I mostly develop and test the game in Windows environment. I have a separate project which runs the same cross-platform codes under windows. The SDL & SDL_Net libraries are used for game inputs and graphics and the networking. The windows SDL program "simulates" certain Spectrum Next HW features and APIs like certain HW register calls, the HW sprite system and zxnext_layer2 and zxnext_sprite libraries. I will release that as well in public once I get the codes cleaned.
All the platform dependent sources are in the "NextHw" and "Sim" subfolders. All the other sources are cross-platform.
Another division in sources are that all the generic multiplay, networking and communication related code are under the "multiplay" folder. Ideally, to make another MP game you just need to copy the "multiplay" folder to it, and there you have the MP support ready to be integrated to your code.
My setup of the development environment (in Windows):
- Z88DK, VSCode with the Dezog plugin, and the CSpect emulator.
- Two additional libraries used: zxnext_Layer2 and zxnext_sprite (those can be found in Github). Note that I have rebuilt those libraries and installed them in the Z88DK folder.
- ESP8266-USB HW dongle and the UARTReplacment plugin for CSpect used for testing on the emulator
The game server is implemented in Python and I have it running in a separate VM host provider. For security reasons I do not wnat to use my own PC to run the server. The game server itself can read a list of allowed IP addresses and player ids it can accept. The file should be in the same folder as the server. An example is in src/server/allowed_name_ip_list.txt. With this list you can make sure only your friends can attend to the game.
As usual, you should setup your server firewall to prevent any malicious attacks. Use your service provider instructions for that or look in the internet. When the server is protected, you shoud give an access to the game clients. I did it with iptables command like this:
- sudo iptables -A INPUT -p udp -s 1.2.3.4 --dport 4444 -j ACCEPT
It allows the client "1.2.3.4" (public ip) to connect to the game server in port 4444. Run that command for each player ip address but use the same port number.
Disclaimer: I am not a security expert so I will not take a responsibility of any kind about the instructions above. I have however written them to the best of my knowledge and used them in the game test session.
- The minimun core version should be 3.02.00. That has the 64 byte uart rx buffer and moreover all KS2 machines have at least that.
$0000-$3fff (MMU0&1) L2 buffer / rom
$4000-$7fff(MMU2&3)
- bank 5 (page10&11) Or:
- sprite & bitmap data: bank 20(low). Paged in during drawing to $4000.
- initialization functions: bank 21(low). Paged in during initialization to $6000.
$8184-$FD57 (MMU4&5&6&7) Program and library code and data
$FD58-$FF58 STACK
- $FF58: TAR__register_sp
- stack size: $200
- Layer2 main buffer
- bank 8
- SpecNext FB community for encouragement and attending to the test session!
- SpecNext Discord community for good professional advice for many things.
- Remy Sharp for the excellent sprite editor.