Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Retro  (Read 3035 times)
0 Members and 1 Guest are viewing this topic.
Offline StumpyStrust
« Posted 2013-08-08 06:16:31 »

Retro is a game that will attempt to recreate the old school shooter feeling.

I wanted to do a kickstarter on this game then realized that the game was NO where at that level and that I would rather let everyone enjoy the game or what there currently is.

Controls:
a,w,s,d move.
Use mouse to click and shoot. It will take a few shots to kill stuff
control + s = screenshot

Download
http://www.mediafire.com/download/tdwg5k9t3e530m7/Retro.jar

<a href="http://www.youtube.com/v/-nb0AGGCCg8?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/-nb0AGGCCg8?version=3&amp;hl=en_US&amp;start=</a>

Screens:




Hair Styles


Bloom On

Bloom Off


There are a bunch of settings in the game and even more in the profile created located in your default user directory.

This is basically an experiment to see if I can get a bunch of game design features working. Level editor, good enough lighting, fx, load/save levels, load/save user settings, load/save gamestate/stats, etc etc etc.

I have tested it on 4 computers and it runs ok but all were windows so...we will see.


Offline seann999

Junior Member


Medals: 1
Projects: 2



« Reply #1 - Posted 2013-08-08 07:05:09 »

Maybe I missed the instructions (I read the controls), but I didn't really know what to do. Also the restricted vision was a bit annoying.
Aside from that the visuals and audio are great. Not that there isn't, but there's not much I can think of to improve on.
Offline Troncoso

JGO Coder


Medals: 20



« Reply #2 - Posted 2013-08-08 07:44:16 »

I agree about the controls thing. I got power ups for more damage and faster fire rate? But I had no idea how to actually inflict any damage.

He does give you the options to turn off the lighting and bloom effects in the menu. With all the effects on, it felt like Lone Survivor. I did think that having the lighting effects on made it more challenging, as you couldn't see some of the platforms you were trying to jump to.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline StumpyStrust
« Reply #3 - Posted 2013-08-08 07:55:43 »

Use mouse and click to shoot. Guess I should make that more clear.

Offline kpars

JGO Ninja


Medals: 57
Projects: 4
Exp: 2 years


Kemoy Labs/Radirius Game/Engine Developer


« Reply #4 - Posted 2013-08-08 09:16:39 »

I like it.

And indeed, the controls need reworked a bit.
Think about what the user expects to do. They shouldn't need a controls manual unless there is a certain mechanic that the player doesn't expect to see.

"Living is easy with eyes closed, misunderstanding all you see. It's getting hard to be someone, but it all works out." ¤¤ Kemoy Labs: http://www.kemoy.net/
Offline josephknight

Junior Newbie





« Reply #5 - Posted 2013-08-08 18:10:39 »

I absolutely love this. Playing in a window, however, caused me to lose the game (he was stuck running into enemies when I accidentally clicked away). Fullscreen is sluggish on my Macbook Air, not sure what can be done, pretty sure it has to do with the intensive blurring in the blooms. Not the same with them turned off.

The particle effects are, to me, the most impressive feature. They really set the physical feel.

Would you be so kind as to share a snippet of source for these or point us in the direction of some sites you used for inspiration/code snippets yourself?

Thank you for sharing this game with us. I think it's cool that you were realistic about the kickstarter, but it's quite obvious that you have a strong foothold on java game programming and could bring a developed concept to fruition. Best of luck to you.
Offline StumpyStrust
« Reply #6 - Posted 2013-08-09 08:36:52 »

I am not sure how I could rework the controls. a,s,w,d to move and mouse to shoot. What else could I do? Arrow keys would be fine. I could include a config file where you could bind your own?  Undecided

@josephknight
Thanks man means a bunch. Hmm...I will look into the window mode switching. For fullscreen, try turning the quality option off. (should be off by default) It uses a faster Gaussian blur algorithm that I really don't even understand. I found it online while googling for fast Gaussian blur algorithms. The bloom is the biggest slow down as java2D does not support anything of the such. Dropping dynamic lights also is a nice speed boost that will let you keep the bloom. I have a baked light system is used to keep some "fake" dynamic lights going. This game really is like the holy grail for all java2D hacks. You could also find the config file and reduce the internal resolution. It is set at 420x420. You could easily drop to 400x400. I am not sure where mac stores their user directory.

