Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
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  
  Targets  (Read 6673 times)
0 Members and 1 Guest are viewing this topic.
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Posted 2012-10-06 21:13:31 »

[size=12pt]I have just started on a small game called Targets which involves the player shooting different targets that pop up. It is my first game which has been to this level of completion, I am also inexperienced with java so please understand if I don't get everything people say to me. Please post any bugs/errors/problems you find and I will try to fix them. I have tried to export it so it is runnable on linux, mac and windows so it should work.

I hope you have fun playing![/size]

[size=16pt]Screenshots:[/size]

[size=16pt]Controls:[/size]
[size=12pt]Mouse - Aim
Clicking - Selection/Shooting
R - Reloading
P - Pause Game

*Go to options to change game mode and autoreloading and to reset data*[/size]

[size=16pt]Dowload Links: [/size]
[size=12pt]Play Online [/size]
[size=12pt]13/10/12 1.6 [/size]

[size=16pt]Changes [/size]
[size=12pt]
1.6 Added basic animations(need to look better) for shooting and hitting targets
      Added bullet marks on the background when you shoot
      Highscore arrows light up when hovered over

1.5 Added a new Gamemode 'Hardcore' (Toggle gamemodes in options from the menu)
      Added hardcore highscores
      Improved the graphics for the main menu, options, help and the highscores page.
      Improved the method for spawning/disappearing targets

1.4 Improved saving method
      Added local hiscore saving and updating
      Added a new upgrade(single use slows disappearing time for targets)

1.3 Added Basic Saving Mechanism
      Added an icon for the game screen
      Slightly improved the texture of the background

1.2 Added sounds
     Added life losses
     Added target timing disappearing
     Added Gamover screen
     Improved the menu slightly
     Game gets harder as you go through levels
     Added more levels[/size]



[size=16pt]To-Do List: [/size]
[size=10pt]
Done
Partially done/working on
Not started[/size][size=12pt]


 * Add more upgrades
 * Have better drawn graphics
 * Add animations to the game
 * Upload the game as an applet so it's easier to play/remove needs for downloading
 * Add a gamemode which you play non-stop until you lose
 * Implement a working local hiscore system
 * Remove the cursor and still be able to change sights
 * Add life losses
 * Add disappearing target timing
 * Implement working sound
 * Add more levels
 * Add different difficulties
 * Add a method for saving and loading variables
[/size]

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Gjallar

JGO Coder


Medals: 13
Projects: 1


Follower of Nurgle


« Reply #1 - Posted 2012-10-07 09:09:11 »

Gave it a go, works fine but it really lacks sound, games like this kinda need that as a feedback that you did something
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #2 - Posted 2012-10-07 10:05:04 »

Thanks for the criticism, I have added sounds for shooting and for when the gun has no ammo.  I'm currently working on timings for appearing and disappearing.

I'm a java noob, but I'm learning. My little blog. My Games.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #3 - Posted 2012-10-07 19:50:28 »

Updated the game to version 1.2,
Changes:
     Added sounds
     Added life losses
     Added target timing disappearing
     Added Gamover screen
     Improved the menu slightly
     Game gets harder as you go through levels
     Added more levels

I am now going to work on more customizability from the user such as game hardness/extras etc.
I am also going to try to create saving and loading so the player can keep hiscores and items/upgrades.

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #4 - Posted 2012-10-08 20:22:27 »

New Update to 1.3
      Added Basic Saving Mechanism
      Added an icon for the game screen
Slightly improved the texture of the background

The saving mechanism is still very basic, but works and the user can reset their upgrades money etc in the options menu.

My next stage of development will be in better graphics and more graphics for the game play.

Also, the disappearing is not 100% working as sometimes when there are no targets on the screen or a target hasn't disappeared, a life is randomly lost which is completely confusing me but I'm trying to resolve this.

Please let me know what you think of the game, every little criticism helps!

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #5 - Posted 2012-10-09 19:08:04 »

Fixed disappearing problems, now runs much more smoothly, see if you can beat my best score so far of 542, post scores etc if you want!

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #6 - Posted 2012-10-09 20:10:51 »

How do you kill them so fast? I can't even click one because they disappear in ~0.5 seconds =(
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #7 - Posted 2012-10-09 20:30:56 »

