Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (578)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  An Adventure Game - WIP  (Read 9965 times)
0 Members and 1 Guest are viewing this topic.
Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Posted 2011-09-22 21:36:31 »

*** 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



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!! :-)

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.
Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #1 - Posted 2011-09-22 21:53:20 »

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

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

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #2 - Posted 2011-09-22 22:22:54 »

Thanks a lot for your nice feedback! :-)

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(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 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!!!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Cero
« Reply #3 - Posted 2011-09-22 23:35:09 »

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

Dat AI. Grin

Offline sproingie

JGO Kernel


Medals: 202



« Reply #4 - Posted 2011-09-23 01:02:49 »

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.

Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #5 - Posted 2011-09-23 05:02:35 »

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...
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 Cheesy

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #6 - Posted 2011-09-23 08:36:09 »

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 Cheesy

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".


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.

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


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
Dat AI. Grin

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.
Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #7 - Posted 2011-09-23 16:09:55 »

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?

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #8 - Posted 2011-09-24 08:53:46 »

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)
Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #9 - Posted 2011-09-24 09:06:15 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #10 - Posted 2011-09-25 05:20:13 »

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

Try completely uninstalling Java and reinstall.

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #11 - Posted 2011-09-25 09:04:25 »

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
Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #12 - Posted 2011-09-25 09:07:15 »

Nice Smiley

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #13 - Posted 2011-09-26 17:19:53 »

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.
Offline ReBirth
« Reply #14 - Posted 2011-09-27 12:11:35 »

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

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #15 - Posted 2011-09-27 12:40:19 »

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  Smiley

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

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #16 - Posted 2011-10-24 18:14:35 »

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.
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #17 - Posted 2011-10-25 03:05:27 »

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

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #18 - Posted 2011-10-25 07:08:19 »

I do dig the domain ending in .dk  Cheesy
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!
Offline theagentd
« Reply #19 - Posted 2011-10-25 08:30:31 »

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

Myomyomyo.
Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #20 - Posted 2011-10-25 08:49:49 »

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

He he, sorry for my moment of weakness :-). Nice Swedish from google translate btw :-).
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #21 - Posted 2011-10-26 21:05:54 »

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

He he, sorry for my moment of weakness :-). Nice Swedish from google translate btw :-).

He may be swedish actually Cheesy There's a surprising amount of european people in here Smiley

Offline theagentd
« Reply #22 - Posted 2011-10-27 09:17:02 »

...
Insulting my native language, are we?
Jag kan självklart svenska and I'm pretty fluent at English too. 日本語もちょっとわかります。 (Nihongo mo chotto wakarimasu.)

Myomyomyo.
Offline Nyhm

Senior Duke


Medals: 3
Projects: 1


Island Forge


« Reply #23 - Posted 2011-11-16 16:25:14 »

I love retro adventure/RPG games - nicely done.

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #24 - Posted 2011-11-20 23:53:22 »

Sound works fine on OS X, but ... the rendering is broken.

It's just one big blank grey window, until you drag resize it, at which point it flickers HORRIBLY between grey and the game, and when you let go, it just displays the game correctly, and it's fine from there.

So ... I think you need to look at your Java2D initialization, and also: that flickering on resize suggests you're not using J2D framebuffer correctly.

malloc will be first against the wall when the revolution comes...
Offline kevglass

JGO Kernel


Medals: 191
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #25 - Posted 2011-11-21 09:06:09 »

Very cool! Smiley

Kev

Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #26 - Posted 2012-01-01 19:31:11 »

Hi all, thx for commenting in this thread.

@Kevin, I'm honored by your comment! :-).

I've been busy with implementing multiplayer capability in this game, and so far it's going pretty well.

I made a small update though, to polish this state of the game a little bit. Heres the news:

* Fixed - keys sometimes not working.
* Fixed - threading synchronization problem in AStar service.
* Added - basic levelling system for main character.
* Changed - light calculation algorithm of tiles changed. Now using dynamic buffer.

Hope I will have some updates soon.
Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #27 - Posted 2012-04-11 17:00:56 »

Wheew! Finally I have something to show. I succeeded "somewhat" in implementing basic multiplayer capability in my game!! :-)

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. Here's a quick high level listing of 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
Offline Nyhm

Senior Duke


Medals: 3
Projects: 1


Island Forge


« Reply #28 - Posted 2012-04-11 18:10:26 »

Let me be the first to congratulate you on your updates. I liked your approach to this from the beginning (even though I always got hopelessly overrun with zombies). Network code is one of my favorite things to do, so that's a really exciting update. I'm going to play with it later this evening...

Island Forge: Create Islands with Stories for Others to Explore!
Free-to-Play with Membership and Upgrade options!
Offline Cruiser

Junior Duke


Medals: 1
Projects: 1


Twitter: @totallymorten


« Reply #29 - Posted 2012-04-11 18:18:09 »

@Nyhm - Thanks for you comment :-)

I can tell you that the networking code is probably hopeless, and my code needs a lot of cleaning up.

If anybody's interested, I will probably post my source code here, in case anybody could teach my something. I am also very interested in network programming, and it seems like it's one of the most challenging areas in gamedev.

My next big step will be to move from discrete movement to fluent motion. But then I will have to optimize my networking, maybe move to UDP and introduce interpolation and prediction.... (swallows) .... ehm, seems like a lot of work :-D.

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

DarkCart (16 views)
2014-10-31 21:44:48

DarkCart (21 views)
2014-10-31 21:43:57

TehJavaDev (40 views)
2014-10-27 03:28:38

TehJavaDev (31 views)
2014-10-27 03:27:51

DarkCart (44 views)
2014-10-26 19:37:11

Luminem (27 views)
2014-10-26 10:17:50

Luminem (30 views)
2014-10-26 10:14:04

theagentd (36 views)
2014-10-25 15:46:29

Longarmx (64 views)
2014-10-17 03:59:02

Norakomi (62 views)
2014-10-16 15:22:06
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!