A3P [formerly Stainless]

[edit] Name change: formerly known as Stainless.

Current version v0.5a is available to play on the shiny new website!

Thanks to the efforts of drwr and rdb documented in this thread, you can also play the game using the awesome new browser plugin here.

looks very nice. i see many features added since the last version i tested.
how about embedding the game on you webside using panda’s new and shiny web-browser plugin?

small bugreport :slight_smile: while in training mode it crashed after several minutes.

:linmath(warning): Tried to invert singular LMatrix3.
:linmath(warning): Tried to invert singular LMatrix3.
INFO: endMatch - Broadcasted match end packet.
INFO: startMatch - Broadcasted match start packet.
Traceback (most recent call last):
  File "main.py", line 723, in gameLoop
    game.update()
  File "main.py", line 371, in update
    self.entityGroup.update(self.localTeam, paused = not self.matchInProgress)
  File "/home/thomas/Desktop/stainless/stainless/src/entities.py", line 62, in update
    self.manager.update(localTeam, paused)
  File "/home/thomas/Desktop/stainless/stainless/src/net.py", line 509, in update
    p = entity.controller.serverUpdate(self.entityGroup.aiWorld, self.entityGroup, packetUpdate)
  File "/home/thomas/Desktop/stainless/stainless/src/controllers.py", line 270, in serverUpdate
    self.unitQueue.append(u)
UnboundLocalError: local variable 'u' referenced before assignment
:task(error): Exception occurred in PythonTask Game loop
Traceback (most recent call last):
  File "main.py", line 728, in <module>
    run()
  File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 2423, in run
    self.taskMgr.run()
  File "/usr/share/panda3d/direct/task/TaskNew.py", line 471, in run
    self.step()
  File "/usr/share/panda3d/direct/task/TaskNew.py", line 429, in step
    self.mgr.poll()
  File "main.py", line 723, in gameLoop
    game.update()
  File "main.py", line 371, in update
    self.entityGroup.update(self.localTeam, paused = not self.matchInProgress)
  File "/home/thomas/Desktop/stainless/stainless/src/entities.py", line 62, in update
    self.manager.update(localTeam, paused)
  File "/home/thomas/Desktop/stainless/stainless/src/net.py", line 509, in update
    p = entity.controller.serverUpdate(self.entityGroup.aiWorld, self.entityGroup, packetUpdate)
  File "/home/thomas/Desktop/stainless/stainless/src/controllers.py", line 270, in serverUpdate
    self.unitQueue.append(u)
UnboundLocalError: local variable 'u' referenced before assignment
thomas@Nekomimi-modebook:~/Desktop/stainless/stainless$ 

Very, very nice!

I’ve tried v0.3 already and I loved it. Such a creative game, and not like every shooter. Going to try this for sure!

wvd, thanks for your kind words! Hopefully the final release will be even better.

ThomasEgi, thanks for the bug report. Keep this up and I’ll have to add you to the credits. :smiley:

I’d love to try out the browser plugin, but even without Panda3D, the game is at least 80 megs. Isn’t that too big?

Toontown Online is almost 200 MB, and Pirates of the Caribbean Online is pushing 700 MB, and we’re planning on putting both of them in the browser using Panda’s new plugin system. :slight_smile:

The plugin system includes a complete packaging system to make it easier to manage large assets like this; and the whole system is (mostly) documented in the manual. 80 MB might still be small enough that you can get away with just putting it in a single p3d file, which is the easiest way to distribute it; but if you want to spare your users the headache of downloading this every time, you can use Panda’s new packaging system to download your game assets once and leave them there.

David

just tested from source. menu shows up and the loading screens for each modes also seem to work, but at the end of the loading process it crashes with the following error:

No module named speech
/home/nemesis13/code/python/panda/stainless/src/controllers.py:11: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
DirectStart: Starting the game.
Known pipe types:
  glxGraphicsPipe
