More Combat thoughts
So started on basic combat last night. This requried an new event type (ok 1 line to the enumeration) for event_Combat so pass back to the lua script that controls that town/map/cavern/dungeon what have you.
This function callback will check what ‘event’ triggered or what NPC combat was issued against to know how to setup the monsters for combat which will then exec the combat script.
Since I am re-using as much code as I can, the combat engine will dump the existing tileset, load in the combat tileset (as loaded via the calling script) and position the PC’s and NPC’s on the map. Combat maps will be 96x96 to fit into my cached segment mapping system, this also allows me to have the entire combat map in memory at once incase some enemies are at opposing corners of the map. The issue here might be with wrapping maps so it may not work out, but thats what we will test
Each ‘group’ of enemies as noted in the calling script will indicate what kind of enemy, the number of them, and the distance from the players (well their initial row/col point).
My combat icons are going to range from 1x1 to 4x4 with 1x2, 2x1 in boxed size…
I also need to add a player icon selection at the start of the game, or just paperdoll all the PC’s as things go…
Already brain farting, Im not going to do a segmented map for combat my current map code is too tied for scrolling maps and such and it will be easier to hack some specific routines just for combat and I can keep it all in the combat module.
I think, outdoor maps can be auto generated but town/dungeon maps wont be, as putting the map walls into combat map walls gives away layout (ok, so its a minor nit pick),
Time for a random screenshot; I need to have the FOV working in dungeons (limited to torch radius etc)… right now its like being ‘outside’ when your underground
(You can see my debug cheat script in action in this screenshot too)
Filed Under : Computers • Development • Fishguts •
Comments are closed There are no comments on this entry.