Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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  
  Eat ALL the Fruits!  (Read 2596 times)
0 Members and 1 Guest are viewing this topic.
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Posted 2012-01-14 21:07:47 »

Only my second "game". Go easy on me Wink

Game - http://www.mediafire.com/?ubbotu48s44ckqc

Source - http://www.mediafire.com/?b4g6urw4bmmj907

-Nathan

p.s. I know there isn't an animation for when you move; I'm making new sprites now that aren't stolen from another game (which will remain nameless...)

Check out my website!
Offline Shane75776
« Reply #1 - Posted 2012-01-14 21:43:23 »

People usually wont download or try your game unless you give pictures.

so, pictures please Smiley

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Offline Shane75776
« Reply #2 - Posted 2012-01-14 21:46:06 »

Pretty good for a second game.

The only thing I dont like that is the jumpy movement. Would be better (i think) if you made the movement smoother maybe?

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #3 - Posted 2012-01-14 21:48:10 »

Pretty good for a second game.

The only thing I dont like that is the jumpy movement. Would be better (i think) if you made the movement smoother maybe?

I did that because it uses a 2D array to hold all the data, so if I wanted it to be smoother the 2D array would have to be massive.

Check out my website!
Offline Shane75776
« Reply #4 - Posted 2012-01-14 21:52:50 »

oh I see.

Why did you decide to do it like that?

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #5 - Posted 2012-01-14 22:29:14 »

oh I see.

Why did you decide to do it like that?

I don't remember :x Maybe I'll try making another, smooth-walking version.

Check out my website!
Offline Cero
« Reply #6 - Posted 2012-01-14 23:34:55 »

at start I can hear my GPU and then my cooler going wild

meaning this isnt running at 60 fps but rather full speed
please fix =D

Offline Shane75776
« Reply #7 - Posted 2012-01-14 23:43:54 »

yea, in your main update loop put in a sleep so that it does consume a huge
amount of processor.

I have a gaming rig and its eating 25% of my processor. Should be less than 1%

so just add a 5 millis sleep to your main while loop and that should solve it.

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #8 - Posted 2012-01-14 23:55:36 »

Runs fine at 7000FPS Smiley

It is still possible to do smooth movement in a 2D grid world. You just have to interpolate between the old point and the new point.

Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #9 - Posted 2012-01-15 04:27:23 »

I have it yield. I have heard that this is better. I have the ticking and rendering separate, with the rendering unlimited and it ticking 300 times per second. Is that too much? Ra4king - no way! Can you explain how That would work, or link me to a tutorial? Sorry for formatting, I'm on my mom's iPhone haha. Thanks!

Check out my website!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #10 - Posted 2012-01-15 04:38:56 »

It's simple, you get the distance in X and Y between the new point and old point and divide each by the number of ticks you want to move the sprite then store each value in X and Y velocity variables. Each frame you add the X and Y velocity to the X and Y until you reached the new point.

For example, the player is at (50,50) and needs to go to (30,40) in 10 frames, the difference is (20,-10) divided by 10 = (2,-1). That's your velocity per frame.

Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #11 - Posted 2012-01-15 04:44:31 »

It's simple, you get the distance in X and Y between the new point and old point and divide each by the number of ticks you want to move the sprite then store each value in X and Y velocity variables. Each frame you add the X and Y velocity to the X and Y until you reached the new point.

For example, the player is at (50,50) and needs to go to (30,40) in 10 frames, the difference is (20,-10) divided by 10 = (2,-1). That's your velocity per frame.

The coordinates of the player in my game only go up to 12, I just multiply it by 15 to make the frame make more sense. Could I still do this? Would it work with decimal points? My array has to round to an int; that's what I'm worried about.

Check out my website!
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #12 - Posted 2012-01-15 04:52:36 »

Ah so each cell is 15x15. Then change your player coordinates to pixels and then divide by 15 to get the cell.

Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #13 - Posted 2012-01-15 04:57:32 »

Hadn't thought of that! Thanks Smiley

Also, I am still flabbergasted on spawning enemies and such. Cry

Check out my website!
Offline Shane75776
« Reply #14 - Posted 2012-01-15 08:54:53 »

I have it yield. I have heard that this is better. I have the ticking and rendering separate, with the rendering unlimited and it ticking 300 times per second. Is that too much? Ra4king - no way! Can you explain how That would work, or link me to a tutorial? Sorry for formatting, I'm on my mom's iPhone haha. Thanks!

Having it yield is not going to slow down the while loop. there is no reason to have a while loop running at the max speed your computer can process at.

Having it do that, will just have it completely consume your computers processing power and on a lot of computers people will get "lagg" from this and
possibly other issues.
So you really do need to add a delay in your while loop.
I suggest having it just sleep for about 25 millis.

To put this into perspective. your game, which is extremely small and hardly any math calculations and collision detection going on is
making my gaming rig use 30% of its processing power. Where is my current game "Epic Stubble Man" has a ton more math calculations
and collision detection going and its using only 1% of my total processing power.

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #15 - Posted 2012-01-15 09:03:17 »

Hehehe I think you quoted the wrong text Wink

Offline Shane75776
« Reply #16 - Posted 2012-01-15 09:04:42 »

Hehehe I think you quoted the wrong text Wink

lol woops my bad. let me fix that.

Check out my Snipping Tool++ ! An advanced snippet/screenshot/text uploading tool! Meant to replace the windows snipping tool.

Check out Pixel Rain My most recent Swing based game!
Offline StonePickaxes

JGO Coder


Medals: 4
Projects: 2


Nathan Kramber


« Reply #17 - Posted 2012-01-15 09:51:02 »

Hmm okak, I'll think about it.

AND RA4KING I UNDERSTAND NOW. About spawning enemies! Look! - http://www.mediafire.com/?wnwf728uw5wkc4f

I feel really good right now. I have been trying to understand that for a month.  Cool Cool Cool

Check out my website!
Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #18 - Posted 2012-01-15 20:44:57 »

Nice! Great job Smiley

Offline loom_weaver

JGO Coder


Medals: 17



« Reply #19 - Posted 2012-01-16 02:31:59 »

I can't fall into the pits.  Closing all the pits doesn't trigger any kind of win condition.  I figure you already know this.

Runs fine on my MacBook Pro.  You're off to a good start!
Offline GabrielBailey74
« Reply #20 - Posted 2012-01-16 03:04:39 »

Very nice mate, kind'o like a 'snake' remake   Emo

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.

ctomni231 (33 views)
2014-07-18 06:55:21

Zero Volt (29 views)
2014-07-17 23:47:54

danieldean (24 views)
2014-07-17 23:41:23

MustardPeter (26 views)
2014-07-16 23:30:00

Cero (41 views)
2014-07-16 00:42:17

Riven (43 views)
2014-07-14 18:02:53

OpenGLShaders (31 views)
2014-07-14 16:23:47

Riven (30 views)
2014-07-14 11:51:35

quew8 (29 views)
2014-07-13 13:57:52

SHC (65 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!