HolePuncher
HolePuncher copied to clipboard
New features, stability and function
This repo hasn't had any activity in quite a while, so not sure this will get seen, but I still find this to be a potentially useful and interesting idea. I'm trying to make a small game with this, and I've needed to update things here and there, which might be useful for someone trying to do something similar.
Things I've done:
-
2 player support
- fixed critical bugs
- restructured peer handshake to wait for all players
- Lobby system
- sessions autostarting is now a server parameter
- a new packet is sent and received for lobby peer information
- distinction between name and nickname. name already has to be unique, so it's suggested to make it a per-game generated id string
- Server updates
- server times out old sessions (right now after 10 minutes)
- fails, nicknames, autostart, mentioned in other sections
- Fail handling
- server and plugin now send out fail information, so the client can safely revert game state
- plugin tries to close safely, and send error info to peers if hosting (this is pretty simple atm which results in things like checking out non existing sessions, but that seems like a minor problem)
- Project
- i've created an example project at https://github.com/lukester535/godot-holepuncher-example-project, this is simply what i was using to test my changes, and has no actual gameplay, but it should help people who are lost.
- update the README to reflect changes in project and api
- changed addon config version to 1.0.0 (assuming major.minor.patch) because i consider this to be a significant change
- added local testing flag, that replaces peers with localhost so you can test the system (this was used for testing updates, since a game using this system should probably have portforwarding options anyways, you should use that for testing gameplay)
That should be all, but I'll add more if i think of it. Also check the updated readme.
oh, and sorry my commiting is kinda sporadic
Hi! Have you received any sort of reply so far? I just wanted to open a PR for a small port of the .gd files to Godot 4. Maybe i should use your new Script instead?
@ARez2 No I have not received a reply, understandable since it's pretty old. If I remember correctly, I fixed a few major bugs, and added some helpful features, but it's been a while so feel free to check the code yourself. I think these were all necessary improvements, but my code probably has problems too since it was never heavily tested. Of the two you should probably use this one, but both are in need of some love.
Alright. I did try using your Script but since i trying to deploy to Vercel and that twisted
python module didnt seem to work with that, i am currently trying to write my own Hole Puncher using the python http
Module. So it is HTTPRequest based. Because of that it is probably a bit slower than using raw UDP but i think its still acceptable.
@ARez2 are you able to run the plugin in godot 4?
@tejo What do you mean? You mean run this repo on Godot 4 or my own HTTPRequest based holepuncher?
I just wanted to open a PR for a small port of the .gd files to Godot 4. Maybe i should use your new Script instead?
@ARez2 I thought you were able to port the plugin code to godot 4
Ohh right. Sorry this was a long time ago and I don't know if I still have those files. But it shouldn't be too hard to port the code over.