Gunslinger 2 - sci-fi action top down shooter

Java web start:
http://lanai.no-ip.com/mr_b/

Jar-files
http://lanai.no-ip.com/mr_b/gunslinger2.jar
http://lanai.no-ip.com/mr_b/jbox2d-2.0.1-library-only.jar
Download these to the same folder. Run them with:
java -Xms128M -Xmx512M -jar gunslinger2.jar
Create a bat or shell file with this command in the same folder.

Story so far
It has been almost 5000 years since the last Gunslinger game. A remote automated colony is in trouble, the automatic reactor and life support is having some kind of unknown trouble. Whats worse, it’s in the basement and nobody has been down there for thousands of years, “it just works” (the sales slogan for the lowest bidder that built the damn thing).
However, they do have 1000 embryo clones of Jareb Mosfet (the hero from Gunslinger 1) on ice. They are thawing and maturing them as fast as they can and sending them down to set things straight.

Controls
Move by right clicking the mouse or WASD.
Left click to shoot.
Walk into things to interact (open doors and empty crates)
Press I to toggle inventory.
Hover mouse and press keyboard over Items in inventory to assign quick keys. 1-5 is available for guns and ZXCVB for other usable items.
Press E to equipt latest gun picked up.
Press G to throw away latest item picked up (ammo from gun will be kept).
Press M to toggle overlay map.
Open the inventory and drag Guns to the gun buttons (lower left and right corner) to equip them.
Right click a gun button (this will open the inventory in Gun selection mode) and click a gun to equip it.
Left click an item button (buttons at the right edge) to use it. Right click to select a new item for that button.

Gameplay video
Be sure to watch in 480p.
http://www.youtube.com/watch?v=PexYhVkhMQw (older and shorter)
http://www.youtube.com/watch?v=RK70Nigv92c (current and longer)

Please
Tell me if it works and what framerate you get (Press F12 to toggle).
Is it to hard? (I tried to make it quite easy in the beginning and then harder later on)
I know that the spawning cracks can be quite bad.

Weapons and tactis
Rely on your blaster, it has infinite ammo. The other guns, that are better, have not.
Gun statistic are randomly generated but there are a couple of types available.

Dartgun - like a submachinegun. Uses darts for ammo.
Spiker - organic gun that grow spikes if you feed i toxic waste
Comet - warps in comets from outer space. Uses warp crystals for ammo.
Railgun - shoots darts at extreme speed. Shoots through things. Uses both darts and power cells for ammo.
Thunderbolt - shoots lightning.
Toxic spray - sprays toxic. Very effective but eats up ammo quickly.

Roadmap
Saving and loading (that also include a menu system)
Configure controls
Sound
Challenges
Trading
More enemies
More item painters

A technical note:
This is implemented in pure java2d. There is not one single bitmap file in the jar. This has the following merits:

  • All animation are totally fluid and can be made unique each time. For instance, the splatter around corpses are randomly generated, as are sparks and explosions (I know I know, the explosions look horrible).
  • Each monster can be slightly different than the others (sure, this can be done 3D models also, but not that easy with bitmaps). I vary size and colors.
  • It’s very easy to create different breeds from the same type of monster. Change the base colors and maybe the size.
  • very small jar.

It started as an experiment, I usually use sprites. I had no good graphics program so I decided to paint with java2d. And I didn’t look back (very often) :slight_smile:

I was clicking around the inventory menu and then exited it, and an exception happened:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at borb.engine.game.Screen.mouseReleasedFinal(Screen.java:296)
	at borb.engine.game.GameApplication.mouseReleased(GameApplication.java:151)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Also another bug I noticed is when your weapons runs out of ammo it just keeps trying to reload and reload (the red/blue bar keeps filling) but it doesn’t stop until you switch the weapon.

Other than that, good game :slight_smile: I got to the 3rd level without dying

I like it, top-down view feels really good. The physics is neat as well.

Just a few things that I think you could improve. First the graphics could be more flashy. The colours are too flat and the characters look too much like outlines. With the movement, I like how you can use the keys or the mouse. But with the mouse, I’m used to right click being shoot, and left click being for movement, but that’s just a personal preference.

I didn’t find any bugs. It downloaded quickly and worked fine. Very cool. The line of sight adds suspense, it’s very good. Could you make the edge of the black outline more anti-aliased so it’s less jagged? Really good progress!

Hi!

It is smooth and it works fine :slight_smile:

It looks really nice and it is very smooth to be java2d, great work!

I think the shadow must be a cone instead a plane I suppose, something like a viewing frustum.

Good luck with the game.

Very very nice. I really liked it.

A few things I’d like to see before it gets featured though:

  • Sound
  • Clearer explanation of controls (couldn’t figure out how to switch guns aside from going to the most recently picked up one)
  • Clearer explanation of overall goal (I didn’t really know where / why I was going)

I got the same problem . Then I found out that I need to assign a key to a weapon, and then I can change it using the key … I think that’s pretty non-intuitive . It would be nice if I could quickly change the weapon with the mouse scroll .

Other than that, I found the game quite enjoyable. I played it for 20 minutes or so, and I would play it more if more content is added .

I disagree with that, the view would be too much restricted … I already feel a bit unconfortable not having a peripherical view, but I think that adds up some uniqueness to the game . A conic field of view would force you to always sweep the screen looking for things.
Anyway, the FOV effect is pretty neat .

Amazing that you have done evertything in Java2D . Have you written some kind of editor that you can draw java2D primitives or you did everything by code?

good luck with the game !

I felt the same way about being limited but I said about the camera cone because it is weird the way I can see through a corridor if I am 90 degrees to it, try it yourself, go to a corner and then turn right, you can see everything in the corridor. I believe that is a little weird.

This is what I mean:


http://img827.imageshack.us/img827/5903/screenshotgame.png

Thanks, will fix both of them.
I have seen the reloading bug many many times, so many that I got blind to it! :slight_smile:

Thank you all for testing!

I also like the physics. It is JBox2D. :slight_smile:
Works very good for me.

It is hard (but not impossible) to give the graphics more depth. I know some of the creatures and the obstacles are quite flat. I will keep it in mind.

As for the controls, I am mimicking Diablo 2. (Also, don’t miss that you can assign a second gun to the gun button in the lower right corner, hold control and right click to fire it). Controls will eventually be configurable.

The edge of the shadow is a Graphics2D clip so it can’t be antialiased. However, I have an idea how to fix it. Good idea!

Thanks!

Good call on the controls. Will improve it.
As for selecting guns, you can:
Left click the gun button (lower left and lower right corners), the inventory will be visible and you can click the gun you want to assign.
Also, you activate the inventory with the button (or keystroke I) and drag a gun to the gun button.
And, as Teletubo said, you can assign hotkeys. 1-5 for the left gun and 6-0 for the right gun.

The rest is on the todo list already!

I will have a story, but there will be no quests that will involve talking or puzzle solving. This is going to be an action game. The game will be linear and focus on action. It will rely on interesting, challenging and varying opponents, interesting maps and interesting loot. Kind of like Diablo 2.

One thing I hope to include are challenges. You enter a new map and a text will show: “You have 5 minutes to close down all the exits before enemies swarms you” or “Escape this map before it is closed down” or “Defend the robots from the three alien attack waves, at least 5 robots must survive”. Challenges are optional and hard, but if you defeat them, there will be good loot.

Thanks…

Good idea with mouse scroll, will add it.

Everything is coded directly. I have been thinking about some kind of editor, it would surely help. I have some helper objects to keep track of animated legs and such though.

Ahh, yes. It can of course always be tweaked. It is a cone, but almost 180 degrees. I could make it a little bit narrower. In the first version I got criticized when the fov had its center directly on the head of the player. You couldn’t see what was exactly behind your back. In real life, if you look a little, not much at all, bit down, you see the floor behind you. Also, you see the floor pretty good to the left and right. I will try to keep an open mind and listen to you. :slight_smile:

I dunno, I only felt strange when playing it because I played similar games with different view limitation (like a lantern or something) but I think the game fov angle is right.

Keep the good work you are doing.

Thanks!

I just uploaded a new version.
I have had caching problems with that server. If you have any trouble, holler, and I’ll fix it.

Change log since last version:

FIXED inventory crashes when closed sometimes (as noted in this thread)
FIXED tooltip not under components at bottom row
FEATURE less aliasing around shaded area border, not perfect but maybe better? (as noted in this thread)
FIXED keystroke 5 didn’t work as quick key for gun
FIXED Maggot spawns Egg instead of Cocoon
FIXED Pressing reload when no gun equiped gives NPE
BALANCE Longer Spiker reload
BALANCE Added some later monsters to early levels for more variation <<— This is the reason to try again
FIXED Gun runs in endless reload loop when no ammo left (as noted in this thread)

My immediate todo is like this:
Saving and loading (saving the inventory and map layouts, all monsters and obstacles will respawn).
Configure controls (also persisted so you only have to do it once)
Sound
Challenges
Trading

Then probably some items, like a map scanner, motion scanner and maybe a holographic decoy projector. Armour will enter the game at some point too.

Hi,

Just wanted to say that from the videos the graphics are nice and polished, and the gameplay looks good.

However, I tried running it on my dad’s old dell inspiron 1525 running Vista, and the webstart fails.
That said, it is not my laptop, so my old man may have blocked/uninstalled JVM for all I know :wink:

Thanks!
Did you get any error message? Did you try both fullscreen and no fullscreen?
The first post is edited with instructions on how to run the game from the jar files, if you want to give that a try… :slight_smile:

Implemented a simple save-load functionality using persistence api.
Basically, you create a character (like in an rpg) and it saves every time you switch maps.
Will probably throw some exceptions print some stacktraces that you can ignore.
Will be improved.

Also:
FIXED current inventory lost when dead (now lies scattered at place of death)
FIXED respawned (after death) at beginning of game (now spawns at the last visited exit)
BALANCE when respawned, only one gun is kept, preferably one with infinite ammo
BALANCE when dead, 25% of every ammo is lost, forever
FEATURE Menu system
FIXED Ammo dropped from elite bug not painted