#7835 - Wiktor - Thu Jun 26, 2003 9:59 am
Hi!
I want to draw animate stars(like in arcanoids) and i have to use PutPixel(like in 13h). Can i use it and draw 1 pixel on backgroud? If no how can i draw stars?(unfortunately i think i can't do that :(
#7840 - Lupin - Thu Jun 26, 2003 1:07 pm
in wich mode do you work? It depends on the graphic mode, you couldn't put pixels in tile modes...
#7844 - Wiktor - Thu Jun 26, 2003 3:32 pm
ok so if i can't draw 1 pixel (i knew it...) how can i draw stars?(on background)
#7846 - niltsair - Thu Jun 26, 2003 3:44 pm
Well in mode 3,4,5, you can access the screen as a bitmap.
In mode 3,5 a pixel takes 16bits, which mean you could write 1 single pixel.
In mode 4, a pixel takes 8bits, which means you have to write 2 pixels at a time. (the video memory must be accessed in 16 or 32bits).
If you only want to quickly learn GBA programming, use mode 3, there you access the screen as a 240x160pixels table, 1 pixel at a time.
#7853 - Lupin - Thu Jun 26, 2003 6:18 pm
Wiktor, if you don't use mode 3/4/5 you are using an tile mode - simply create an background layer with some stars sprites, i did it that way too. You could also use bldmod register to blend the stars into another background (looks quite good in my rom), then the stars could also have semi-transparent pixels
nilstair: Why do you think that learning GBA programming by using mode 3 is quick? The hardest part of GBA programming isn't the gfx, I think it's the interrupts, timers and the most hardest part is the sound :/
#7854 - niltsair - Thu Jun 26, 2003 6:40 pm
True, gfx aren't the hardest part which is perfect since it'll give you the satisfaction of quick result while learning the basis of GBA. From there you start to broaden your knowledge. You don't try to do an audio mixer when you still have no concept of the hardware capabilities.
My first program on the gba was a gradient display in mode 3, I was quite happy with it and it was fun enough for me to continue forward. I haven't touched the sound aspect of Gba (I have absolutly no knowledge of that area (on any platform) but i'm now trying my hand at a raycasting engine. To get there, there's quite a lot to learn, and it should be done gradually.
Just my humble opinion :-)