Ok. Nevertheless, you can use the low pause garbage collector and set a maximum length of pause if you want to avoid the garbage collector to bother the player too much. What kind of client/server architecture do you use? Do you respect the design pattern MVC? Does your server perform some computations and some important operations or is it used only to receive and forward the messages to the clients?
It’s basically MVC but V and M intermix in the collision detection, because i’m using the collision detection routines of the engine which work on 3D models, i.e. on the views (or on a simplified form of them). However, the networking parts don’t know anything about the views.
More the latter. While this violates the “never trust the client”-principle, it’s a reasonable approach for this kind of game IMHO. The server does some rough sanity checks and wraps/splits some client events into others, but bascially, it just forwards or broadcasts messages. However, it controls all game events, i.e. if a client flags that he has collected an item or ran into an explosion, the server takes this event, processes and forwards it and only then all clients react on the event (including the client that has triggered the event). Or in other words: If the client dies and the server doesn’t forward this event, the client doesn’t die…
I’ve updated the game and added some minor changes:
- Added an “add all” button to add all maps at once
- Added two new levels and one new texture set
- Added numpad controls for those who prefer it that way
- Added taunts (keys 1-0)
- Fixed the shadows being too bright in dark areas
- Improved garbage avoidance somewhat
Well I’ve tested the game on an older system (singlecore,7600GT) and it ran very fluid at full quality. Maybe its just the nvidia drivers…
To show what I mean I’ve captured a little movie of the game running on my laptop with the lowest settings, but it still shows the stuttering:
http://dev.arcazoid.com/matthijs/bomberman.avi
Could be a couple of things:
- Some driver issue (possible, but unlikely IMHO)…not much i can do about that
- Something runs in the background and interrupts the game from time to time…maybe you can check that out
- It’s a timing/speed issue with the notebooks CPU changing power saving states all the time…it should be possible to detect this by pressing ‘t’ once when in game. This will disable the throttling that the game uses and will fully utilize one core, the framerate should exceed the 75fps that it was before. That should make the CPU run at full speed all the time. If the stuttering persists, it’s most likely not the problem.
- It’s a sound issue. I’ll create a version that allows you to switch to JavaSound and disable the sound completely to see if that helps.
Thanks for your efforts. I really appreciate them.
An updated version (still here: jpct.de/robombs/robombs.jnlp) with some changes:
Game play changes
- Kicking a bomb now lets you jump backwards…like a recoil
- In addition to WASD and CRSR, the Numpad can be used too now
- Two new levels (based on Paradroid and The Bard’s Tale)
Corrected issues
- In some cases, starting a single player game resulted in an infinite loop. This is fixed now.
- Corrected some minor sound flaws (wrong positions of some sounds).
- An unavailable server port now stops the single player game from being started.
Potentially corrected issues (i couldn’t really reproduce them, so i tried to fix them by wild guessing…):
- In a mulitplayer game with bots, it could happen that a player spawns close to a bot. This shouldn’t happen any more.
- In a mulitplayer game, the server sometimes didn’t recognize a client clicking “ready”. This should be fixed now.
- At least on one system (Linux), the start frame had a size of 5*5 pixel instead of the correct one. I hope that this is fixed now.
It is not fixed but it works fine the second time.
I hate Swing…it’s a simple JFrame and i’m setting all kinds of sizes now. What am i supposed to do to please the mighty god of Swing to open it correctly!? I guess it has something to do with the fact that i’m making it visible before setting the size, but i have to, because i need the insets which are all 0 before making it visible. I’ve uploaded another version. Maybe that one works better? It may cut off the lower part of the buttons if it still fails, but that’s better than 5*5 pixel…
Thank you for testing!
;D ;D ;D it works!!!
I’m glad to hear that. I’ve tested it on two Linux machines myself (including one very old that used to collect dust under my desk) and it worked on both of them, so i assume that it’s fine now.
first time I have tried it, it was running pretty slow but it seems that it run fine now, (maybe It was related to my computer or my OS was tired, dont know)
so run fine here on : XP-PRO/ATI X800/1GRAM/AMD-1.6GHZ/Java 1.6-0-07
cool game, I just found the camera rotation a little too slow making things hard to faslty turn.
You can adjust this in the start window after clicking on “show options”.
Well I gave the new version another try, but the stuttering was still there. While I was at it I updated the nvidia driver and that did the trick, runs like a charm now at full res & options (wouldn’t expect anything else from a rig that can even play crysis at medium/high settings ;))! The previous driver was probably a bit crippled (as Nvidia doesnt support these mobile drivers themselves, you have to get them through you notebook manufacturer).
I haven’t expected it to be a driver problem, but i’m glad that it’s solved now… ;D ;D
Uploaded a silent update (no new version number for that) with some minor changes:
- Bots should no longer spawn inside of or close to human players in some cases
- Improved the bots AI slightly (but very slightly)
- Improved shadow rendering especially on ATI R200 and R300 chip sets
Updated the game to version 1.00. This version improves internet play somewhat and fixes some minor flaws. I’ve also released the sources. Get everything here: http://jpct.de/robombs.game/download/
I’ve uploaded a new webstart version that should work on 64bit Windows/Java. At least it worked fine using the Windows 7 RC. It can be found here: http://jpct.de/robombs/robombs.jnlp
doesn’t work on linux 64 bit, jnlp seems to be capped to only work on linux 32 bit
<resources os="Linux" arch="i386">
Damn. Why does all this 64 bit s**t requires special treatment? well, any clue on what i have to type instead to make it work?