Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Let's Build an RPG! A GB Studio Tutorial Series

Follow along on GB Studio Central as we build an RPG Battle System together! · By Lazy Dev Games

Set Camera Position corrupts everything

A topic by rcpder created 3 days ago Views: 17 Replies: 2
Viewing posts 1 to 2

Hi, I've been tinkering with this system and it looks great - waiting for part 4!

However, I noticed something. Camera shakes with a default screen size will display garbage tiles on the sides. I tried to increase the screen size keeping proportions (from 160x144 to 192x176) but this seems to absolutely corrupt the game.

I placed a new Set Camera Position event in the battle scene, right at the start, to offset the starting angle (2X and 2Y to center everything). But this is what I get. Sometimes I can see the menu, but even when that happens, nothing works after the first attack. Am I missing something?

Developer

You'll need to make sure the position references for various events are updated whenever you change the background's dimensions! In this case, if you expanded the scene to 192x176, your Replace Tile At Position events are now offset, so you're replacing all the tiles that match the new positions (in this case, it looks like it's grabbing a blank white tile).

Based on what you called out for the junk tiles, I messed around with an updated battle scene of 176x160 (putting a 1 8x8 tile black border around the scene) and the set the camera position (and updated my event position references), and it doesn't seem to use garbage tiles when shaking the screen anymore. It's a good call out, so I'll update the backgrounds for future Quests (I also want to clean up the text box borders so this is a good opportunity for an update).

Let me know if that works!

Hi, thanks for getting back to me. And you're right, I forgot that it was updating the tiles! Thanks for pointing that out - it's working now ^_^