I made all the particle and physics stuff up on my own. What part would you like to see? The bouncing physics or how the particles work?

Offline josephknight

Junior Newbie





« Reply #7 - Posted 2013-08-09 22:05:00 »

I've done particles before and usually experience serious slowdowns before optimization. I have recently looked into data oriented design via non-inherited entity systems like Artemis. Do you use any such data oriented methods in these particles? Also what are they bouncing against? Per-pixel collision or is it, as I suspect, some kind of rectangular bounding box in the floor and walls?

Your particles seem really fast and ample. Great job. I find your DIY creativity quite inspiring. Anything you are willing to share, even if only privately, would go a long way towards my project:

http://josephknight.com/the-lonely-alien-stumbles-onto-an-ancient-relic/

Best wishes to you on your current/next work.
Offline seann999

Junior Member


Medals: 1
Projects: 2



« Reply #8 - Posted 2013-08-09 23:30:09 »

Are the caterpillar things immune to shooting?
Offline StumpyStrust
« Reply #9 - Posted 2013-08-10 08:59:26 »

Are the caterpillar things immune to shooting?

Absolutely not. Your weapon does 1 damage starting out and is a little inaccurate. You will be able to permanently upgrade weapons after each level. The crawler things have hp ranging from 8-12. I may change things a little. Balance is a work-in-progress. Wondering if anyone has found the shotgun in the level? And then maybe use it with some other powers you can get.  Wink



Particles are super simple. Keeping things simple will keep things fast. Here is basically the particle class from the game.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
   protected Vector2 loc;
   protected Vector2 vel;
   protected Vector2 acc;
   //private Vector2 rot;
  protected Vector2 size;
   protected Vector2 maxSize;
   protected Vector2 growth;
   protected Vector2 life;
   private Color color;
   public double friction = 1;
   
   protected boolean ultSize = false;
   protected boolean defaultSize = true;
   public boolean fadeIn = false;


The Vector2 class is basically a vector2f opengl type class that holds to doubles and has some nice vector math methods. Protected vars as I have some place hold particle sub-classes. PhysicsParticle, Image Particle, AnimatedParticle etc.

Update method.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
   public boolean update(){
      vel.add(acc);
      loc.add(vel);
      size.add(growth);
      if(fadeIn)
         life.x++;
      else
         life.x--;
     
      vel.x *= (friction);
      vel.y *= (friction);
     
      /*rot.x += rot.y;
      if(rot.x > 360)
         rot.x = 0;
      if(rot.x < 0)
         rot.x = 360;*/


      if(life.x <= 0){
         life.x = 0;
         return true;
      }
      if(fadeIn)
         if(life.x >= life.y)
         {
            life.x = life.y;
            fadeIn = false;
         }
     
      if(defaultSize){
         if(size.x >= maxSize.x){
            if(size.y >= maxSize.y)
               size.y = maxSize.y;
            else
               size.x = maxSize.x;
         }
         if(size.y >= maxSize.y) //Note: we already checked if both x and y are bigger.
           size.y = maxSize.y;
         if(size.x <= 0)
            if(size.y <= 0)
               return true;
            else
               size.x = 1;
         if(size.y <= 0)
            size.y = 1;
         return false; // we are done
     }
     
      if(ultSize){ // We will shrink and grow back and forth
        if(size.x > maxSize.x){
            size.x = maxSize.x;
            growth.x *= -1;
         }
         if(size.y > maxSize.y){
            size.y = maxSize.y;
            growth.y *= -1;
         }
         if(size.x <= 0){
            size.x = 1;
            growth.x *= -1;
         }
         if(size.y <= 0){
            size.y = 1;
            growth.y *= -1;
         }
      }
      else{ //We stop growing or shrinking.
        if(size.x > maxSize.x)
            size.x = maxSize.x;
         if(size.y > maxSize.y)
            size.y = maxSize.y;
         if(size.x <= 0){
            size.x = 1;
            growth.x = 0;
         }
         if(size.y <= 0){
            size.y = 1;
            growth.y = 0;
         }
      }
      //loc.x = (int)loc.x;
     //loc.y = (int)loc.y;
     return false;
   }


