Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Whata classes to use?  (Read 1860 times)
0 Members and 1 Guest are viewing this topic.
Offline 106498

JGO n00b
*

Posts: 22



« on: 2007-04-10 22:09:44 »

I'm trying to make a fairly basic rpg but I keep getting stuck with what classes to make. I'm trying to have it all rendered (vector graphics?) but I'm stuck with what classes used for drawing. For example: Would you put the code for drawing and animating your player in a seperate class to the main player class. And would you have another class for what the player looks like when going in different directions? I think my main issue is that its not using images so you have to have different painting routines for different directions of movement.
Any help to sort of unjumble my mind would be very welcome!
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5871
Medals: 255


Hand over your head.


« Reply #1 on: 2007-04-11 14:02:46 »

You might be interested in the visitor-pattern. It keep the logic seperated from the representation.

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline 106498

JGO n00b
*

Posts: 22



« Reply #2 on: 2007-04-11 17:58:43 »

(after doing some internet searches on visitor pattern)

I think I understand what you mean but I don't see how I would get that to work in an applet. What if I got update() to call my visitor pattern which then calls paint? Would that work?
Games published by our own members! Go get 'em!
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5871
Medals: 255


Hand over your head.


« Reply #3 on: 2007-04-11 18:04:48 »

Nope.

And I think you should start smaller, start with a text-only commandline game to get the hang of it (what are domainclasses, controllers, views - the MVC pattern isn't that bad...), finish it in a few days, then you'll grab the basics, and you'll be able to apply those to the way you're gonna build your applet, hopefully.

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline 106498

JGO n00b
*

Posts: 22



« Reply #4 on: 2007-04-12 00:20:45 »

I have made a textbased game and a gui game and this was supposed to be my first applet game. I think I'll try to make a graphical application first as I have some experience in that and then make it into an applet later.
Thanks for the replies, Riven.
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.11 seconds with 20 queries.