Sigh,
Its been slow going...
I have some basic images in the game now, Little Sheverons for the units, and an Illustrator house for the buildings. The units in the squad that is currently sellected changes colour to represent their health.
I've ran into a dilema. I want to have stacking behaviours. I have the code. It works. But its kinda pointless and making it far more complicated than it really should be. Having to code in the exact same stuff for each beheviour is not very good coding wise. Thus i think i'll take out behaviours as the are at the moment and start again. :( what i think i'll do is comment out all the code that is currently in all the behaviour classes and the unit and squad class and start again from scratch.
I'm thinking of each uni having 1 of each behaviour, but only having IDLE to start with. Then using some "Fuzzy Logic" to decide what behaviours to call etc. sigh should really be past here by now and on to the writing. I have 10/11 days to get my first draft done so I can show Euan. That shouldn't be too hard, but have maths as well. I think its tea time then i'll start on the raping of my current code and all that jazz.. :( woooo :D
Thursday, 24 April 2008
Sunday, 13 April 2008
Fuzzy Logic
Right, well I added the menu options to allow the user to select the number of nodes in X and Y, which broke it because deviding 11 by a number gave an error in == as the numbers were not 100% identical due to loss of persision. A basic collision detiction test was used with the steps inbetween the nodes being *1.2f just to make up for the error.
Waypoints were indeed broken, but have now been fixed
multi-objects works now, it didn't, but it has been added and thus fixed :P
What i need to do now is figure out what behaviours a unit should have... sounds thought might have to be done.
Waypoints were indeed broken, but have now been fixed
multi-objects works now, it didn't, but it has been added and thus fixed :P
What i need to do now is figure out what behaviours a unit should have... sounds thought might have to be done.
Saturday, 12 April 2008
A* Finished
Wooo A* pathfinding has finished being implemented wooo
There is now two methods of using the A* pathfinding.
Still to do: Add in an option to the options menu to allow the user to change the number of nodes wide and high that will be used for Method 1. of A* this number will effect the speed and accuracy of the pathfinding :)
*oh btw, i would check to see if multi-objects work
Started doing the outline of the write-up, looking good, now just need to start filling it in. Between that and the AI essay
Next thing to do is implement fuzzy logic.
There is now two methods of using the A* pathfinding.
- Creating nodes of equal distance appart in a "grid" accross the screen, any impassable objects created will delete any nodes that are totaly obscured by the object and re-align the surrounding nodes to not point at it.
- Any new impassable object that is created will also create nodes on the corner of that object and will connect to other nodes in line of sight* and should reduce the cpu/memory overheads and allow more units on the screen
Still to do: Add in an option to the options menu to allow the user to change the number of nodes wide and high that will be used for Method 1. of A* this number will effect the speed and accuracy of the pathfinding :)
*oh btw, i would check to see if multi-objects work
Started doing the outline of the write-up, looking good, now just need to start filling it in. Between that and the AI essay
Next thing to do is implement fuzzy logic.
Subscribe to:
Comments (Atom)