retrohackers.com
http://retrohackers.com/

what about ONLINE POKER for c64...?!
http://retrohackers.com/viewtopic.php?f=4&t=184
Page 1 of 2

Author:  hannenz [ Tue Oct 24, 2006 7:07 pm ]
Post subject:  what about ONLINE POKER for c64...?!

hey dudes!
i got an idea. what do you think about a network POKER game for rr-net equipped c64's...?! (i'd prefere texas hold'em, what's your favorite...?! ;))

i think of something like this: someone (most likely me) would run an UDP game server on either his PC or even on a c64 (using ip65).

All data transmission is done using UDP, that should be sufficient.
The server maintains a user databse where players can creat an account (to keep their virtual money) or login to participate in a game. As soon as there are more than two players logged in, the server starts a game, acting as the "casino dealer", dealing cards, requesting actions for each player, determine winners, keeps track of the players' accounts (cash) and all that stuff, and sends the new updated game data to all players, where this data is displayed nicely on the c64 screen of the player...!

so, the server has to do the whole game job sending all data to all players' c64's and the clients would only have to output the data nicely and send back user actions (fold, call, raise etc...)

now that sounds easy and i hope it is but maybe i missed some crucial things since i just start doing network stuff. the first problem is that i now know how to communicate between my rr-net and pc directly connected, but how would i make the pc server accessible to the outside world...?!

Well... after all i think this would be a challenging, useful, fun and very up-to-date-application for our beloved hardware and it would be great if some of us could join forces for a project such as this, what do you think...?!

oh - and we could spam the world with those kind of emails: "become a millionaire today: join c64-poker-net today, sign up for free! you gotta be in it to win it... " :P :)

Author:  RaveGuru [ Wed Oct 25, 2006 2:20 pm ]
Post subject: 

Haha.. I'd love to get those spam mails! :D

I think it sounds great! If I ever were to engage in online Poker, it'd be on the C64!!

Quote:
how would i make the pc server accessible to the outside world...?!

Just bind a UDP connection to a port. Done :)

Author:  hannenz [ Wed Oct 25, 2006 10:50 pm ]
Post subject: 

wouldn't the server need a fixed IP-Address...???! Or would something like dyndns work too??!
i posted the idea in the well-known german c64-forum and the question came up if TCP wouldn't be the better choice instead of UDP since reliability of packet transmmission would be necessary but speed isn't on the other side. zhat sounds reasonable to me but TCP is much more work to do (i hoped to be able to use ip65, but there is no TCP in it yet...)
what do you think? TCP or UDP??

Author:  MagerValp [ Thu Oct 26, 2006 9:38 am ]
Post subject: 

UDP. Just use a simple protocol like that in UDPSlave. Much simpler than TCP, and it works.

Author:  hannenz [ Thu Oct 26, 2006 1:59 pm ]
Post subject: 

well, yes UDP works great for a local network but the question is if it will be sufficient when communicationg over the internet between a varying number of communication partners and directions. For gameplay functionality it would definitely BE a matter that all packets will be transmitted (and in the right order), which UDP can't grant - or one had to implement an extra error-checking, resend-requests and so on - then the question is: what is harder to do?
Or do you think i am wrong and UDP is "safe" enough...?!

somebody wanna join the project...?!

Author:  Schema [ Thu Oct 26, 2006 2:42 pm ]
Post subject: 

For a turn-based game, ACKing and retrying if UDP packets are lost is probably sufficient, especially with a central server acting as "traffic cop". A single UDP packet should suffice for your game data so order is not important.

If you know Java, I'd recommend writing the server in that. UDP connections are very simple to implement (DatagramSocket). Then your server will run on many platforms without change, in case you want to move the server from your PC onto a more permanent location.

This sounds like a fun project, and probably a good starting point in terms of complexity for a first server-based project (instead of, say, a full-blown MMORPG :wink:). I've got a bunch of projects I need to wrap up (including my own network game) first, but then I'll be happy to help out.

Author:  MagerValp [ Thu Oct 26, 2006 11:34 pm ]
Post subject: 

UDP works great over the net. I sent a 45 kB game over the atlantic to Jason Compton with UDPSlave without any problems. As long as a PC is serving as the communications hub, the C64 clients can be "dumb".

Author:  hannenz [ Fri Oct 27, 2006 12:38 am ]
Post subject: 

ok, good to know - so i can stick to UDP, that's good!

Author:  RaveGuru [ Fri Oct 27, 2006 3:40 pm ]
Post subject: 

Yup. Since you will just operate on a single-packet basis anyway, there's no real need for TCP. Just implement simple flow control/resend protocol like Schema said. They are usually prone of needing extensive finetuning though. I'd suggest starting by writing the packet communication part (based on UDPslave) and when it works reliably over the net, move on to the game logic. Then you will know the limits and caveats of the network part and can adapt the game logic accordingly.

Just my 5 cents.. :)

Author:  MagerValp [ Fri Oct 27, 2006 8:55 pm ]
Post subject: 

Please note that the code in UDPSlave is incapable of connecting to other hosts, it can only reply to incoming traffic. To be able to send to other machines, you need to add support for subnets and a default router. DNS lookup would of course also help immensely.

Author:  hannenz [ Fri Oct 27, 2006 11:08 pm ]
Post subject: 

ok. thanks for all the infos.
i see that i have to learn a lot more about networking and all that stuff...
would nobody like to join - i don't think I will get it done without any help. at least i will ask a lot here in the forum but it would be cool to do something together...
feel free to contact me if someone is interested: hannenz@freenet.de

oh, and again: will I need a fix IP-Adress for the server...?! or how will the clients connect to it?!

Author:  MagerValp [ Sat Oct 28, 2006 1:39 pm ]
Post subject: 

You either need a fixed ip for the server, or DNS lookup in the clients (for dyndns).

Author:  RaveGuru [ Sat Oct 28, 2006 11:18 pm ]
Post subject: 

I think that's your smallast problem right now :D

No, but seriously, I still haven't abandoned my plans for a complete uIP framework. As I continue with GuruTerm, I will develop this aswell (GuruTerm can be seen as an early Alpha of this Framework). Already completed features are:

* Full TCP and UDP support (courtesy of uIP)
* Subnet:ing
* DHCP support
* DNS resolving
* RR-net hardware support
* TFE hardware support (untested)

However, knowing myself, this will proceed at turtle speed. At best!
With that said, I can't encourage other similar projects enough :P

Author:  hannenz [ Tue Nov 07, 2006 10:14 pm ]
Post subject: 

@raveguru: full TCP sounds very good! keep it up, please!
@magervalp: any chance of having TCP in ip65 sometimes...?! i quite like your lib but having TCP in it would be really cool!

Author:  MagerValp [ Tue Nov 07, 2006 11:15 pm ]
Post subject: 

No, TCP will not be added anytime soon.

Page 1 of 2 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/