May. 3rd, 2018

Work Post

May. 3rd, 2018 06:17 am
relee: Picture of Relee Starbreeze, Wizard (Default)
6:17am - I started working last night while on the call. That's not normal for me as I can't usually focus, but I was very sleepy and that let me focus somehow. I'm currently continuing the work I was doing last night, putting RogueSharp to work in my experiment.

Right now I'm making a public, static, Dictionary of tile prefabs for different tile types.

7:15am - Okay right now the map is drawing properly, though it's very slow for a unity program since the code I'm basing it off of was written for an optimized console emulator and not Unity. I'm basically destroying and recreating objects constantly instead of conserving and changing them.

Maybe I'll fix that soon, maybe later.

It's mostly a proof of concept at this point, to see if the RogueSharp library will work for me. And it seems it will.

7:45am - I've lost a lot of my enthusiasm now. I'm going to go play some video games then maybe head down to the McDonalds to work some more.

Work Post

May. 3rd, 2018 11:39 am
relee: Picture of Relee Starbreeze, Wizard (Default)
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.

Profile

relee: Picture of Relee Starbreeze, Wizard (Default)
Relee Squirrel

July 2023

S M T W T F S
      1
23456 78
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 24th, 2025 04:10 am
Powered by Dreamwidth Studios