The update can be much much more complex. It is the rendering in java2D that will slow things down. Here is the render method.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
   public void render(Graphics g){
      if(!Global.bounds.contains(loc.x,loc.y))
         return;
      Graphics2D g2d = (Graphics2D) g.create();
      g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) (life.x/life.y)));
         
      //g2d.setTransform(AffineTransform.getRotateInstance(rot.x/Globals.scale, loc.x, loc.y));
     g2d.setColor(color);
      g2d.fillRect((int)((loc.x-(size.x/2))), (int)((loc.y-(size.y/2))), (int)size.x, (int)size.y);
     
      g2d.dispose();
   }


Add in a BI reference and call drawImage instead of fillRect and you have a very doable particle system. Rotation is in there but not needed. I am culling the particles and tiles. So if the camera does not see them, they will not be rendered. Normally you would have an emitter class that will manage emitting particle but in this game I just have some methods that emit single or multiple particles.

The physics is kinda wonky. All of the blocks are in a list and then I check each particle with each block to see if there is a collision and then resolve it. This part is slow. I can speed this up by making a grid base spacial partitioning system so I only check blocks in the particles area. Per-pixel collision is vastly overrated. Just use some bounding boxes and you will be fine. If you want some complex stuff, use box2D. No need reinventing the wheel too much.

If you would like, I can PM you the source of the system used in this game and then a much more robust opengl based system for learning. (Tip: once you get a basic system working, look at libgdx's or Unity3D's particle system source. Very enlightening.)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline deathpat
« Reply #10 - Posted 2013-08-11 13:07:17 »

Tried it.

I don't if I missed something or if there is an issue with the game, but I was not able to play. I started the game, had a look at the options, then pressed plat, slot 1. The game starts but I don't know what to do. I'm alone in the middle of the screen, as if the level was completely empty.

Also when I press the mouse in the game, it does not shoot where I aim. For exemple, if I shoot West to me, it shoots something like North North West, but the sprite of the bullet is oriented as if it was going West.

Last thing, if you don't provide a way to change the controls PLEASE don't use ASDW ! I have a French keyboard, and it's just unplayable with this layout. I see this in a lot of games here at JGO as there are some games I would like to play and I just can't. You can maybe use the arrows, or SDFE instead Smiley

I executed the game in command line and I have this exception when running the game :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
java.util.InputMismatchException
        at java.util.Scanner.throwFor(Scanner.java:840)
        at java.util.Scanner.next(Scanner.java:1461)
        at java.util.Scanner.nextFloat(Scanner.java:2319)
        at game.retro.loader.LevelLoader.loadLevelInternal(LevelLoader.java:164)
        at game.retro.main.levels.platform.Level1.reset(Level1.java:55)
        at game.retro.main.levels.platform.Level1.<init>(Level1.java:28)
        at game.retro.ui.MenuUI$7.action(MenuUI.java:162)
        at game.retro.ui.Button.update(Button.java:47)
        at game.retro.ui.MenuUI.update(MenuUI.java:521)
        at game.retro.main.Menu.update(Menu.java:95)
        at game.retro.main.Game.tick(Game.java:98)
        at game.retro.main.Game.start(Game.java:141)
        at game.retro.main.Game.main(Game.java:247)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)


This may explain why my level is empty Smiley

I'm running the game with Windows 7 64 and :
1  
2  
3  
java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) Client VM (build 20.7-b02, mixed mode)


otherwise it seems nice from the video Smiley

cheers

EDIT: the music is from you ? The one of the menu is really nice, setting a dark and mysterious mood, I like it a lot.
By the way, the one of the video has some clipping issues that hurt a bit. If you did it I think you should consider to add a limiter on the master track, or to lower the tracks/master volume before recording Wink

work in progress : D A E D A L U S
Offline StumpyStrust
« Reply #11 - Posted 2013-08-12 07:08:37 »

Will diffenetly update it to using arrow keys and add a spot in a config file where you can bind your own keys. The level is seeming to have issues loading. It is simply loading an empty level which means you are falling into oblivion. So the shooting is working fine as you are falling. Also, there are not sprites for the bullets, just particles.

I have updated the game with default support for Arrow keys and a new config file where you can change the control scheme. I also have tried a fix for the level loading issue by setting the Local to us as we use "." as a delimiter for decimals where some other countries use ",". Hope it works.

Edit:

I remixed a song on opengame art for the menu. The song during the game is all done by me. The sound effects are done by me. The song for the video was some opensource stuff as I couldn't come up with anything. I know the clicking is very bad. I wanted to add a limiter on it and some EQ to fix it but oh well. 

Offline deathpat
« Reply #12 - Posted 2013-08-12 15:15:52 »

cool it works now, and with arrow keys control Smiley

very fun ! It took me some time to make it to the boss but I finally did it Smiley Was not able to beat him ... by the way going back to the very beginning when dying versus the boss was a bit too much for me. But anyway, it's really fun to play, the acceleration/physics was well calibrated, and the lighting is nice.
I was a bit skeptical about the pixelated graphics from your screenshots, but finally seeing the particle effects and the bloom in action convinced me Smiley

The ingame music is cool also, it suits the mood very well.

well done !

oh and maybe you should add a life bar for the boss Wink

work in progress : D A E D A L U S
Offline Herjan

Senior Member


Medals: 6
Projects: 1



« Reply #13 - Posted 2013-08-12 15:39:24 »

Particle effects, YEAH Cheesy
Offline davidc

Senior Member


Medals: 5
Projects: 2



« Reply #14 - Posted 2013-08-12 16:10:58 »

Beautiful game so far, it has a really nice look to it.

For me, the balance is just a bit too much on the difficult side from the beginning. The green slugs were a bit too tough to take out early on although easy enough to avoid. Some of the platforms were a bit fiddly to land on as well. The gun upgrade was well done, making it underpowered at first but you really appreciate the burst fire and increased rate.

One thing I noticed was the particles floating up under the lights. I actually though this might be a visual cue that gravity was somehow affected under that area. Maybe this could be something to implement? Perhaps having localised areas where gravity is reversed or strong wind currents that the player needs to make use of to sole a particular part of the level.
Offline Hathor

Junior Newbie





« Reply #15 - Posted 2013-08-13 16:18:02 »

Hey mate, great looking game!

I decided to quit my lurking for the past 8 months to report a bug (could be a feature, not entirely sure);

Whenever you jump twice, you can shoot up to three times before you land. If you can't reproduce this bug, I'll upload a bug of it. (My internet isn't fast enough to handle uploading videos at reasonable speeds, or else I'd do it right now, sorry mate.)

Great looking game! If you don't mind me asking, how did you get the Blooming? It looks amazing!
Offline josephknight

Junior Newbie





« Reply #16 - Posted 2013-08-14 19:36:26 »

Yes! PM me that comparison of systems please! It's the perfect time for me to reference these as I approach this task in my own game. Be as brief as you like, I don't want to work you.

I just wanted to stop and say thanks for being so generous with your explanations. People like you really know how lend a hand where it's needed. Thanks for believing enough in the project of a stranger to offer so much help.

Keep up the fantastic attitude.
Offline namrog84

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Reply #17 - Posted 2013-08-14 21:27:52 »

Its quite great.



The slight randomness in the shooting direction is kinda annoying to me
The damage or health of the initial bad guys seems just a little too high of a 'delta'  at least in my opinion.

I felt like I Was sitting there just shooting him for 15 times?  Especially annoying are the ones on the platforms?

Game froze when I tried to do screenshot thing

"Experience is what you get when you did not get what you wanted"
Offline StumpyStrust
« Reply #18 - Posted 2013-08-28 21:03:47 »

I am still working on this I got really side tracked by my fully real-time java2D lighting which is this uses. I have implemented the new lighting. Difference? None other then speed and being able to change color on the fly. Much much faster now and can have arbitrary shapes cast shadows.

I also have added in a form of line rendering to drop the number of particles needed for trials and for fun added a trail to every single particle.



Here is a version with this enabled to play with.

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

I may give an option to turn this on or off or just create new types of particles that have this or something.

Pages: [1]
  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.

xsi3rr4x (54 views)
2014-04-15 18:08:23

BurntPizza (52 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (150 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!