(all display modules loaded.)
INFO: init - Failed to import speech library. Continuing happily.
INFO: __init__ - Loading map: levels/arena/level.map
:gobj(error): Texture::read() - couldn't read: ./../../../../stainless/arena/arena/lightmap.png
:gobj(error): Unable to find texture "./../../../../stainless/arena/arena/lightmap.png" on model-path /home/nemesis13/code/python/panda/stainless:/opt/panda3d/etc/..:/opt/panda3d/etc/../models
INFO: netWorker - Opening port 8081 for listening...
INFO: netWorker - Listening
INFO: __init__ - Map loaded: levels/arena/level.map
INFO: startMatch - Broadcasted match start packet.

ODE INTERNAL ERROR 2: Please call ODE initialization (dInitODE() or similar) before using the library in dCollide()
Aborted

the texture path errors are harmless, but it looks like you have a bug in the ODE implementation

Nah, it’s Panda3D being incompatible with the latest version of ODE. I’ve already checked in the fix for it to Panda3D CVS.

to the web publishing issue: ~76MB of your game is music. compression makes no sense on MP3s, but you could sample it down or download them in background.

You’re shipping MP3 with your game? I seriously recommend against that, as you’d need to get a very-expensive MP3 license if you don’t want lawyers with pitchforks on your doorstep…

Also, ogg files are smaller for the same audio quality level. Seems like a no-brainer. :slight_smile:

David

Ouch, thanks for the advice. I didn’t know about the MP3 pitch-fork-toting-lawyer thing. I assumed since it was open source music…

Nemesis#13, where’d you get the 76 Mb number for music? On my copy of the game, the music folder is about 38 Mb. You’re right though, I should definitely downsample/convert to ogg/download in the background.

So the only other issue I see with web publishing is that the game is currently LAN-only, which doesn’t make sense in a browser game. What do I need to do to get things working over the internet? I would probably need to set up a server to host some kind of lobby too… Also, there are absolutely no anti-cheating measures, and I don’t even know where to start on that.

It would be sweet, though. 8)

Holy… never noticed that before: http://www.mp3licensing.com/royalty/ - 2.5k$ for a game… guess that makes mp3 not the first choice of indie developers…
Edit: No licence fees if less than 5000 units are distributed… time to set limits to the downloads, lol

So I’m trying to make a p3d now. For now, I’m doing it without packages, because I couldn’t get it working. But now I can’t get the p3d working either, it apparently won’t read my custom text files (.map). Does packp3d only read certain file types, like jpg, png, egg, etc, or what?

Yes, it only looks for certain file extensions, and adds those, ignoring others. For something more custom, you’d have to use the ppackage command, and build a pdef file something like this:

packager.textExtensions += [ 'map' ]
class mygame(p3d)
    dir('/my/start/dir')
    mainModule('main')

Then when you run “ppackage.p3d mygame.pdef”, it will generate mygame.p3d, including your files named foo.map.

It would be a good idea to have a command-line option to packp3d to allow you to specify additional file extensions without having to go through this pdef rigamarole, though. I’ll add that feature.

David

Hmm… looks like .map files still aren’t added. I’m using “panda3d ppackage.p3d” instead of ppackage.py, would that make a difference? If so, where can I get ppackage.py?

Thanks for your help.

No, ppackage.p3d is the correct filename. But ppackage does one more sneaky thing: it generates its output into a subdirectory called “install”, instead of dropping it into the current directory. I bet you’re looking at the old p3d file instead of the new one generated by ppackage. :slight_smile:

David

You were correct, of course. But it is still not including the .map files… I made sure the extension actually got added to textExtensions, and I looked at the Packager.py source and I can’t figure out what the problem is. I’ve been probing around the VirtualFileSystem, and it looks like everything else in the folder is there. Calling it quits for tonight, we’ll see.

oops, just noticed i also counted the files from .svn

units = files?

Alright, here’s the p3d, with a few new features too. :smiley:

http://a3p.sf.net/game.html

It doesn’t work in the browser on my system, even on my localhost. Looks like it’s loading, initializes ODE, etc, shows the “play” button, and then just sits there showing the cute little panda. Tested on Windows 7 x64 in Chrome, FF, and IE8. (all 32-bit)

It does work when I run it with panda3d.exe, but OpenAL isn’t working; it reverts to NullAudioManager.