Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  Print  
  An Adventure Game - WIP  (Read 3136 times)
0 Members and 2 Guests are viewing this topic.
Offline Cruiser

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« on: 2011-09-22 17: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.
Online ra4king

JGO Kernel
*****

Posts: 3149
Medals: 196


I'm the King!


« Reply #1 on: 2011-09-22 17: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

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #2 on: 2011-09-22 18: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! Go get 'em!
Offline Cero

JGO Neuromancer
****

Posts: 1050
Medals: 18



« Reply #3 on: 2011-09-22 19: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 Strike Force
***

Posts: 893
Medals: 55



« Reply #4 on: 2011-09-22 21: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.

Online ra4king

JGO Kernel
*****

Posts: 3149
Medals: 196


I'm the King!


« Reply #5 on: 2011-09-23 01: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

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #6 on: 2011-09-23 04: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.
Online ra4king

JGO Kernel
*****

Posts: 3149
Medals: 196


I'm the King!


« Reply #7 on: 2011-09-23 12: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

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #8 on: 2011-09-24 04: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

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #9 on: 2011-09-24 05: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! Go get 'em!
Online ra4king

JGO Kernel
*****

Posts: 3149
Medals: 196


I'm the King!


« Reply #10 on: 2011-09-25 01:20:13 »

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

Try completely uninstalling Java and reinstall.

Offline Cruiser

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #11 on: 2011-09-25 05: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
Online ra4king

JGO Kernel
*****

Posts: 3149
Medals: 196


I'm the King!


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

Nice Smiley

Offline Cruiser

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #13 on: 2011-09-26 13: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

JGO Wizard
****

Posts: 1266
Medals: 19



« Reply #14 on: 2011-09-27 08: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

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #15 on: 2011-09-27 08: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

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #16 on: 2011-10-24 14: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
***

Posts: 674
Medals: 16


Directly directional


« Reply #17 on: 2011-10-24 23:05:27 »

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

Offline Cruiser

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #18 on: 2011-10-25 03: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

JGO Wizard
****

Posts: 1391
Medals: 88



« Reply #19 on: 2011-10-25 04:30:31 »

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

There is no god.
Offline Cruiser

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #20 on: 2011-10-25 04: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
***

Posts: 674
Medals: 16


Directly directional


« Reply #21 on: 2011-10-26 17: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

JGO Wizard
****

Posts: 1391
Medals: 88



« Reply #22 on: 2011-10-27 05: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.)

There is no god.
Offline Nyhm

Full Member
**

Posts: 143


Island Forge


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

I love retro adventure/RPG games - nicely done.

Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #24 on: 2011-11-20 18: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
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


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

Very cool! Smiley

Kev

Offline Cruiser

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #26 on: 2012-01-01 14: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

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #27 on: 2012-04-11 13: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

Full Member
**

Posts: 143


Island Forge


« Reply #28 on: 2012-04-11 14: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...

Offline Cruiser

JGO n00b
*

Posts: 34
Medals: 1


Twitter: @totallymorten


« Reply #29 on: 2012-04-11 14: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
  Print  
 
 
Jump to:  


Add your game by posting it in the showcase section.

The first screenshot will be displayed as a thumbnail.

obsidian_golem 2012-05-23 10:14:50

Danny02 2012-05-21 17:10:34

Danny02 2012-05-21 17:07:10

Danny02 2012-05-21 16:56:12

davedes 2012-05-21 13:59:23

obsidian_golem 2012-05-20 20:28:41

darkjava55 2012-05-12 16:14:40

Ultroman 2012-05-12 09:36:05

Ultroman 2012-05-11 22:49:53

Ultroman 2012-05-11 22:20:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.093 seconds with 19 queries.