Raised This Month: $32 Target: $400
 8% 

Need help with Code Design for Warcraft NG


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 10-14-2005 , 13:09   Need help with Code Design for Warcraft NG
Reply With Quote #1

Well basically I have written a module for amxx that would help the next version of war3ng I release.

In theory I wanted to create it so that I could "plug-in" the sourcemod includes + files and everything would be fine and dandy.

Of course that is not at all what happened, and I'm pretty far along with the module.

So I wanted to take a step back and think a little more in depth about it. I realize I need the following classes:

PlayerManager
- contains Player

RaceManager - manages the races that are registered/assigned
- contains Race (Represents a Race object, should only be 8 of these)
- contains Skill (Skill represents a single skill)

EventManager/MODHandler ?
- In theory I wanted this to be like the common base class that all mods would need to use. Then each mod would have their own class with mod-specific things. Like cstrike2 would hook into the metamod:s api etc.... While cstrike and dod would hook into the amxx api. This sounds good in my theory, but I actually don't know how to implement this, any ideas?
- this should also contain like MOTDHandler, MenuHandler, which will handle menus and motds etc... (of course this will only be different from 1.6 and source)

Timer
- used for executing functions later in time.

I'm attaching a UML Diagram I made in visio, which I now feel is completely wrong.

If anyone has any insights as to how I should go about designing this please give me advice, I do not want to create this and it be crap, I'd like it to be a "model" or something clean + good to look at which will help others.

Thanks!
Josh
Attached Images
File Type: jpg uml_diagram.jpg (37.3 KB, 231 views)
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
BAILOPAN
Join Date: Jan 2004
Old 10-14-2005 , 16:25  
Reply With Quote #2

UML is overcomplicated and confusing to read.

IRaceManager as a container for IRace
IEventManager as a container for IEvent
ITimer as a container for ITask

abstract the managers through IWarcraftAPI

The important thing is separating game logic from game specific logic. For example, if in the main handler you must give someone health, write a SetHealth function in one file, and keep the mod specific implementation in another file.
__________________
egg
BAILOPAN is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 10-14-2005 , 16:36  
Reply With Quote #3

Quote:
Originally Posted by BAILOPAN
The important thing is separating game logic from game specific logic. For example, if in the main handler you must give someone health, write a SetHealth function in one file, and keep the mod specific implementation in another file.
Ok with that being said, should I assume that I can make it so I only need ONE compile.

Then the appropriate "file" would be used if that game was the one that was running? i.e. DOD or CS
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode