Jump to content

  • Log In with Google      Sign In   
  • Create Account


Need feedback on my first Top-Down RPG


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 warnexus   Prime Members   -  Reputation: 1397

Like
2Likes
Like

Posted 04 February 2014 - 06:06 PM

 

It took 4 simple game projects before I could tackle the problem this type of project presents while still learning new techniques to improve the codebase and the look of the game.

 

It took a month and 2 weeks which is 300+ hours to get to the level of the implementation and also the look too.

 

I need constructive feedback on the game or if you are curious about how something is implement I can share ideas but not code. 

 

I can only share the footage of my game which presents all the features I ever wanted to add to the game during development. I might add more features but college started a week ago and need all the time for my current and future studies.

 

This personal project allowed me to branch out and be as creative as I possibly can and once again step out of my comfort zone in order to learn something new and struggle with new technical challenges and learn to leverage existing art assets so I can actually start writing the codebase that makes use of the art assets which made development much smoother and quicker.

 

Game is written in Java.


Edited by warnexus, 04 February 2014 - 06:10 PM.


Sponsor:

#2 Pink Horror   Members   -  Reputation: 1116

Like
-1Likes
Like

Posted 04 February 2014 - 07:37 PM

 

It took 4 simple game projects before I could tackle the problem this type of project presents while still learning new techniques to improve the codebase and the look of the game.

 

It took a month and 2 weeks which is 300+ hours to get to the level of the implementation and also the look too.

 

I need constructive feedback on the game or if you are curious about how something is implement I can share ideas but not code. 

 

I can only share the footage of my game which presents all the features I ever wanted to add to the game during development. I might add more features but college started a week ago and need all the time for my current and future studies.

 

This personal project allowed me to branch out and be as creative as I possibly can and once again step out of my comfort zone in order to learn something new and struggle with new technical challenges and learn to leverage existing art assets so I can actually start writing the codebase that makes use of the art assets which made development much smoother and quicker.

 

Game is written in Java.

 

Did you make Link "from scratch"?



#3 warnexus   Prime Members   -  Reputation: 1397

Like
0Likes
Like

Posted 04 February 2014 - 08:40 PM

Nope. The art asset of the main character is the NES counterpart of Link.

A lot of the art assets are from retail games.

 

I create programmer art of a sword in the main menu and map texture for the first and second areas. I also wrote the codebase.


Edited by warnexus, 04 February 2014 - 09:58 PM.


#4 TTay24   Members   -  Reputation: 106

Like
0Likes
Like

Posted 05 February 2014 - 01:39 AM

Looks solid! Just throwing this idea out there, but what about making Link flash red whenever he gets hit instead of just decreasing the health? That way the user will know when he has taken damage without actually having to take his eyes off the character. Just a thought.

 

How did you implement the animations in regards to like...drawing as a whole. I'm about to implement the animation of sprites into a small 2D openGL engine that I'm working on, but I haven't decided on how to do it yet. Are you changing the frames once a sprite has displayed for a specific amount time (maybe delta t), or are you maybe changing it based on how many frames it has been showing? Sorry if that didn't make sense. Just curious!

 

Are you just using Java's...swing class (?) to draw your graphics? Haven't used Java in a while so I can't remember the libraries used for drawing haha



#5 warnexus   Prime Members   -  Reputation: 1397

Like
2Likes
Like

Posted 05 February 2014 - 07:02 PM

Looks solid! Just throwing this idea out there, but what about making Link flash red whenever he gets hit instead of just decreasing the health? That way the user will know when he has taken damage without actually having to take his eyes off the character. Just a thought.

 

How did you implement the animations in regards to like...drawing as a whole. I'm about to implement the animation of sprites into a small 2D openGL engine that I'm working on, but I haven't decided on how to do it yet. Are you changing the frames once a sprite has displayed for a specific amount time (maybe delta t), or are you maybe changing it based on how many frames it has been showing? Sorry if that didn't make sense. Just curious!

 

Are you just using Java's...swing class (?) to draw your graphics? Haven't used Java in a while so I can't remember the libraries used for drawing haha

Ah yes! I could make a indicator that Link taking damage. Well add in the future.

 

In regards to implement the animation well it is going to take a lot of explaining but I will do my best to make sure you understand a good amount of it so you too can create a similar system. I wrote a Animation class that does a bunch of things:

 

1) Loads all the images(this would be the string directories of where these images are located in the project folder) that are being feed into the Animation object into a list that can contain images). Obtain the frameInterval from the subclass of this Animation class. Examples: frameInterval = 8.

2) Have some idea of how much far apart or interval of time for the images and also set up frame entries or frame data for each image. I use an array implementation for both of these. 

3) Have a method or function that increments the current frame by one. Essentially this is the animation counter.

4) Have a method or function that knows have the animation reached the last frame. Very good idea to have if you want to loop the same animation. 

5) The draw method of the Animation class will draw a specific image relative to the sprite position based on the current frame and make sure it is less than or equal to the last frame. If there is no sprite object to draw from, the draw method needs to be overridden in the subclass of  the Animation class.

6) Have an implementation that resets the frame when animation has been done,

 

And that is really much it for the Animation class. 

 

Once I have got the Animation class the way I wanted. Now I can derive or make a subclass or if I have many animations in my games: make many subclasses of the Animation class. An example of such as subclass would be LinkMoveLeftAnimation extends Animation or LinkMoveRightAnimation extends Animation. By doing so, I can use the inherited methods of the Animation class. Every subclass of the Animation can for example increment the current frame, reset the frame (this would reset the current animation frame back to zero, and has a boolean method that checks has the animation reached the last frame. Every subclass also has an idea of a frameInterval and an array containing string directories of the images it should have. LinkMoveLeftAnimation class should move left animations.

 

I'm actually drawing only one image in that "moment in time" which is what the current frame is all about. Since I am incrementing frame by one which is what my increment frame method is doing, the frame will change therefore my current image will change based on my logic. Eventually the frame will reach a time "threshold" or some time limit in which I need to draw a different image. Also, eventually the current frame will reach the last frame data or frame entry that is set up after my required images are loaded in which I can reset the animation frame back to zero so the animation system will draw back the initial image. Resetting the frame back to zero is pretty much required for 2D character movement animation otherwise you won't draw be able to draw those images after the last frame.

 

The Animation system itself was tricky to implement and it took a lot more effort and a lot more time and a lot of experimentation with the frameInterval to put these concepts together to create the animation system. The 2D animation system itself went through a lot of improvements before it worked the way I wanted it to work. But the basic level is that animation is just evaluating time pairs and a list of images. Sometimes you need to increase the frameInterval so the animation is not running too fast. Sometimes you need to decrease the frameInterval so the animation is not running too slow. It really depends on how many images are in the list and quite possibly on the look of the animation itself. Be sure to experiment to get the look you want.

 

I also need to mention your animation execution should be based or dependent on what the state of the character is. The character action state can be attacking, idle, running or walking. The character also has a direction state: left, right, up or down. The animation drawn must be according to the action state and direction state.

 

And that is pretty much how the logic works to get the correct images to show up.

 

I am using java awt for drawing graphics. I only used swing to create the JFrame and JPanel. The rest is awt, io, util, imageio and my own codebase for the GUI interface and game logic. Java Standard GUI library did not give me the look I wanted. So I decided to built own logic for buttons and menus and user interface display which gave me more control of how everything looked and operated when the game ran.

 

Hope these ideas helped! I would say just make a lot of mistakes early when building the system. It will make implementing the system that much easier and you will gain a better understanding of the animation system that much better. The earlier animation system I had problems and I kept improving it and improving it until I iron out all the bugs and better understanding where and why things went wrong initially.


Edited by warnexus, 05 February 2014 - 09:01 PM.


#6 TTay24   Members   -  Reputation: 106

Like
0Likes
Like

Posted 06 February 2014 - 09:31 AM

Ahh, that's incredible! Thanks so much.

I probably won't have time till later tonight to play around with stuff/respond more in depth, but I definitely will! I quickly read over everything and it was really helpful, so thank you again.

Another quick question: what's the benefit of deriving different events/states from the animation class as opposed to creating an animation object for each animation? Is it strictly to gain the benefit of overriding specific functions so that each animation can draw itself?

I'll explain more about my project/idea for implementation later! What's next for your project?

#7 warnexus   Prime Members   -  Reputation: 1397

Like
0Likes
Like

Posted 06 February 2014 - 12:15 PM

I am doing the second part of what you just said which is to derive each animation as an animation object. I am not doing the first part you said. Events if you are referring to input events and states should be in the class of the min character. you only need to override if you want a specialization of the draw method. I only need to override the draw method because there was scenario where the position of the animation I needed to draw was a bit off so I needed to add some offsets to fix the problem. There is no states or input events in the animation class. The animation will draw regardless if you do not override because the subclass will use the draw method of its superclass Animation. You gain the benefit of overriding methods if you use inheritance.

What's next for my project? To add technically challenging features in the future. That is pretty much what the project is all about. As for specifics, I cannot really say until I actually have it working in the game. All I can say is I like to build features so that even casual gamer will understand how the mechanics work.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS