How do you make a World Editor?

Blitz3D Forums/Blitz3D Programming/How do you make a World Editor?

Yeah. placement editor is what I'm wotking on. It's pretty basic, as it just loads or creates primitives that are positioned/rotated/scaled/alphaed/textured. I'm also going to have two file formats. *.cscen and *.scen. The *.cscen will be the compiled scenario file, containing the raw PRSAT data, while the *.scen file will contain the individual steps to create the data. I have one command so far that would show it's data in the *.scen file and not the *.cscen file. It's a command that aligns an object to the level. this just changes it's position.

anyway, enough about my editer. as far as Npcs go, what kind of AI npcs are you doing? enemies? townspeople? allies? In the case of enimies, a lot of times it is safe to create some basic enemy behavior functions that make dicisions upon the enemies AI settings, the enemies enviornment, and the enemies status.

For instance, somthing in the files says that the enemy patrols several specific points. The player is not detected in the local enviornment, and enemy didn't see the player recently. The function would then lookup the enemies movement speed and turning speed, and begin patroling. then, lets say the player came around the corner in front of the enemy. The function would look up the enemies reaction time, and switch mode from patroling to engaging player once the reaction time was up. the enemy might then have an accuracy setting that represents how accuratly it shoots.

townspeople might have a file with dialog, answers to questions, as well as commands to modify the players status, for instance taking away 5 gold and giving an item.

I don't know much about programming allies, but I figure that it is a more sophesticated version of an enemy. Perhaps a mix of townsperson and enemy AI with the ability to take commands.

other than that, good luck.