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!
You might be interested in the visitor-pattern. It keep the logic seperated from the representation.
(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?
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.
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.