Alucard94, I only found out about this from a friend the other day and I have to agree, it's not half bad.
Zergei, I've got a script system I can use from my other project (Fallout 3 Remake, which is on hold at the moment).
Let me quickly tell you about my engine cause this isn't a common one. I've set my sights high as I usually do but I find I improve best when challenged. Anyway, when I look around for info on how to create tiles and set up maps I noticed that they where set up oddly. Something like this:
dim Dungeon(20,15,3) - So that’s 20 x 15 tile with 3 layers
dim Tavern(15,18,2) - So that’s 15 x 18 tile with 2 layers
`Then they use data statements to setup the maps , and collision which seems odd to me:
`map dungeon – only show a small section
data 15,12,24,12,15,12
data 15,15,24,15,15,15
data 15,15,15,15,15,15
`collision layer
data 1,0,0,0,1,0
data 1,1,0,1,1,1
data 1,1,1,1,1,1
`overhead layer - not to sure what this is
data 0,12,0,12,0,12
data 0,0,0,0,0,0
data 0,0,0,0,0,0
I maybe completely need to the 2D game thing, but why are people setting this up in this way, you have to do this for each map, plus it's a bit limited, all are say is this is not the way forward, it should be made in a way that most of the content is made outside of the engine or produced by an editor without looking at a line of code, only scripts. Once I’ve cleaned up my code i’ll show you what I mean.
The way i've created my engine lets me create maps of infinit size while only using 20x15 Tiles * 5 Layers (the fifth layer is the event layer, where I can set events to tiles) of sprites (minus blank sprites) while using 1 loaded image for the entire map. I can even create all my maps using text files without setting up anything before hand (like collision or anything of that nature).
NPC’s don't have a set path or event (ish), rather they have thresholds that tell them what to do. So if a farmers hunger threshold is at it’s limit he we’ll go home to eat, if theres nothing at home to eat, he’ll go to the nearest shop that sells food to stock up and go home and eat.
NPC events work by event type, so if it’s a message event they will still conitue doing what they are doing until the event is triggered, like you talking to them. If it’s an NPC task like shopping and eating, the task event threshold will carry those out, or be shifted to the top of it’s event list by other thresholds.
Best way to think of it, is a 2D version of Oblivion (in the way NPC work). But because NPC's will dynamically do things on there own i'm having difficulty trying to figure out how to setup the event system, once it's in motion it's simple but the intial stage is hard.
A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.