Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (491)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
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  
  [Frogger2D] *closed*  (Read 4380 times)
0 Members and 1 Guest are viewing this topic.
Offline GabrielBailey74
« Posted 2012-04-04 22:42:06 »

Hello JGO, wanted to start out this topic by saying thanks to all the members for helping me accumulate knowledge of Java Programming during my time here.

This is something I thought of today, so it's not really 100% planned or thought through yet, I just figured it would be easy  Cheesy.

Updates Done:
Sound Clips + AudioClass added.
Basic Map setup rendering (No cars/logs/pads).
Added a (Stream, Log, Frog) to the main menu, can hop around on the log while it floats).
Sounds for movement/death added.
Full Screen available.
Sounds added: (Hopping, dying/loosing a life, falling in the water, time running out, extra life, coin sounds)
Toggle sound.
Level time / Lives rendered.
Game Over screen.
1 car added + movement, and collision detection etc.


Bugs:
When changing sprites during movement, on keyPressed = jumping Image, and on keyReleased = normal Image, (So the problem here is you can just hold down right (or any direction), and just jump that whole distance while still on the jumping Image) so I need some info there, might of explained it poorly if i did ill post some code  Emo.


Things Needed from the community / Questions:
Question: Is Frogger a 'Tile Based Game' as in a tile grid system?
Question: Has there been a Frogger remake in Java? (Thinking so..)
Question: What is the time limit/How does the timer work in Frogger?
Question: How can I disable the 'mouseDragged' method in Java? tried a simple 'return;'  Undecided It freezes the whole game: (http://www.java-gaming.org/topics/frogger2d/26157/msg/228167/view.html#msg228167)


Pictures:
Main Menu: (Updated with a temp frog to play with on the log)


Map Update: (A little more added)


Any suggestions would be great, or feedback of any sort (Improvements / fixes).

Offline _Al3x

Senior Member


Medals: 7


Indie Games FTW!


« Reply #1 - Posted 2012-04-04 22:53:36 »

Good luck with it, I hope to see more soon Cheesy

Question: Is Frogger a 'Tile Based Game' as in a tile grid system?

That´s a way to do it, but not the only one. Try to keep it simple, if you can make it title-like, go for it. Later, why not make it again with other libraries, like "myFrogGame 2" and then "myFrogGame 3" and trying different ways of making it Smiley

Offline GabrielBailey74
« Reply #2 - Posted 2012-04-04 22:55:44 »

Thanks.
Well it's definitively going to take some thought towards the game mechanics, such as variables moving and interacting to bring it together.

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

JGO Kernel


Medals: 202



« Reply #3 - Posted 2012-04-04 23:36:42 »

I wouldn't call Frogger "tile based", no.  The only coarse movement is vertical, and it still detects collisions while transitioning between levels.

Go download MAME and play frogger yourself and you'll see exactly how the various mechanics work.
Offline jmiller9

Junior Member


Medals: 2
Projects: 3



« Reply #4 - Posted 2012-04-05 00:00:20 »

If you google "java frogger" this is the first thing that comes up: http://www.reinhardtfamily.com/Paul/Frogger/

I think a game like Frogger is a great game to start out with.

An easy way to implement the game timer is with a Thread. You can have it sleep for, say, 1000 ms (1 second) and decrement a counter variable until it hits 0.

To disable the mouseDragged method, just leave its body blank.

For your game mechanics, I'd make some sort of collection (probably an ArrayList) of cars and logs, give each car/log their own direction variable (Enumerations are great for this) and speed. For collision detection, the game is simple enough that you can have all obstacles check to see if they hit the frog every time they move. I hope this helps.
Offline GabrielBailey74
« Reply #5 - Posted 2012-04-05 00:08:06 »

All i did was let my Input class implement all the MouseListening/KeyListening classes, than added all the methods.
Still even with a blank body in the mouseDragged method, if you click the mouse and drag it, it freezes the game, doesn't render the actual mouse 'X, Y' coords anymore, but it still renders the FPS, map, etc.?

1  
2  
3  
4  
5  
6  
7  
8  
9  
   @Override
   public void mouseDragged(MouseEvent m) {
      if (canDrag) {
         // method to repaint.
        game.GameProcess(2);
      } else {
         return;
      }
   }


Offline jmiller9

Junior Member


Medals: 2
Projects: 3



« Reply #6 - Posted 2012-04-05 00:36:50 »

You'd be better off only using keyboard input to control the game. A mouse would be hard to use to control a frog. If you remove the mouse listener and stick with only the key listener, this will go away. I don't know much about the mouseDragged method; I've never used it. If you really want to use the mouse, I think the LWJGL might have the capability you're looking for.
Offline GabrielBailey74
« Reply #7 - Posted 2012-04-05 00:45:32 »

Thanks mate, meaning to update the picture of the main menu.
Now it's using buttons instead of waiting for keyboard input to start the game.

Offline Gjallar

JGO Coder


Medals: 13
Projects: 1


Follower of Nurgle


« Reply #8 - Posted 2012-04-11 01:38:31 »

... if you click the mouse and drag it, it freezes the game, doesn't render the actual mouse 'X, Y' coords anymore, but it still renders the FPS, map, etc.?

(I hope I'm not talking utter bullshit since I'm quite new to Java myself... can't blame me for trying :p)

If you are getting the X,Y - coordinates of the Mouse in your mouseMoved() Method you could simply call it in your mouseDragged() Method like so...

1  
2  
3  
4  
5  
6  
7  
8  
9  
   @Override
   public void mouseDragged(MouseEvent m) {
      if (canDrag) {
         // method to repaint.
        game.GameProcess(2);
      } else {
         mouseMoved(m);
      }
   }


... and it will act like you just moved your Mouse. Hope that helps. Smiley
Offline GabrielBailey74
« Reply #9 - Posted 2012-04-11 04:32:57 »

Thanks mate, will give it a try soon.

Pages: [1]
  ignore  |  Print  
 
 

 
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!