Oct. 7th, 2020

Work Post

Oct. 7th, 2020 07:43 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
7:43pm - So first off, I worked a couple times the last two days for about an hour or two each, so that's nice. I didn't make work posts though because both times I thought I'd just be poking something for a little bit and be done, and it lasted longer than I expected but ended suddenly.

I'm currently stuck on a problem with the loading and displaying. I'm not entirely sure where the problem is to be honest, but the result is a map of just Stone Walls.

The way the process works is, it creates a new map, which is all Stone Walls at initialization, and then modifies each tile in the map to its proper shape. Then it displays the map on screen by going over each tile in the map and modifying the cell in the TileMap matching its position to the right tile. Currently there are six tiles; a wall and a floor each for Grass, Dirt and Stone.

So at some point it's either not changing the Map data to the appropriate tiles, or it's changing them incorrectly to stone, or its not reflecting the changes in the display properly.

I've tried testing all of those options and they all seem to come out fine, but the results are still wrong, so I'm going to test them again even more stringently while recording the results here.

First I'll check the Map data again, to see if it's correct.

Okay, at the point of displaying the tiles, Map Cell 0,0 is Stone. It should be Grass. So the data is wrong there, not the display. I'll keep tracking to figure out where the data goes wrong.

8:15pm - Aha, I found one major bug. It wasn't going through the Match statement because it was using a Float and comparing it to Integers. It's still buggy but at least I'm making progress!

9:06pm - Oh for crying out loud. It wasn't in the MapLoader or MapController scripts at all. The problem was in the set_cell_properties function. It was setting the terrain type for x,x instead of x,y! Geez. What a bug! Everything works fine now.

I'm going to take a break though because I've got things to do with some friends.

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 Sep. 4th, 2025 03:11 am
Powered by Dreamwidth Studios