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.
I've been recreating snake for the gameboy with the gbdk, and I am having trouble with the background loading correctly.
The tiles that have been loaded into vram look like corrupted versions of the ones I made.
Here are the Tiles in vram, what the original tiles look like, and the map I made for it: https://imgur.com/gallery/yzAaC
Here is the first bit of my code here:
#include <stdio.h>
#include <gb\gb.h>
#include <gb\drawing.h>
#include "Sprites\ShockedFace.c"
#include "Sprites\BlinkFace.c"
#include "Sprites\SnakeTiles.c"
#include "Maps\SnakeMap.c"
void main(){
//Setup Variables
int x = 75; // Our beginning x coord
int y = 75; // Our beginning y coord
//Setup Sprites
SPRITES_8x16;
set_sprite_data(0, 8, SF);
set_sprite_tile(0, 0);
set_sprite_tile(1, 2);
move_sprite(1, 75 + 8, 75);
move_sprite(0, 75, 75);
SHOW_SPRITES;
//Draw Border
set_bkg_data(0, 53, STiles);
set_bkg_tiles(0, 0, 20, 18, SnakeMap);
SHOW_BKG;
DISPLAY_ONAny help would be appreciated! ![]()
Offline
Try looking through this thread:
http://gbdev.gg8.se/forums/viewtopic.php?id=525
They had similar issues with tile data initially. I believe it was a result of some incorrect export options from the tile/map editor tools.
Offline
Sorry, but I got the same results as before. I may have just didn't change the right thing, or I don't know what i'm doing well enough.
When I was looking at the c file for the tiles and it looks like it's doesnt match, but that may just be me talking: https://imgur.com/a/m7eZ6
Offline
Nvm, I just used common sense and changed it from 0 to 0, to, 0 to 53....
Thanks for the help though!
Offline