programming

resource/entity management : sep 02

you could set up two databases. one is the resource database and that lives as a named database that is part of the platform. in theory the editor could load the same resources as the game and there would be two copies. who cares.

each resource has a timer on it that will release it after non-use for a certain amount of time. this time can be set as high or low as you want to keep it around for however. if something does get deleted that is needed it doesn't really matter because it will just be reloaded.

a real game and an editor with a game are similar.

editor is started you can't just load in a map, you have to load in a game. a game has a list of users and a list of level names. the editor chooses the "editor" user automatically. You choose what level you want to work on. one of the level names is create a new level that'll create a new one. all creating one does is make a new name in the list and it is chosen like any other level. when you are editing you are working on a live version of the start of that level. it works just like any other save game. the game itself really is just completely described by its entity database and that
is what you are loading in. when you use the play game tool it saves out the database. you can then
play the game and even edit stuff, but if you save that out it will be the start. while you are editing in gaming moding a button will be on the screen that will reload the database to where you started and take you out of gaming mode.
if you quit out of the editor and restart it won't remember what level you were working on and you'll to load it from scratch. you can choose it from a most recent or something. maybe with a command line switch you can force it to start on one.
there is only one game in use at any given time in the editor. if you want more than one game for client server testing or something then you have to put multiple editors in a window. they are
completely separate and know nothing about each other. when i say game i mean an instance of a game. they could be the same type of game, or two different types. you would connect between the two only by going through the game menus and starting a server on one and have the other join it. the real game still lives works the same except it uses a different tool to run it. when the tool is first run it starts the game on the first menu. it only allows you to deactivate the tool from the console or menu. when a game user is chosen it loads up that gbUserInfoDatabase. inside that gbUserInfoDatabase is a list of entities that are in charge of the different menus. at start the game always chooses the one named "mainMenu"