How do you kill them so fast? I can't even click one because they disappear in ~0.5 seconds =(

The timings on level1 were just under 2 seconds and progress very slowly per round, I have increased the timings now so it should be easier at the start.

I am using a mouse with my laptop, so i would imagine not having a mouse would make this game much harder.

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #8 - Posted 2012-10-10 16:10:01 »

Added a new local hiscore system and also a new upgrade which slows the timing of the targets disappearing, it only lasts for one round though!

Trying to find a way to make the file smaller as it's currently 10mb in size:/

I'm a java noob, but I'm learning. My little blog. My Games.
Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #9 - Posted 2012-10-10 16:16:39 »

Added a new local hiscore system and also a new upgrade which slows the timing of the targets disappearing, it only lasts for one round though!

Trying to find a way to make the file smaller as it's currently 10mb in size:/

Png crush can minify the png images by 30-90% http://pmt.sourceforge.net/pngcrush/index.html
It really helps alot, i guess you will have atleast 50% profit in total.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #10 - Posted 2012-10-10 16:21:56 »

Added a new local hiscore system and also a new upgrade which slows the timing of the targets disappearing, it only lasts for one round though!

Trying to find a way to make the file smaller as it's currently 10mb in size:/

Png crush can minify the png images by 30-90% http://pmt.sourceforge.net/pngcrush/index.html
It really helps alot, i guess you will have atleast 50% profit in total.

Ahh thankyou, I'll check it out now, I've managed to reduce the file size to slightly over 5mb, I realised I was adding the libraries twice. Noob error;)

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #11 - Posted 2012-10-10 16:27:35 »

I assure you I am not getting any two seconds.

Actually I just figured it out, when I fraps it (Which auto-locks framerate) I get MUCH longer, but without fraps I get between 3k and 5k fps and barely even see the objects.

Your logic depends of FPS, which means on my fairly fast computer I get entirely different gameplay then on a slower computer. [Also I can tell fraps to lock it at 1 fps and win =D]
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #12 - Posted 2012-10-10 16:29:20 »

I assure you I am not getting any two seconds.

Actually I just figured it out, when I fraps it (Which auto-locks framerate) I get MUCH longer, but without fraps I get between 3k and 5k fps and barely even see the objects.

Your logic depends of FPS, which means on my fairly fast computer I get entirely different gameplay then on a slower computer. [Also I can tell fraps to lock it at 1 fps and win =D]

Is there a way I can set the timer I'm using to change depending on say the FPS? Or is that not possible...

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #13 - Posted 2012-10-10 16:42:22 »

You should not be using a timer based on the fps in the first place.

java.util.Timer
javax.swing.Timer / java.awt.Timer [For java2d]


your own implementation of Timer
Using delta time [Preferred]
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #14 - Posted 2012-10-10 16:51:28 »

You should not be using a timer based on the fps in the first place.

java.util.Timer
javax.swing.Timer / java.awt.Timer [For java2d]


your own implementation of Timer
Using delta time [Preferred]

I was using java.util.Timer anyway, I just had one part in the slicks update method, re-uploaded it, can you see if its made any difference for you?

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Tjstretchalot

Junior Member


Medals: 2
Projects: 1



« Reply #15 - Posted 2012-10-10 21:28:40 »

Much better! I can actually kill stuff now =) [How do you reload btw?] However, you should consider using delta time, in slicks update method it would look like:

1  
2  
3  
update#delta
  for each entity
    entity life remaining -= delta
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #16 - Posted 2012-10-10 21:36:15 »

Much better! I can actually kill stuff now =) [How do you reload btw?] However, you should consider using delta time, in slicks update method it would look like:

1  
2  
3  
update#delta
  for each entity
    entity life remaining -= delta


To reload press R or SPACE, it does say this in the help section of the menu.

Ah I might try that, at the moment I'm doing a start time when the target spawns and when that time is the same as the delay time, the target disappears. My code isn't the best, so when I've got the game almost finished, i'm going to try to neaten and improve the code.

Thanks for all the help btw!

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #17 - Posted 2012-10-11 17:34:52 »

