Jump to content


Photo

Pandora Pool Panic Beta


  • Please log in to reply
45 replies to this topic

#16 fusion_power

fusion_power

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2998 posts
  • Location:germany
  • Interests:GP2X ;)

Posted 18 March 2009 - 10:32 PM

QUOTE('Unfathomable Depths' @ 'Mar 18 2009, 01:10 PM)

Im going to code an online multi-player pool game next. This was just me geting the ball collision right (although Ive noticed a couple of pocket collision bugs but they are easy to fix)....


I would also like to see a Offline Mode, there is not much "Online Multiplayer" with just a 56K Modem and no Flatrate. biggrin.gif
I know, AI is a main problem like in every other Game with Computer Enemies but maybe there is a solution in the future. happy.gif

#17 Unfathomable Depths

Unfathomable Depths

    sláinte

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 877 posts
  • Gender:Male
  • Location:Scotland

Posted 18 March 2009 - 11:58 PM

Practice mode will be in for sure but the math for the CPU AI might be beyond my limited abilities sad.gif

Been working on the UDP socket programming tonight and think Ive got it licked smile.gif The way Im doing it is also platform independent (using #IF DEFINED _WIN32, UNIX) so a windows client for the game should be no problem.



#18 Butterman

Butterman

    Gief Pandara

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 776 posts
  • Gender:Male
  • Location:London
  • Interests:=

Posted 19 March 2009 - 12:16 PM

I would use TCP on this project.

An AI won''t be hard for this at all. You just have to work out if any of his balls lie between an ray between the white ball and the pocket. If so, just put the crosshair on them and fire. If not, just shoot a random one biggrin.gif.

#19 fusion_power

fusion_power

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2998 posts
  • Location:germany
  • Interests:GP2X ;)

Posted 19 March 2009 - 12:21 PM

QUOTE('Unfathomable Depths' @ 'Mar 19 2009, 12:58 AM)

Practice mode will be in for sure but the math for the CPU AI might be beyond my limited abilities \:\(

Been working on the UDP socket programming tonight and think Ive got it licked \:\) The way Im doing it is also platform independent (using #IF DEFINED _WIN32, UNIX) so a windows client for the game should be no problem.

Practise Mode sounds good too. smile.gif
Is there something like an flexible "Open Source AI" out there, that coders can include in their projects? Could help many Games where a AI is needed. happy.gif

#20 Unfathomable Depths

Unfathomable Depths

    sláinte

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 877 posts
  • Gender:Male
  • Location:Scotland

Posted 19 March 2009 - 02:35 PM

QUOTE('Butterman' @ 'Mar 19 2009, 12:16 PM)

I would use TCP on this project.

An AI won''''t be hard for this at all. You just have to work out if any of his balls lie between an ray between the white ball and the pocket. If so, just put the crosshair on them and fire. If not, just shoot a random one \:D.


I understand what your saying about TCP for this game as its turn based. The reason I''m using UDP is I want to write a general purpose sockets class that I can use in other real time projects and also I want the other player to watch their opponents shot as its made.

That would work as a stop gap solution. Line of sight and ball selection look deceptively simple but to be convincing is really difficult - stopping the CPU going for and getting impossible shots at the expense of a simpler better one. Maybe at a later stage. smile.gif

QUOTE('fusion_power' @ 'Mar 19 2009, 12:21 PM)

Practise Mode sounds good too. \:\)
Is there something like an flexible "Open Source AI" out there, that coders can include in their projects? Could help many Games where a AI is needed. \^_\^


Thats a possibility, Ill have a look into that. Someone is bound to have biggrin.gif but to be honest Im more interested in getting it working as a multiplayer game. sad.gif sorry.




#21 Butterman

Butterman

    Gief Pandara

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 776 posts
  • Gender:Male
  • Location:London
  • Interests:=

Posted 19 March 2009 - 03:24 PM

TCP isn''t for turn-based games. The average packet lag you''re going to get on a TCP packet, in real world conditions is about ~400ms. That seems like a lot, in a FPS, over 200ms you start to have serious trouble playing. That''s only because every movement you make has to go through the server and back before it takes place.

RTS, MMORPG, RPG, they all use TCP. For TINCS, I''m using TCP and UDP. The UDP is alone for the unreliable messages that get spammed out ~60 times a second. The TCP, is for everything else like the client saying. "LMB was pressed" or "I changed gun". In real world conditions, when I''m playing Muzz who''s all the way in Australia, he noticed almost not lag at all. He said everything was very responsive.

TCP isn''t for "slow" stuff and UDP isn''t for "fast" stuff. UDP has very little use outside of games and in games, I''ve only really seen it used in first person shooters.

Anyway, you don''t have to listen to me. Do whatcha want. I''ve only been writing network code for 3 or 4 years now.

#22 Unfathomable Depths

Unfathomable Depths

    sláinte

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 877 posts
  • Gender:Male
  • Location:Scotland

Posted 19 March 2009 - 07:56 PM

I wasn''t having a go Butterman - networking is all new to me so forgive my novice ramblings smile.gif

Everything Ive read on TCP goes along with exactly what youve said. I just dont want to re-invent the wheel when the next project requires UDP (probably some sort of top down racer).

I try to write as generally as possible and then adapt that code.

Think Ive got it down now. Got a class that initializes the socket (Windows), can send and receive packets and close the socket.

Next move is a simple game I can distribute to a couple of mates and test.

#23 Crunchwrap

Crunchwrap

    Fuckass

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1549 posts
  • Gender:Male
  • Location:Duke, New Mexico
  • Interests:Interests

Posted 19 March 2009 - 08:13 PM

So this will work with both Pandora-Pandora and Pandora-Internet?

#24 Unfathomable Depths

Unfathomable Depths

    sláinte

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 877 posts
  • Gender:Male
  • Location:Scotland

Posted 19 March 2009 - 08:44 PM

Youre talking about Pool Panic right?

Windows. And Pandora in about a month or so.

*edit* and Gp2X IPB Image

Edited by Unfathomable Depths, 19 March 2009 - 08:50 PM.


#25 Crunchwrap

Crunchwrap

    Fuckass

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1549 posts
  • Gender:Male
  • Location:Duke, New Mexico
  • Interests:Interests

Posted 19 March 2009 - 09:51 PM

I was asking about the multiplayer. Or will that be a different game?

#26 Unfathomable Depths

Unfathomable Depths

    sláinte

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 877 posts
  • Gender:Male
  • Location:Scotland

Posted 19 March 2009 - 10:06 PM

Yea - totally different game. Same balls though wink.gif

Im pretty sure Ive got the ball-to-ball collisions spot on.
Next stage is me getting a simple 2 player game to work - any suggestions? - Im thinking 2 player Pong...




#27 Butterman

Butterman

    Gief Pandara

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 776 posts
  • Gender:Male
  • Location:London
  • Interests:=

Posted 21 March 2009 - 11:37 AM

How are you doing ball to ball collision?

#28 Unfathomable Depths

Unfathomable Depths

    sláinte

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 877 posts
  • Gender:Male
  • Location:Scotland

Posted 21 March 2009 - 12:32 PM

Math isnt my strongpoint and I know there are better ways using line intersections but this works and its relatively cheap.

You get the balls distances and speeds, check they are moving toward each other.
Then if they collide calculate their deflection angles and speed based on their relative positions and speeds.

#29 Sphinxter

Sphinxter

    Says What?

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2831 posts
  • Gender:Male
  • Location:Silicon Valley California, USA

Posted 21 March 2009 - 07:46 PM

QUOTE('Unfathomable Depths' @ 'Mar 19 2009, 02:06 PM)

Yea - totally different game. Same balls though ;\)

Im pretty sure Ive got the ball-to-ball collisions spot on.
Next stage is me getting a simple 2 player game to work - any suggestions? - Im thinking 2 player Pong...


Lagging for break?

#30 Unfathomable Depths

Unfathomable Depths

    sláinte

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 877 posts
  • Gender:Male
  • Location:Scotland

Posted 21 March 2009 - 08:57 PM

hehehe

Lowest pings away...

Pong will be a good stress test I think. I always write some sort of bat and ball variant for any new area I venture into - If we get OGRE expect FPS Pong...