An Adventure Game - WIP

*** EDITED 2012-04-12 - 18:00 CET ***

Hi all,

this is my first Java game ever. I’m kinda going for the 2D Zelda / retro look, and aiming for something inspired by Minecraft and Legends Of Yore.

The graphics are very poor, yes, but I’m making everything myself, and I’m no artist :-D.

Right now you can run around in a randomly generated landscape and kill Zombies which are generated from gravestones. This mini game is just a test of my small engine, so that playing it now will already make some kind of sense. Further down the road I would like to add a lot of RPG elements and survival stuff like hunting for food and building your own shelter etc…

Please check it out, I would be thankful for any kind of feedback:

main site (change log): http://www.indiedeveloper.dk/adventure.html
zip download (v0.3.0 - Latest multiplayer version): http://www.indiedeveloper.dk/adventure-030.zip
web start (v0.2.4 - Old Single Player): http://www.indiedeveloper.dk/adventure-024.jnlp
jar download (v0.2.4 - Old Single Player): http://www.indiedeveloper.dk/adventure-024.jar

Instructions:

  • Movement - arrow keys
  • Hit / attack - move into enemy (zombie)
  • You heal when stamina is 100% and standing still
  • Zombies are more aggressive at night
  • Gravestones spawn zombies

http://www.indiedeveloper.dk/adventure.png

Latest changes:

version 0.3.0 - 2012-04-11 18:21 CET

  • Fixed - Map sizes != 50x50 were not working
  • Fixed - All other keys now disabled in game
  • Added - Implemented multiplayer capability!! (A hell of a lot of changes)
  • Added - MasterZombies!!! Extra powerful zombie spawns every 2’nd night. (Only one can exist at a time)
  • Added - Info console
  • Changed - Map size now 100x100 tiles

Latest update post (from me):

Wheew! Finally I have something to show. I succeeded “somewhat” in implementing basic multiplayer capability in my game!! :slight_smile:

You can download the zip file from my site in the first post. Or the direct link below:
zip download (v0.3.0 - Latest multiplayer version): http://www.indiedeveloper.dk/adventure-030.zip

Note, this is a multiplayer version, and cannot be played directly from your browser.
Short instructions are as follows:

  1. download the ZIP (v0.3.0)
  2. unzip it somewhere
  3. run start_server.bat OR “java -cp adventure-030.jar adventure.server.AdventureServer”
  4. run start_client.bar OR “java -jar adventure-030.jar player1 localhost 5555”

I think performance will suck on a WAN but on LAN it seems to work ok.

Thanks,
Morten.

Pretty neat game!
The graphics and the sound were actually really fine :slight_smile:

I noticed one bug with the random world generator, twice I spawned on water or on land surrounded by water so I couldn’t move at all.

Also the movement got really annoying as any more than 3 steps and the “speed” would be depleted (don’t you mean energy?).

Keep up the great work!

EDIT: Why does it need a security prompt in the beginning? Also why is Windows only supported? Unless you use classes only available in 1.6 and/or syntax that is only in 1.6, this game could work even with a 1.4 JVM

Thanks a lot for your nice feedback! :slight_smile:

Yes, I will look into the spawn difficulties, and I also noticed that gravestones can spawn right outside the screen - which is quite inconvenient :-).

I think that my first enhancement should be that ability to cut down trees and make a fire. This is necessary because I’m making zombies stronger and faster at night (in darkness), so you should go for cover in the evening and stay in the light!

And yes, you are so right about the speed. It needs some balancing and some renaming maybe. The point was that stamina is your overall “tiredness” and the speed is your ability to make fast consecutive movements… I can see how annoying it gets, so maybe a little bit more.

About the security prompt, I think that when using java web start, then jars should be signed, and mine is only a “self-signed” non-trusted certificate, but there might be another way…

And about the JVM, I can’t get it to play on linux with:
java version “1.6.0_26”
Java™ SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot™ 64-Bit Server VM (build 20.1-b02, mixed mode)

But I haven’t looked into that problem at all. Might be easy to solve.

Again, thanks for your feedback, really appreciated!
M.

EDIT: Aha! found the error on linux:

loadSound(/snd/hit3.wav)
loadSound(/snd/hit4.wav)
loadSound(): javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian not supported.

Back to the drawing board!!!