Updated the game
1.5 Added a new Gamemode 'Hardcore' (Toggle gamemodes in options from the menu)
      Added hardcore highscores
      Improved the graphics for the main menu, options, help and the highscores page.
      Improved the method for spawning/disappearing targets

In Hardcore mode, you start with 10 ammo and 5 lives and play continuously(unless paused/quit) until you lose all 5 lives. This can be toggled on/off in the options menu. I have also tried to improve the graphics for some screens, although they're still not great since I'm a terrible artist:/

Feel free to post scores and please let me know what you think and any areas I could improve on!

I'm a java noob, but I'm learning. My little blog. My Games.
Offline StumpyStrust
« Reply #18 - Posted 2012-10-11 18:13:26 »

Here is some feedback on your menu/graphics.

The game graphics look fine. Maybe add in some effect where you shoot like sparks or something to make the game feel more responsive. Could have it where each site has a different effect when you shoot.

Please make the targets blow up all over the place when you hit them.

The new menu layout is fine although the buttons could loose the white flare inside them.

Also, the background has too much going on taking your eyes away from the text in the options menu so maybe tone that down a little.

This last one you can choose to do or not. Most buttons will highlight or something if you scroll over them. To simulate this without added resources just set the buttons transparency to 80% or so and then make them non transparent when you scroll over them.

If you don't know how to set transparency look up Alpha Composites.

Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #19 - Posted 2012-10-11 18:25:15 »

Here is some feedback on your menu/graphics.

The game graphics look fine. Maybe add in some effect where you shoot like sparks or something to make the game feel more responsive. Could have it where each site has a different effect when you shoot.

Please make the targets blow up all over the place when you hit them.

The new menu layout is fine although the buttons could loose the white flare inside them.

Also, the background has too much going on taking your eyes away from the text in the options menu so maybe tone that down a little.

This last one you can choose to do or not. Most buttons will highlight or something if you scroll over them. To simulate this without added resources just set the buttons transparency to 80% or so and then make them non transparent when you scroll over them.

If you don't know how to set transparency look up Alpha Composites.

I was thinking of maybe having a small effect when the player fires.

Blowing up the targets is a possibility, but will probably low on my priorities right now.

I just need a simple background which isn't just a single colour and isn't too overbearing, I'm bad when it comes to aesthetics of things.

I'll try to see about that transparency.

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #20 - Posted 2012-10-12 22:55:33 »

Uploaded an applet which can be played here.

Lwjgl applets are a pain... If anyone knows how to get a slick/lwjgl applet into just one jar file and or a HTML file, could you please let me know.

I'm a java noob, but I'm learning. My little blog. My Games.
Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #21 - Posted 2012-10-13 14:49:52 »

Updated to 1.6
Changes:
      Added basic animations(need to look better) for shooting and hitting targets
      Added bullet marks on the background when you shoot
      Highscore arrows light up when hovered over

The applet hasn't been updated yet, I'll do that in a bit, but the downloadable version has been, The animations for hitting the targets isn't very good, so I'm going to need to make that look nicer. Unless anyone here is good with animations, I could send you the target picture and you could do the different frames.

I'm a java noob, but I'm learning. My little blog. My Games.
Offline StumpyStrust
« Reply #22 - Posted 2012-10-13 18:12:50 »

I could try my hand at target animations.

What do you want?

Offline 65K
« Reply #23 - Posted 2012-10-13 18:19:23 »

I got this on startup:
java.io.IOException: unsupported interlace method
        at org.newdawn.slick.opengl.PNGImageData.readIHDR(PNGImageData.java:398)
        at org.newdawn.slick.opengl.PNGImageData.init(PNGImageData.java:106)
        at org.newdawn.slick.opengl.PNGImageData.loadImage(PNGImageData.java:680)
        at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:62)
        at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:43)
        at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:277)
        at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:231)
        at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:171)
        at org.newdawn.slick.Image.<init>(Image.java:196)
        at org.newdawn.slick.Image.<init>(Image.java:170)
        at org.newdawn.slick.Image.<init>(Image.java:158)
        at org.newdawn.slick.Image.<init>(Image.java:136)
        at javagame.Menu.init(Menu.java:80)
        at javagame.Game.initStatesList(Game.java:53)
        at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:164)
        at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:390)
        at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
        at javagame.Game.main(Game.java:70)

Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #24 - Posted 2012-10-13 19:45:17 »

