EDIT: 22 - 11 - 2010
Okay, I have been working on the combat system a bit more. It is nowhere near finished, but there are a number of aspects that need to be made first. For example an Monster Character. This has been added to my latest addition. I have also been thinking about the hierarchy of characters, Monster Characters and Non Player Characters.
My idea is the following hierarchy:
parObstacle
|
|--> parCharacter
|
|--> parMC
| |-> parStaticMC
| |-> parDynamicMC -> Octorok
|
|--> parNPC
|-> parStaticNPC
|-> parDynamicNPC
For the MC I already made an Octorok. It's AI is connected to the state the Octorok is in.
--------------------------------------------------------------------------------------------------------------------------
Okay, I have been really busy lately with work and my Master Thesis. Starting work/study at 7:30 and end at after 18:00 leaves me very tired at the end of the day. With some chores to do before bedtime there is very little time left to work. This goes on about 6 or 7 days each week. In the time left I try to get somethings for the CP done and browse the forum.
Well with that said I like to present a bit of what I have been working on. My latest bit is a generic/base object for a handweapon. See the attachment. In the attachment I have made example implementations with the Lantern and Bow (mainly because these had ready available resources for me). The code of this new generic is as follows:
/***************************************************************
State Variables
* script - is the script with the weapon code.
* state - to be used if the weapon has multiple stages.
***************************************************************/
script = 0;
state = 0;
/***************************************************************
Other Variables
* owner_id - the instance that is holding this weapon in its
hands.
* timer - a counter for timing purposes.
* x_off - the x offset variable. How far from the x position the
lantern has to be drawn.
* y_off - the y offset variable. How far from the y position the
lantern has to be drawn.
***************************************************************/
owner_id = 0;
timer = 0;
x_off = 0;
y_off = 0;
if(script != 0)
script_execute(script, STEP);
if(script != 0)
script_execute(script, DRAW);
As you will see the code is minimum at best. But the most interesting part is the CREATE event. As you'll see it does not contain anything usable for damaging enemies or in fights. This is because it is still in development, but before it can go any further I need to discuss how to deal with damaging and calculate hit point decrease.
I was thinking about letting the following aspects play a role:
- Link's base attack
- Weapon's base attack
- Link's attack modifier
- Weapon's charged modifier
- Receiver's base defense
- Receiver's defense modifier
- Weapon's element (fire,ice,magic,etc)
- Receiver's element resistance
The problem is that I am probably thinking way to complex here and probably could do with less variables. Thus I would love to hear what you guys think about it.
Note: You can also see some of the latest additions to the engine's future release but it still has some flaws and holes in it. I am working on it and it still has some things to do before a release.