Maybe it should stop while not focused.
I started it, did some surfing while it was running, suddenly a wolf howl =D
But yea that night feature is nice, you’re scared because you can’t see shit.

Also

http://img268.imageshack.us/img268/9061/79314991.jpg

Dat AI. ;D

Coolness! Might I give a teeny bit of advice tho? Darken or otherwise mute the green on the grass – fields of fully saturated green tend to really overwhelm the eyes and make it harder to see other objects.

When using web start or applets, the only reason to sign your jars is if you are:

  1. connecting to an IP address other than the originating server
  2. local file IO
  3. native code

For this game, I’m assuming you are using Java2D, all assets are packaged inside the jar, and you aren’t connecting to any servers, so there is no need to sign the jars :smiley:

Yeah, I also thought that, but when I tried to upload a unsigned jar, and run it with Java Web Start, then it wont run because it’s “unsigned”.

I will definitely change all the graphics. These are just placeholders, so I can test some form of gameplay quickly :-). Good point though.

Yeah, the AI sucks right now, but I have a lot of plans to expand it. It will be one of the next things to do. Some basic pathfinding will do wonders :-D.

Thanks guys,
Morten.

It shouldn’t be saying that. If you are using restricted code and you have not signed the jar, the app should still run but the restricted code would throw an AccessControlException.

How do you set it up?

Hmm, I don’t know really… I just use a basic jnlp file (you can download it and see it, if you want), and if I don’t sign the JAR, and then try to launch it using the Java Web Start, then I get the following error:

com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://www.indiedeveloper.dk/adventure.jar
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
at com.sun.javaws.security.SigningInfo.check(Unknown Source)
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
at com.sun.javaws.Launcher.prepareResources(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

New version up, just small “balancing” changes:

version 0.2.1 - 2011-09-24 11:00 CET

  • increased sight at night
  • decreased the “speed” cost of moving

Will do a functionality update tomorrow with some new stuff in it :-P.

It must be your system then because that JAR runs fine on my computer.

Try completely uninstalling Java and reinstall.

I solved the problem. The problem was in the JNLP file. I required “all-permissions” becuase I just copied a standard JNLP file. No I changed it to “no-permissions” in “security” and I’m not signing the JAR anymore :-).

And v0.2.2 is up, just some balancing again + small fix:

version 0.2.2 - 2011-09-25 10:58 CET

  • fixed zombies and gravestones allowed outside the map edges
  • removed signing on jar
  • balanced fighting a bit. Now zombies are harder to kill
  • decreased the “speed” cost of moving again

Nice :slight_smile:

Right now I’m messing around with the AI for the zombies. I’m implementing the A* algorithm for navigating, but only if they get stuck trying to get to their enemies.

It’s working, but it’s using way too many cycles. An example is that for a small path (4 moves) it’s sometimes using 62ms, which is a lot. It might help to reduce logging, but still!

I’m splitting the calculations over several updates to compensate for this CPU usage, and I’m implementing a pathfinding queue, where zombies can register if they want to calculate.

I’ll be back! :-P.

JAR ran fine. Just one little problem, I have 1380x768 monitor and it seems you game is too tall. Like the night effect.

Thanks a lot for your comment :slight_smile:

Yeah, this is just an early test (like everything else I’ve ever made, but I hope I’ll make it this time :P), so until I implement a resolution selector I will reduce the size to 1000 x 600. Good point.

Ok so v0.2.3 is up (look at first post for link to game and changelog).

version 0.2.3 - 2011-10-24 19:43 CET

  • disabled sound on linux and mac systems. Now working without sound.
  • added threaded A* search algorithm to zombies. They can now do pathfinding!!!
  • zombie reaction time balancing (made harder)
  • changed color of health bar, now background more visible

Finally got the time to implement a proper A* algorithm for the Zombies. I have implemented it threaded, so it will spawn threads corresponding to your core/cpu count. I implemented it as a service, so Zombies “request” a calculation from a to b, and they will wait until result is available. It works pretty well but needs to be tweaked. Zombies needs to re-check if target is near pretty often and cancel their pathfinding.

Comments greatly appreciated!!

Thanks,
Morten.

I do dig the domain ending in .dk :smiley:
Nice game, ran fine.

He he, tak skal du have, ja, det er rart at støde på andre danskere en gang imellem :-).

Thanks for your feedback!

Gah! Ingen danska i mitt Java-forum! T_T
(No Danish in my Java forum!)