Multiplayer top-down view shooter

I’ve noticed that some people have started the game and are in the internet lobby, but they never join the dedicated server game. Does joining the game not work for some people? I’d really like to know if it’s not working properly, so if you could let me know (or even better, post any output from the console), that would be fantastic.

Thanks,
Keith

Hi everyone, thanks for trying my game, there’s been about 80 people who have joined over the past day!

Unfortunately I’m taking down the dedicated server for a while until I fix a performance proble Since I know you’re itching to play this state-of-the-art 2D 4-colour game, I’ll let you know as soon as it’s back up… :wink: :stuck_out_tongue:

What did you think of the bots? They’re pretty awesome eh? Try setting ‘numbots = 9’ by typing that into the chat at the bottom of the game window after you create a game. They have a full-on battle with each other, it’s amazing! I think the machine gun bots are the hardest, and after that the sniper bots since they’ve got perfect aiming, you can’t stand still when they’re anywhere near.

Hey if anyone would like me to explain anything about the game and how it works, I’d be only too happy :slight_smile: Something useful in it for network game-makers might be the way I used the excellent Apache MINA to do the network communication… MINA looks like the most solid java NIO framework that’s around.

Thanks,
Keith

hey i couldn’t get to the src link … any idea? i wanna see how you do with the JGN … :-[

Hi Wakaoz,

I posted the source which uses JGN over here:
http://forum.captiveimagination.com/index.php?PHPSESSID=2dea28210fecb9101c6fe97b2f3418b8&topic=488.0

As I said in the JGN post there, JGN worked well and was the easiest network framework to use and understand, and Matt Hicks (Sunsett/DarkFrog) is very helpful with answering questions on the JGN forums.

The JGN source is not as up to date as the current version which uses Apache MINA, source here:
http://www.freewebs.com/commanderkeith/sydneyengine/src.zip

Hi, mayby a dumb question

atm I use a String msg to talk between server/client. I’m just wondering what does Mina uses?
does it send some kind of byte sequence that forms a command object, does it send whole objects?

or in short, how did you ‘talked’ on the network.
I browsed through the src networking folder but couldn’t see what was going on.

and what are your toughts about http://www.brackeen.com/javagamebook/#download chapter6? have you used it? would it be more game friendly then mina?

Hi Stef,

All networking communication is done using byte arrays (or ByteBuffers which are just a wrapper around a byte array). Mina uses ByteBuffers, but like almost every other network library, it tries to make it seem like you can send whole objects over the network, but in reality it turns the object into a byte array and then sends that and turns it back into an object on the other computer. In my use of Mina, I made (actually I copied it from someone) a special class that is used to just send byte arrays, called sydneyengine.network.ByteArrayCodecFactory. If you want to send Strings, you can use DataOutputStream.writeUTF(String) and then get the byte array from the ByteArrayOutputStream which is inside the DataOutputStream.

I haven’t read that particular chapter of David Brackeen’s book, but I know it’s very good. You’ll be happy to know that David frequents this forum so you could ask him dirtectly!

really nice game

I was thinking about doing something similar, but with a background image for terrain and an underlying elevation map. I’m in the same situation with the lack of graphic skills though and was considering just using vector graphics.

btw, i tried the dedicated ip game and it worked fine, not sure how to capture the enemies flag or if that is implemented?

Thanks Thaspius!

You’re ideas to do terrain would be cool. And vector graphics are easy because you don’t have to move and rotate a sprite with the model - just draw the model as a polygon. Also, vector graphics always look crisp once you turn on antialiasing.

The next thing I’d like to do with it is make physics. In the original version I had tanks and vehicles that you could fight in but without physics it didn’t work well - like you’d be driving your jeep and then you’d glance a wall and just stop. I’d love to add physics, I just need some time to tweak JBox2D (http://jbox2d.org/) so it uses my network framework.

If you take the captured flag back to your nearest home base it should return and give you a point… I hope :stuck_out_tongue:

is there any progress with jbox2d?

No I’ve given up on this project for now.

I did make a version of JBox2D that worked with my network code but it was pretty messy and caused big GC pauses so I ditched it.

Basically the problem is that it’s too hard to save the state of objects (in other libraries) in a fast, low garbage way.

Bummer. I just played it again against bots and had fun. Of course, once I figured out how they work I schooled them. I don’t like the controls being relative to the aimer too much - is there a way to move relative to the camera instead?

oh nice, works well, with some better graphics this could turn out really nice.

[quote=“Demonpants,post:31,topic:31206”]
agreed, controls are disorienting because the keys keep changing, better if the up button just moved you up and down moved you down, etc, instead of changing based on the direction you are facing.

Ha ha, thanks guys. Yeah the controls are pretty hard the way they’re relative to the mouse. Non-gamers/programmers have big trouble trying to play! The way you can’t slide along walls sux too.

I plan to make a new (non-networked) one with better graphics soon. Thanks for the encouragement!

Really sorry for reviving this, but I have managed to extend it, featuring the familiar WASD movement system relative to the mouse, among other changes: (just the few I could think up the top of my head)

Enhanced rocket, sniping rifle (faster, larger, damage)
Flamethrower now ignite area of ground on fire for some time
Added Q/E switch weapon key support
Changed to regular up/down/left/right movement system, and bots override it themselves
public chat messages for kills and killStreak(restarts when you die) and means of death
Enhanced regular canvas graphics
Fully implemented “assists” in kills
Player names now highlighted in chat system
Enhanced healthbar
Small reformatting of Performance Options menu, including show stats option
Flamethrower napalm sticks to walls
Rockets explode into shrapnel
Powerup added: GodlyArmor, which grants invincibility for 15 seconds (can’t use more than one powerup at once)
Tranquilizer stop people from firing for a short time, rebalanced Tranquilizer gun
Limits on zoom in/ zoom out
Tranquilized bots now can resume firing later
Bots are now able to use godly armor and invisibility
Bots have secondary armament (pistol), better rocket launcher AI
Bots have basic chat
SpeedShoes item added
implemented personal messages/alerts
Removed item labels, so must run into them to find out what they are!
Updated Help Menu
Networking now works on local LAN, but slight lag for all client players on laptops, but not on desktops
Update code to use Apache Mina 2.0.9 instead of 1.1.5;
Organized imports, removing unnecessary references
Added cheats
Bullet trail on pistol, machinegun, rocket
Players can slide along walls & banks of water now
Can now aim the range of flamethrower and rocket launcher based on mouse
Added homing missile gun
implemented translucent Arc heads-up-display of ammo in clip
better console output for debugging, tracing
Reorganized files
Added Nailgun

Again, I started from SydneyEngine v. 0.2 which is a great framework in its own right.

So, here’s a link to the new topic I started: http://www.java-gaming.org/topics/defiance-an-open-source-multiplayer-2d-shooter-game-in-java/35220/view.html

Really sorry for reviving this, but I have managed to extend it, featuring the familiar WASD movement system relative to the mouse, among other changes: (just the few I could think up the top of my head)

Enhanced rocket, sniping rifle (faster, larger, damage)
Flamethrower now ignite area of ground on fire for some time
Added Q/E switch weapon key support
Changed to regular up/down/left/right movement system, and bots override it themselves
public chat messages for kills and killStreak(restarts when you die) and means of death
Enhanced regular canvas graphics
Fully implemented “assists” in kills
Player names now highlighted in chat system
Enhanced healthbar
Small reformatting of Performance Options menu, including show stats option
Flamethrower napalm sticks to walls
Rockets explode into shrapnel
Powerup added: GodlyArmor, which grants invincibility for 15 seconds (can’t use more than one powerup at once)
Tranquilizer stop people from firing for a short time, rebalanced Tranquilizer gun
Limits on zoom in/ zoom out
Tranquilized bots now can resume firing later
Bots are now able to use godly armor and invisibility
Bots have secondary armament (pistol), better rocket launcher AI
Bots have basic chat
SpeedShoes item added
implemented personal messages/alerts
Removed item labels, so must run into them to find out what they are!
Updated Help Menu
Networking now works on local LAN, but slight lag for all client players on laptops, but not on desktops
Update code to use Apache Mina 2.0.9 instead of 1.1.5;
Organized imports, removing unnecessary references
Added cheats
Bullet trail on pistol, machinegun, rocket
Players can slide along walls & banks of water now
Can now aim the range of flamethrower and rocket launcher based on mouse
Added homing missile gun
implemented translucent Arc heads-up-display of ammo in clip
better console output for debugging, tracing
Reorganized files
Added Nailgun

Again, I started from SydneyEngine v. 0.2 which is a great framework in its own right.

So, here’s a link to the new topic I started: http://www.java-gaming.org/topics/defiance-an-open-source-multiplayer-2d-shooter-game-in-java/35220/view.html