Dungeon Escape - Online

Post your Construct-made creations!

Post » Sun Apr 18, 2010 6:17 pm

Awesome. Just... awesome.

Ima chargin' my expectations for this tutorial. :)
B
2
S
2
G
5
Posts: 108
Reputation: 1,866

Post » Sun Apr 18, 2010 10:39 pm

Thanks all for the inspirational words!

[quote="frpnit":2yxhjlff]Hmm, well, maybe even on Raknet library, this should be done by the programmer, since prediction may vary from each game style.[/quote:2yxhjlff]
This is a good point. I'm inclined to agree. I think most people will have to do this based on their type of game. The only thing that can perhaps be done to help is provide people with an example or two on how it is done and they can take it from there.

[quote="frpnit":2yxhjlff]When i initialize udp server, there is some function with while statement in there, and it freezes everything.[/quote:2yxhjlff]
I think you are talking about this call: server.serve_forever() which leads to netbase.py and the while loop. The problem is this pretty much hijacks the main loop and that doesn't play well with Construct. That is why I like PodSixNet so much because it uses the Pump() feature to check packets but doesn't steal the main event loop. I'll have to look at Mastermind closer to see if there is a workaround.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Apr 18, 2010 11:44 pm

[quote="scidave":1ncf21q2]I think you are talking about this call: server.serve_forever() which leads to netbase.py and the while loop. The problem is this pretty much hijacks the main loop and that doesn't play well with Construct. That is why I like PodSixNet so much because it uses the Pump() feature to check packets but doesn't steal the main event loop. I'll have to look at Mastermind closer to see if there is a workaround.[/quote:1ncf21q2]

I think it's not the while statement what's hijacking main loop, but the actions from inside of it. I think it's not polling data in asynchronous event like Pump() in podsix, as it uses asyncore lib from python and mastermind doesn't.

From that point of view, podsix is much more efficient than mastemind. Damn!!

- FRP -
B
3
S
1
G
2
Posts: 16
Reputation: 857

Post » Mon Apr 19, 2010 4:45 am

Does this list anyone that's hosting? I don't know if anyone's hosting :(
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Tue Apr 20, 2010 1:02 am

[quote="AfterShock":2ebozwa7]Does this list anyone that's hosting? I don't know if anyone's hosting[/quote:2ebozwa7]

Right now the server is in a rough state where you have to restart it each time you want a new game. Eventually, I'll set it where it automatically resets once the game ends and also add the option where a client can remotely set the number of players. I'll also add AI players to fill the gaps at some point.

I've uploaded a new version of client and server where you can now specify IP address if you want to use Hamachi (it needs to listen on the Hamachi IP not your default IP address).
http://www.box.net/shared/ypq6pdj0mf

Edit: Decided it was too soon to host a server if it doesn't support restarts and client updates. I'll do this at some point, but I'm going to just start on the tut for know and stop adding features. :)
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Tue Apr 20, 2010 4:56 am

[quote="scidave":4l7n0e3p][quote="AfterShock":4l7n0e3p]Does this list anyone that's hosting? I don't know if anyone's hosting[/quote:4l7n0e3p]

Right now the server is in a rough state where you have to restart it each time you want a new game. Eventually, I'll set it where it automatically resets once the game ends and also add the option where a client can remotely set the number of players. I'll also add AI players to fill the gaps at some point.

I've uploaded a new version of client and server where you can now specify IP address if you want to use Hamachi (it needs to listen on the Hamachi IP not your default IP address).
http://www.box.net/shared/ypq6pdj0mf

Edit: Decided it was too soon to host a server if it doesn't support restarts and client updates. I'll do this at some point, but I'm going to just start on the tut for know and stop adding features. :)[/quote:4l7n0e3p]
In your tutorial will you explain how to show a list of all the servers? Instead of having to manually join already knowing the ip and port
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Tue Apr 20, 2010 1:19 pm

Hey Scidave!

I'm still messing with UDP socket stuff, yesterday i've done that simple example from mikepan and modifying some stuff, it worked. Seems that setting socket to setblocking(0) pushes socket operation to background thread. I'm trying to see if a external ip connects with properly port forward, i've searching on google about and teorically it works, but i've tested with some friend and nothing. Dunno what is wrong at all, perhaps client port must be forwarded too...

Anyway, I will try to code something based on both libraries (mastermind and podsix), avoinding code that could hijack the mainloop.

Wish me luck! (PS.: i've never used python before, but reading documentation and sample code, it's not complicated as well)
B
3
S
1
G
2
Posts: 16
Reputation: 857

Post » Thu Apr 22, 2010 1:32 am

[quote="frpnit":rvevxnnn]Wish me luck! (PS.: i've never used python before, but reading documentation and sample code, it's not complicated as well)[/quote:rvevxnnn]
Good luck! Python is very intuitive, I find it is a joy to write just about anything in it. Also, there are many examples on the web.

[quote="AfterShock":rvevxnnn]In your tutorial will you explain how to show a list of all the servers? Instead of having to manually join already knowing the ip and port[/quote:rvevxnnn]
I hadn't really thought about that. To do something like that all of the clients and servers would have to connect to one (or a cluster of) centralized web server, or something like that so people would know who was hosting. That is probably beyond the scope of this tutorial, but I'll definitely consider it if I do a UDP tutorial in the future.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Tue Apr 27, 2010 11:01 pm

New version uploaded. Increased speed of players, and added interpolation to the beast. There is no noticeable lag on the beast even after a 600ms roundtrip latency is added. I think it is safe to say that this takes care of *most* internet latency issues, at least for slower action and RTS games. Unfortunately, I can't interpolate the other player's positions because of the broken Python access to private variables. This will probably be fixed in the next Construct release so it is not that big of a deal.

http://www.box.net/shared/ypq6pdj0mf

Good progress is being made on the tutorial front as well. :D

p.s. I never got any feedback that people couldn't get this to run (besides Tulamide). My guess is that most people testing already had either Python or Visual Studio installed. If you could not get it to run then try running the VC redistributable installer and that should take care of the problem.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Mon Mar 19, 2012 2:33 pm

Hi. I want a .cap file, please.
B
9
S
1
G
1
Posts: 2
Reputation: 1,202

PreviousNext

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 0 guests