• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Arek the Absolute

GBA- Problems with Character Base Block 0

2 posts in this topic

I''m a bit confused here... I''ve got a GBA project going in Mode 0, and I''m using four backgrounds. However, some of the data I put for BG0 is always corrupted... And frankly, I don''t understand what''s going on. Here''s a code clip:
  
// set up backgrounds

REG_BG0CNT = TEXTBG_SIZE_256x256  | CHAR_BASE(3) | SCREEN_BASE(0) | BG_COLOR_256 | BG_PRIORITY(0);

REG_BG1CNT = TEXTBG_SIZE_256x256  | CHAR_BASE(2) | SCREEN_BASE(20)| BG_COLOR_256 | BG_PRIORITY(1);

REG_BG2CNT = TEXTBG_SIZE_256x256  | CHAR_BASE(1) | SCREEN_BASE(3) | BG_MOSAIC_ENABLE | BG_COLOR_256 | BG_PRIORITY(2);

REG_BG3CNT = TEXTBG_SIZE_256x256  | CHAR_BASE(0) | SCREEN_BASE(9)    | BG_MOSAIC_ENABLE | BG_COLOR_256 | BG_PRIORITY(3);

// load the background palette

for (i = 0; i < 256; i++)
    BGPaletteMemory[i] = BGPalette[i];

// copy the tiles to the background memory

u16* Background3Mem = (u16 *)CharBaseBlock(0);
u16* Background2Mem = (u16 *)CharBaseBlock(1);
u16* Background1Mem = (u16 *)CharBaseBlock(2);
u16* Background0Mem = (u16 *)CharBaseBlock(3);

// the tileset intended for each layer is 128x128, or 16x16 tiles

for (i = 0; i < 128*128/2; i++){
	Background3Mem[i] = image[i];
	Background2Mem[i] = image[i+8192];
	Background1Mem[i] = image[i+16384];
	Background0Mem[i] = 0x0000; // I have my reasons.

}

// set the screen mode

SetMode(MODE_0 | BG2_ENABLE | BG3_ENABLE | BG0_ENABLE | BG1_ENABLE  | OBJ_ENABLE | OBJ_MAP_1D);
  
Just for your information, most of the constants, etc. come from Dovoto''s tutorials, but a few might be from Staring Monkey''s also. You can probably get the point, even if you haven''t seen them, though. When I run this code, the data for a number of the tiles on the bottom layer (BG3) is just blue garbage. It''s almost like some of the data in CHAR_BASE(0) is unavailable to me, or edited elsewhere. I can''t find anywhere in my code that I might be messing with the image data for the backgrounds though. Is it possible that I''m using more space than is given to me in each base block? If that''s the case, I don''t get why it only happens on the layer assigned to base 0. That, and the tiles at the end of the array don''t always get garbled... Anyone have any ideas? -Arek the Absolute
0

Share this post


Link to post
Share on other sites
Well... Can someone just give me a quick example in Mode 0 that uses Character Base Block 0? I've been playing around with it, and even if I don't use any layers (other than the one using character base 0), base block 0 never works for me... Ick. This is depressing sometimes, no?

-Arek the Absolute

[edited by - Arek the Absolute on May 14, 2002 10:26:42 PM]
0

Share this post


Link to post
Share on other sites
If this "(u16 *)CharBaseBlock(0);" does what i think it does then you are indeed overwriting the information in bg0. The reason behind this is that SCREEN_BASE(0) = 0. and CharBaseBlock(0) = 0 also. The vram on the gba is very flexible, but at the same time it makes it easy to shoot yourself in the foot.

The system I use is to initialize all layer to use character base 0. Then I set up the layers on screen base 28,29,30 and 31. This works great if you aren''t doing 4 bit layers and allows you to mix tiles across layers which also saves on vram.

Hope this helps!
0

Share this post


Link to post
Share on other sites