Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2014-12-24 04:22:29

DanSensei
New member
Registered: 2014-12-24
Posts: 2

GBDK set_bkg_tiles

I'm really having it out with this function. I got a scrolling thing going with collision detection, but I'm VERY limited now. I can't choose where I want to set the player or load any part of the map besides the top left. I can just put the player sprite where I want of course, but I'm trying to be somewhat professional about this, so I'm sticking it in the middle of the screen (at 72,72) and moving the map around it, like a GB game or the ship on Futurama.

The command is: set_bkg_tiles(0, 0, 50, 50, Testmap);
The first 2 are the tile axes to place the map,
the second two are the size of the map
Testmap is the name of the map

The problem is that if I change the first 2, I just get garbage in some parts of the screen. If I change the second two, the whole map is warped. I've seen people point to a certain point in the Testmap array, like Testmap[50], but for some reason that screws up what tile is loaded in what spot.

I'm pretty sure that this is the biggest hurdle for a LONG time in learning GBDK (except for sound, which I'm leaving for last and dreading) Can anyone help?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson