Log 2


6 Hours Later

I think it's been kind of close to 6 hours. Not totally sure. 

ALRIGHT what did I do today. Yesterday I left off having a basic WaterSpill over thing working. I refactored a little bit; moved "Where the sprite gets changed" and "clamp the water within it's limit and 0" to happen whenever the water var gets set(). Only a slight cleanup. It introduced a couple more errors with getting a null World reference. I really would like to understand what the intended way to sequence things is. I SHOULD ASK THAT OF COPILOT NEXT TIME.

I honestly feel like I didn't accomplish all that much. I made SandTiles and StoneTiles, which was actually really quick! What I had built as a base with GardenTile was DEFINITELY worth it. It allowed me to just slap the StoneAnd Sand tiles together, without any effort at all, really. Only took, like, a minute or two.

I think I definitely should have outsourced all of the Water work to its own scene. THAT'S WHAT I DID.

I had to figure out how to stop all the recurrsion when spreadig water. Basically what I landed on, is flagging if it spread water already, this time step. Then at the end of the time step, I set all the tiles to clear that flag. SO I already had to keep some state regarding water tracking, in the water checking process. Which I guess is what I was trying to avoid? What I need to do in the future, is find a way to have communication go back and forth, between tiles. What I have right now, is each tile picking a random direction, adding its own coord to the dir, then telling God [some arbitrary entity at the top that can reach anything] to add water at that new location. Which is only one-way comms. If I had two-way, then the other tile could say "No", and the originator could pick a new direction. I guess I don't totally have a solution if all of a tile's neighbors have water? But they could figure it out!

So that's what I need. Two way communication. Or, communication between any number of arbitrary tiles. And then maybe a centralized source that performs the action? Maybe I don't actually need that?

Big take-aways:

- Doing the base work (GardenTile, GardenActions, SpreadWater) makes setting up new shit (StoneTile, SandTile) REALLY easy.

- Tiles need to be able to communicate back and forth with any/all other tiles

- I should put tile actions in their own child scenes, so that if they need to manage state, it's very easy to do.

- This will work handedly with having tiles directly communicate with each other. Since the message won't have to go through any God

- Remember: CALL DOWN. SIGNAL UP.

I did a little with buttons. Going to set those up next. Set up Placing a seed next, too (which I think is going to be a WHOLE thing)

I think reading the docs is also really hepling. It'll def be worth it to go back and re-read the basic manual, style guide, best practices, etc.

POST

I was just showing it to Katlin, and I realize that, I need a God to be able to place water, from some external, non-tiled source (me. the player) SO that still needs to be able to exist, but I ALSO need to be able for tiles to act directly with each other... hmm...

I could have the behaviour defined somewhere arbitrary. Like... Idk. In a class? In a resource? Probablly in a Resource. Then I can Tell the God to access that resource... and then the tiles create an instance of that behaviour? 

That might actually make sense. If each of them can do it their own way. hmm.

Leave a comment

Log in with itch.io to leave a comment.