I could try my hand at target animations.

What do you want?

Just two separate animations of the target smashing/exploding as it is shot, one for when the head of the target is hit and another for when the body is hit. I'll pm you a link to the image, feel free to re-design the target if you want. Thanks for the help though.

I got this on startup:
java.io.IOException: unsupported interlace method
        at org.newdawn.slick.opengl.PNGImageData.readIHDR(PNGImageData.java:398)
        at org.newdawn.slick.opengl.PNGImageData.init(PNGImageData.java:106)
        at org.newdawn.slick.opengl.PNGImageData.loadImage(PNGImageData.java:680)
        at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:62)
        at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:43)
        at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:277)
        at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:231)
        at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:171)
        at org.newdawn.slick.Image.<init>(Image.java:196)
        at org.newdawn.slick.Image.<init>(Image.java:170)
        at org.newdawn.slick.Image.<init>(Image.java:158)
        at org.newdawn.slick.Image.<init>(Image.java:136)
        at javagame.Menu.init(Menu.java:80)
        at javagame.Game.initStatesList(Game.java:53)
        at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:164)
        at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:390)
        at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
        at javagame.Game.main(Game.java:70)


From my google search of this, I'm guessing you're running OSX? I can't see how I could prevent this, if anyone reading this could offer any help that would be much appreciated. I have an idea but I doubt it will work, I'll upload a file in a minute testing it.

EDIT: Try playing here and see if this works: http://gamejolt.com/games/quick-play/10067/

I'm a java noob, but I'm learning. My little blog. My Games.
Offline StumpyStrust
« Reply #25 - Posted 2012-10-14 02:52:10 »

Well based off of your current target this is what I got for a head shot.

http://gifninja.com/animated-gifs/339967/target

Don't know how to post a gif so....  I am use to doing most things with particles so this was different. I could add some sparks but I do not know exactly what the targets are made of. Wood would splinter more. Also, I do not know how many frames you want. Less means less memory/dl size but loss in quality.

Offline 65K
« Reply #26 - Posted 2012-10-14 06:59:40 »

I use Windows 7 with the latest Java 7. But the game runs anyway.

Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #27 - Posted 2012-10-14 08:04:28 »

Well based off of your current target this is what I got for a head shot.

http://gifninja.com/animated-gifs/339967/target

Don't know how to post a gif so....  I am use to doing most things with particles so this was different. I could add some sparks but I do not know exactly what the targets are made of. Wood would splinter more. Also, I do not know how many frames you want. Less means less memory/dl size but loss in quality.

That looks really nice!Thanks so much! I'd guess the targets could be made from a clay type material so it shatters like a plate would, but what you've done looks really good!

Edit: I downloaded the gif and extracted the different frames, do you have a better quality version/set of frames on your pc? If not I can always recolor the targets slightly.

I'm a java noob, but I'm learning. My little blog. My Games.
Offline StumpyStrust
« Reply #28 - Posted 2012-10-14 09:21:25 »

yup.

http://www.mediafire.com/?pn291uwapu7tyi2

8 frames all .png format.

I could do a few different versions for some variety. Want me to do one for the center? I don't think I will have it shatter from center as you may not always hit there but instead have it sort of explode with no main center point as it will look more realistic.

Offline Huw

Senior Member


Medals: 1
Projects: 2



« Reply #29 - Posted 2012-10-14 09:35:12 »

yup.

http://www.mediafire.com/?pn291uwapu7tyi2

8 frames all .png format.

I could do a few different versions for some variety. Want me to do one for the center? I don't think I will have it shatter from center as you may not always hit there but instead have it sort of explode with no main center point as it will look more realistic.

Doing one for the center would be great, and yeah, not having a center point would look better.

EDIT: I'm rushing out now, I'll upload the game with your animation later and you can see how it looks:)

I'm a java noob, but I'm learning. My little blog. My Games.
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.

atombrot (22 views)
2014-08-19 09:29:53

Tekkerue (22 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (57 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (29 views)
2014-08-08 02:01:56

Norakomi (36 views)
2014-08-06 19:49:38

BurntPizza (66 views)
2014-08-03 02:57:17
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!