1 year ago

I think I should rip all the Flooring out of my game...
They're objects, and I don't think they need to be.


All I need is to store a value in a grid, I can then use my lookup system to get the correct sprite to draw after the ground has been drawn.

I might be able to get away with adding decimals to indicate which sprite frame to draw, so you can still have different patterns.

If not, I can store arrays in the grid instead, then I can skip the lookup and just have; grid[# x,y] = floorType,sprite,frame instead. Which is basically what I do for my ground when there's an overlay (although with that it's 2 separate grids, one for the base ground tile and one for the extra info).

I can keep things like faster movement over flooring and buildings needing them by checking the grid coordinates instead of doing a collision check.
It's funny how scared I was of grids when I first started making this (the documentation hammers home that point) and now I'm using them for a bunch of stuff

Heck this would save me having to do adjacent checks when placing floor to see if there needs to be an end piece, since the end will automatically be drawn over because draw priority works topleft to bottom right.

Means I can't have the building placement effect though. I couldn't get the tween system to work with array values, so one nested in a grid is probably out too.

Can do the same with Roofing too...then I can skip drawing the roof if the grid x/y is z distance to player....

edit; actually depth probably wont let roofing work



0 comments

Loading...

Next up

I THINK that's all fixed and working? Gained loads of FPS back.

I thought I'd need to remove another nested for loop, but since Ground Surface is only done once I don't.

Only issue is I've lost the dust cloud when adding Paving.

OMGOSH Someone just subbed to me on #Kofi!

Thank you so much for your T2 membership Jana, I sincerely appreciate your support!

It will really help me out a lot!

Ok, got some tile variations on the Beach, but it's just RNG. I need to work out some patterns and use those instead. I had some with little bits of grass but they looked bad.

Also added Shells and Glass Bottles.

Happy #WIPWednesday!

Are you working on a game?

Making some art?

Practicing a song?

Something else?

Tell us in the comments!

Got around to adding some blending between the Beach and Desert now i should probably populate the Beach with some things to make it a bit nicer to look at!

Will do tile variants like I have for Grassland, but I'd like objects to interact with too.

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

I now have Magic!

kinda.

Hmm. Attack movement (for spells) set attacks to use if runSysTimer mod 10 == 0, instead of the if alreadyHit == false, to run the collision code.

Seems to work I should probably experiment to see how infrequent I can be with the trigger.

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

Ok! Footprint particles are all working again! Prioritises snow over the ground types. I should add a decay timer in case you stand still too long