Progress & PlansAI Modes – I have the following AI behaviors; Wander (random movement), Attack (move toward player and turn on attack when in range), and Dormant. I haven't made Flee yet; I need to be able to identify safe zones. A shortcut would be to just run from the Player.
Party Members – technically there is a party system in place. It doesn't work well, pretty convoluted. However, at this point party members won't attack themselves, and will follow each other in a line. Maybe.
Particle System – improved this quite a bit. Particles can be spawned by any NPC (although for some reason the first NPC seems to get the lion's share of new spawns...), can die via timed expiration, distance from origin, or collision, and have full collision checking with NPCs and terrain.
I can now do spells and effects; one use is to have gathering nodes (which are technically NPCs) spawn particle effects, like glittering fireflies or something.
I need to work out where particles spawn when created; should be at X distance from spawning entity, along the angle it will head. Should be easy.
Teleporters – only need a bit more work. So far they teleport any qualified entity and start an effect that can be changed, and will be eventually. Got a nice fade in now.
One problem I'm having is determining the destination of the teleportee. I need to make a “search area” routine to find a viable destination. So far my units are being teleported atop one another
I've made them quite efficient, fps-wise. The collision detection on teleporters is going to have to be very efficient, since there may be hundreds on each map. I've made them able to be rectangles, so I can cover the entire map edge with just one teleporter. However, since they have to check each NPC every frame, it's still pretty expensive. I need the collision detect rate to be pretty high, since it's annoying to have to stand in one for a second before it teleports you.
Depending on the ratio of NPCs to Teleporters, it might be more efficient to have each NPC check all Teleporters when they move instead of every frame. At this point, I've got a system that limits teleporter checks so we'll leave it at that until I have a fully functioning map, with relevant amounts of each.
Entity Editor Panel – rudiments are up; I kind of need custom buttons here. This panel will be vital for testing and creating content, especially combat. Ideally I'd like to be able to monitor a unit's AI decisions, etc, live while playing. As well as create/destroy/edit entities.
Chat Window – got this up and running nicely. Not a lot of flexibility yet, though. Still need to implement being able to display pictures (non-text) stuff in it. Something like a progress bar, or whatever. Perhaps icons for items. Also need to get custom buttons working, so I can have choices here; i.e. dialogue.
Problems & ProjectsScope – turns out I've been a horrible programmer this entire time
Scope problems abound; I didn't fully understand what people meant when they say, “global variables cause problems.” I've been using variables within subroutines that are also used in both the routine that called it and in routines it calls; leading to many shenanigans. Fix is work in progress.
Buttons & Menu Structure – back when I was playing World of Warcraft I got a sense of just how complicated interfaces can get. I underestimated. I'm currently working on a parent/child system to allow buttons to identify each other, allowing simple dialogue boxes atop other windows, etc. Otherwise, I'm going to have to go super simple like Ultima style menus. That's not bad, I suppose.
Unit Radius – I'm using 24x32 sprites. That leads to a natural radius of perhaps 6 for small units, and 12 for big units that touch the edge of the graphic. However, the inclusion of variable sized units throws huge wrenches in multiple systems. Not sure if I'll be able to retain variable unit radii.
User-Defined Type Conversion – I failed to find a way to convert one custom Type into another custom Type (without explicitly listing each separate variable). This is going to be a pain when dealing with integers and singles; both of which are used frequently (Integers for mouse coordinates, tile coordinates, etc, singles for timers, NPC coordinates, etc).
Currently I'm simply doubling up my functions, naming them appropriately; IsPointOnScreenInt and IsPointOnScreenSng, etc.
Valence Points – I need a good solution for NPC walkability, pathfinding, etc. One idea I had was Valence Points; a set of points at certain locations around an NPC (or Teleporter, or whatever) that can be Occupied/Empty. So for example when enemies are surrounding you, they will seek out these Valence Points rather than simply moving straight toward you, arranging themselves in a circle around you naturally. It will also help AI, for example when determining what strategy to use to attack; range or melee. If all nearby Valence Points of your target are filled, use ranged. If one VP on the other side is empty and you have no ranged, use Sprint. This also works with store keepers (wait in line since his one VP is filled), Party Members (escort mode, formations), and teleporters (so you don't all cluster at one little corner).
Ooh, good idea! Use Valence Points on teleporters to set destination coordinates! If all available Valence Points at the destination are full, don't teleport yet.
This system is one that causes problems with variable unit radii. VP locations and “layers” will change depending on unit size, and that creates huge complexity. This is like handling multiple tile units in a tile game; always more complicated.
Basic Combat – started on some basic combat elements; damage, death, regen, spawning, etc. I've got a “master entity” spawning child mobs in a certain area when it has under a certain amount of children. This will be the basis for random mob spawning, as well as gathering node spawning. Auto-attack and damage work, so when I kill a mob it (fails to) spawn another. Currently I'm fighting my muddled Party system to stop NPCs from attacking themselves and non-active mobs, etc.