
9:23am - Well I'm at the McDonald's now and just beginning work again.
Now that I've got the test stuff completed I need to tear it up and do it Unity style. That's surprisingly emotionally difficult. It's like, I just made this stuff and now I'm throwing it away. So sad. ~<3
Anyways I also have to figure out what Unity style is in this context. The RogueSharp stuff seems to do best as a sort of data layer so maybe I should try MVC for this? A lot of the Roguelike stuff I've seen has been MVC or single file and I'm definately not doing single file.
So, I'll need to make a Model, a View, and a Controller.
There'll be a GameplayModel script/object that holds the game's data, a GameplayController script/object that handles input and updating the Model, and a GameplayView script/object which will manage the object heirarchy in the Scene.
Now, GameplayView is definately going to be a Monobehavior on a GameObject. I'll probably name the root gameobject as View just to tie them together. GameplayController likewise will be a Monobehavior Game Object so it can take user inputs. But what about GameplayModel? At first I was thinking of having it just be a detatched class, but then it has to live on some other object. Instead I think I'll make it a ScriptableObject so it lives on its own.
9:45am - I'm writing the GameplayModel and I'm wondering if I shouldn't make it a gameobject after all and set it up as a global singleton. That way it can initialize itself instead of having to be initialized by another object. I was thinking I wouldn't have to do that if I made it a ScriptableObject but I think I do after all.
So yeah I'm going to turn it into a Singleton after all.
10:26am - The internet's been down for a while so I don't know if I'll be able to post this when the time comes, but for now I can still add to it. I've been having trouble figuring out how to set up my program and I decided to look at the code for the map internally in RogueSharp and I was surprised by what I found. The map isn't represented by a grid of Cell objects like I expected; rather the internal representation of the map is three multidimensional arrays of booleans for transparent, walkable, and explored.
I thought I could just extend the Cell class to make cells with a type, so I could have sprites. But now I'm not sure what to do. I'm going to pour over the code a bit and see if I can figure it out.
10:59am - It's not going well. The more I look at it the more it seems I'd have to modify almost every method in the Map and Cell classes to add in a tile grid or material type.
I should clarify that. I figure I could either add a number to tile lookup table or do it as material, and let the view determine which tile should be used based on the material of the cell along with its position relative to other tiles.
I could also just use it as is and have each dungeon level use only one material. But that wouldn't work for things like the town, and then what if I want to put decorations in the dungeon?
Hmm...
I want to look some things up but there's still no internet at the McDonalds. I think I'd better pack up and go home for now.
11:40am - I'm home now and of course with home comes internet but also distractions. So, I'm not sure if I'll jump back into my work or not.
10:29pm - Well the way it turned out I climbed into bed and fell asleep for a long time. Alas.