3d-rama pong

Let me introduce my first complete game in Panda3d (at last, somebody could say):

It is not that much: AI sucks bigtime, some unsolved glitches here and there, graphics and sounds are 8bit-like (HEWW!) but it is mine and it is a whole complete game with sources and with lotta stuff to dig into - here something you can find inside:

  • stereo 3D (3D blue-red goggles needed to see it shining)
  • FSM
  • simple Panda3D physics
  • sounds
  • menus
  • all common input devices-driven: mouse,joystick and keyboard (no the wii controller is not there but I swear I would love to)
  • a simple scoreboard
    So to sum up, you’ll got there all you need to make an arcade-like game, with object and helpers you should learn to subclass and use to make your own game. At least this is my hope posting it.
    So just pick it up (link is down), enjoy the game and as soon as you got enough, dig into that stuff to see if you may came out with your game and maybe let me know it.

DOWNLOAD THE PACKAGE HERE

But it requires pygame :frowning:


D:\Panda3D-1.7.0\samples\_extra\pong3d>pong3dglo.py
Traceback (most recent call last):
  File "D:\Panda3D-1.7.0\samples\_extra\pong3d\pong3dglo.py", line 221, in <modu
le>
    from pong3dgpl import gameplay
  File "D:\Panda3D-1.7.0\samples\_extra\pong3d\pong3dgpl.py", line 23, in <modul
e>
    from easyinput import *
  File "D:\Panda3D-1.7.0\samples\_extra\pong3d\easyinput.py", line 30, in <modul
e>
    self.dbgprint("[WARNING] Pygame module not present")
NameError: name 'self' is not defined

D:\Panda3D-1.7.0\samples\_extra\pong3d>pause

not at all - that’s just an untested error
just delete that line and you’ll be fine or download again all the fixed package. Pick me again if you find more though

bug found: happens if you switch from moving left to right or the other way. when you press the new movement direction before lifting the other key it will simply lock down until you release both keys.

aside from that. nice game :slight_smile: luckily i had a few 3d-goggles around

The game is fun (ok, Pong is always fun), compliments! I hope that some artist could help you with the assets. There are some comments in italian language, I can read them, but I don’t know about other users… :slight_smile:

Works now.
Yet mouse control is strange, like not working properly.

yes Thomas - that is one of the glitches I talk in my topmost post. I do not recommend to use the keys anyhow cos they’re too slow for the harder levels - just use the mouse.

thankyou for your appreciation yaio - about the artists call I don’t think a game like this need shiny graphics: that’s why I choose it :wink: - my intent is just to share sorta of a skeleton other ppl could use to make games with less effort. About the italian comments don’t worry about: I kept’em like that 'cos are just personal memos, unimportant for other ppl

that’s weird cos in my PC works perfectly - can you tellme more about? why you say don’t work properly: what do you see there and what PC and OS are you on?

that was pretty funny, nice little game ^^ Got me hooked for a while!

haha wow xD That is perty funny =) I suck at first, but I got better perty fast. That computer can learn man :stuck_out_tongue:

Nice!

To get it working (Panda3D 1.7, MacOS X 10.5.8 Leopard, 2008 MacBook with lame Intel GMA X3100 graphics), I added a line “_predelta=False” after “_pre_moy=0”

The specific error:

  File "...easyinput.py", line 214, in _read_mouse
    elif self._predelta:
AttributeError: easyinput instance has no attribute '_predelta'

Also, just FYI, some assertions and exceptions:

$ ppython pong3dglo.py
[WARNING] Pygame module not present
Known pipe types:
  osxGraphicsPipe
(all display modules loaded.)
Assertion failed: !is_empty() at line 1984 of built/include/nodePath.I
Exception occurred while processing Func-intermessage-10 of Sequence-1:
Sequence-1:
  0.000 Sequence-1 {
  0.000   *Func-intermessage-1
  0.000   *Func-playeffect-2
  0.000   Wait dur 1.5
  1.500   *Func-intermessage-3
  1.500   *Func-playeffect-4
  1.500   Wait dur 1.5
  3.000   *Func-intermessage-5
  3.000   *Func-playeffect-6
  3.000   Wait dur 1.5
  4.500   *Func-intermessage-7
  4.500   *Func-playeffect-8
  4.500   Wait dur 1.5
  6.000   Wait dur 3
  9.000   *Func-intermessage-10
  9.000   Wait dur 1
 10.000   *Func-<lambda>-9
 10.000 }

Traceback (most recent call last):
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/showbase/ShowBase.py", line 1634, in __ivalLoop
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/IntervalManager.py", line 96, in step
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/IntervalManager.py", line 124, in __doPythonCallbacks
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/MetaInterval.py", line 505, in privPostEvent
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/MetaInterval.py", line 481, in __doPythonCallbacks
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/Interval.py", line 207, in privDoEvent
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/FunctionInterval.py", line 88, in privInstant
  File ".../pong3d/pong3dgpl.py", line 457, in intermessage
    self.text['cmsg'].hide()
AssertionError: !is_empty() at line 1984 of built/include/nodePath.I
:task(error): Exception occurred in PythonTask ivalLoop
Traceback (most recent call last):
  File "pong3dglo.py", line 223, in <module>
    run()
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/showbase/ShowBase.py", line 2531, in run
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/task/Task.py", line 496, in run
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/task/Task.py", line 454, in step
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/showbase/ShowBase.py", line 1634, in __ivalLoop
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/IntervalManager.py", line 96, in step
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/IntervalManager.py", line 124, in __doPythonCallbacks
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/MetaInterval.py", line 505, in privPostEvent
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/MetaInterval.py", line 481, in __doPythonCallbacks
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/Interval.py", line 207, in privDoEvent
  File "dstroot/pythoncode/Developer/Panda3D/lib/direct/interval/FunctionInterval.py", line 88, in privInstant
  File ".../pong3d/pong3dgpl.py", line 457, in intermessage
    self.text['cmsg'].hide()
AssertionError: !is_empty() at line 1984 of built/include/nodePath.I