• Advertisement
Sign in to follow this  

Design-tips

This topic is 2365 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've decided to learn more about designing a project, and my immediate idea that sprung to mind was to try to figure out which classes and/or interfaces would be needed to implement and existing game with known properties. Is there any tool I could download that could help me visualize my classes in a structured manner?
The game I landed on was The Sims 2, because it is second-in-line in a series of three games, meaning that the technology would probably be more refined, yet not too advanced. So far, I came up with some classes:

Sim - Baseclass for all types of Sim (Male, female, child, old).
Game - Responsible for ticking the simulation and running the game's functions (rendering and updating).
Renderer - Renders stuff.
AudioOutputter - Outputs audio.


I have some questions;

Does the design of the game differ based on the language of implementation?
Does anyone have ideas for more classes?

Thanks!

Edit: To come up with more classes, it would be helpful if you've actually played The Sims 2

Share this post


Link to post
Share on other sites
Advertisement
view, input controller, options, game launcher, sim disease, game saver, brain, soul, animals, family, money, house, relationship, clothes, furniture, events (internal/technical), events (in sim life), navigation stuff, world, ...

Share this post


Link to post
Share on other sites
Does anyone know of a tool to help me visualize my design?

Share this post


Link to post
Share on other sites

Does anyone know of a tool to help me visualize my design?


Either DIA as mentioned above, or my personal favourite; Violet. Violet is in Java, so it works on any operating system. It's also specific to UML, making it quite a bit easier and more convenient to use.

Share this post


Link to post
Share on other sites
In case anyone's interested... Violet doesn't actually work. At least not on Windows 7. I get an error saying that the main class was not found. And that's after I added Java to my PATH.

Share this post


Link to post
Share on other sites
"java -jar com.horstmann.violet-0.21.1.jar" works on my Windows 7 . How did you try to launch it ?

Share this post


Link to post
Share on other sites

In case anyone's interested... Violet doesn't actually work. At least not on Windows 7. I get an error saying that the main class was not found. And that's after I added Java to my PATH.


6510's suggestion should do the trick. In fact, you should be able to run it simply by double clicking it, as I believe that that's how I run it.

Share this post


Link to post
Share on other sites
6510's solution seems to work. Double-clicking it does not. I tried setting the jar extension to javaw.exe first, then when that didn't work I set it to java.exe. Neither of them worked.

Share this post


Link to post
Share on other sites
If anyone's interested, here's what I came up with so far...

4q0txu.png

Share this post


Link to post
Share on other sites

6510's solution seems to work. Double-clicking it does not. I tried setting the jar extension to javaw.exe first, then when that didn't work I set it to java.exe. Neither of them worked.


Just tried it and it works for me, it's definitely javaw.exe that you need.

Regarding your design, I'm not sure if I would have Gender as an alone standing class. You might have two classes, MaleSim and FemaleSim, but even that would be rather far-fetched, as the functionality of the two is likely to be near-identical. Instead, you could have an anonymous enum in the class "Sim", that has the two values MALE and FEMALE, and a variable "Gender" instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement