|
Hi,
I've recently been trying to organize and clean my folders, classes etc. and I've been trying to reference other well structured releases but I'm confused on some of them esp. client sided.
This topic is really to ask the community how they structure their sources in terms of packaging.
i.e.
Why are game content in the world direrctory in some releases but in the players directory for others, or really where should it really be.
e.g.
game.content.minigames
game.models.players
Client's also much more confusing as there are many classes that are simply named class36, and many other classes that seemed to be linked but are in different directories.
So really, can you show me your packaging and explain why its like that?
Sorry if this is in the wrong section or its worded badly.
At the end of the day, it all comes down to personal preference on where you want stuff to go. There really is no right/wrong way to package something if its for your eyes only.
Most packaging start with domain end, then domain name. Such as for me, 'net.zamorak'. From there you can structure of how you want it to be.
net.zamorak.core;
net.zamorak.network;
net.zamorak.world;
net.zamorak.utils;
Would be the base idea, though it doesn't HAVE to be this way.
The client is challenging to package without first refactoring the class names at the least. Check out my Zamorak release if you need a little help.
For example:
- I created a Godwars class, and I'm having trouble putting it into a Mob folder or a content folder, because the things inside really handle the interface, wearing god armour bonuses etc. and not much to do with mobs.
- Handling potions e.g. drinking, mixing etc. is in the content folder but it seems to me that it should be near the Herblore skill. Same with eating > Food.
--------------------------
I guess I'm either having trouble naming specific folders or I've got extra classes that do not need to exist seperately.
What do you think?
Is this class a type of Mob, or is it a piece of content?
The Herblore skill itself should be in the content folder, because skills are content.
I think you have missread the 'model' folder as 'models'. 'Model' comes from the MVC interface design pattern
It's personal preference and a little bit of MVC naming conventions, I guess.
Mine's like this;
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |