The Tile Sizing Issue V0.0.2
During this week the tile system was implemented and I had couple of issues and challenges. My first issue likely came from the tile itself. Initially I added a cube and changed its material to demonstrate functionality I also resized the cube.
However, I had some major issues first the issues came from the construction I needed to be able to see the tiles so that I could spawn them in a desired location so I added the spawn logic to the OnConstruction Script. When the logic was added here for some reason it was duplicating the tiles at run time. I did a little bit of research and I found "CallInEditor" which enabled the function to be called from the editor itself. I spawned the tiles pressed play and voila it worked and the right amount of tiles were spawned. It was a simple fix and honestly I liked it I found it to be quite flexible.
My Second issue came from the tiles themselves I used the cube as base, so its size was 256x256x256 originally i scaled it down to 0.2 for X and Y and 0.02 for Z giving me a nice tile size of aprox 50x50x5 when I passed in the size I passed in 50 which made sense mathematically. I inspected the tiles and everything looked correct before running the game.
When the method for path finding started running I could see tiles changing colors however visually it looked very weird. Upon inspecting the tiles, I noticed that the size was incremented 4x for each tile at runtime which meant they were on top of each other that is were my visual bug came from. it was extremely weird as I was not modifying the size of the tiles in my code.
First I tried scaling the tiles even smaller/bigger but the tiles kept getting bigger 4x regardless of scaling at run time. I attempted a few things I made it so that the tile size was set in it's constructor for the tile I also checked the scaling when the game was run to make sure the scale was not changing needless to say it was an extremely weird bug. After spending 2-3 hours researching the bug I settled for a simple solution I changed the size in my wrapper to be 4x the size of the tile this fixed the issue with the tiles spawning now they were next to each other and working as intended.
On the picture I attached you can see how the tiles currently look before the game is played they look quite spaced out however at runtime they will spawn correctly and work as intended. I do plan on improving this system further and I also plan to keep trying to find the source of the bug but for now the functionality is there and I would consider this a known shippable bug as it does not affect the user experience in any way.
Sod & Steel
Guard the untouched grass! Battle waves of foes in a rogue-lite bullet hell with unique weapons and power-ups.
Status | Released |
Authors | Ctrl+Alt+Delinquents, AnthonyTartagliaFSU, Camodude120, Apollo1313, RamoHarper, BotoCollin |
Genre | Action |
Tags | Bullet Hell, Roguelite, Top-Down |
More posts
- Sow what now...?2 days ago
- 🌱 Devlog v0.0.2 - When Blades Become Walls2 days ago
- v0.0.2 Pausing Dilemma2 days ago
- V 0.0.2 Update: lighting, item spawning, map update2 days ago
- Change Log v0.0.18 days ago
- 🌱 Devlog v0.0.1 — A New Seed Sprouts on player rotation9 days ago
- V0.0.1 The Tile Map9 days ago
- V 0.0.1 Map creation9 days ago
- v0.0.1 No custom premade buttons10 days ago
Leave a comment
Log in with itch.io to leave a comment.