mirror of
https://github.com/italicsjenga/gba.git
synced 2025-01-11 11:31:31 +11:00
better path forward
This commit is contained in:
parent
241fb1746c
commit
ea7b98f81b
|
@ -15,3 +15,8 @@
|
||||||
* [The VCount Register](ch02/the_vcount_register.md)
|
* [The VCount Register](ch02/the_vcount_register.md)
|
||||||
* [light_cycle](ch02/light_cycle.md)
|
* [light_cycle](ch02/light_cycle.md)
|
||||||
* [Ch 3: Memory and Objects](ch03/index.md)
|
* [Ch 3: Memory and Objects](ch03/index.md)
|
||||||
|
* [Tiled Backgrounds](ch03/tiled_backgrounds.md)
|
||||||
|
* [Object Basics](ch03/object_basics.md)
|
||||||
|
* [GBA Memory](ch03/gba_memory.md)
|
||||||
|
* [GBA RNG](ch03/gba_rng.md)
|
||||||
|
* [memory_game](ch03/memory_game.md)
|
||||||
|
|
|
@ -1,17 +1,33 @@
|
||||||
# Ch 3: Memory and Objects
|
# Ch 3: Memory and Objects
|
||||||
|
|
||||||
Alright so we can do some basic "movement", but we left a big trail in the video
|
Alright so we can do some basic "movement", but we left a big trail in the video
|
||||||
memory of where we went. Most of the time that's not what we want at all. If we
|
memory of everywhere we went. Most of the time that's not what we want at all.
|
||||||
want to draw something over top of our background without trashing the
|
If we want more hardware support we're going to have to use a new video mode. So
|
||||||
background memory that's an "object" (but not in the "Object Oriented" sense).
|
far we've only used Mode 3, but modes 4 and 5 are basically the same. Instead,
|
||||||
You might recall that objects have their own layer that you can enable in the
|
we'll focus on using a tiled mode. The tiled modes take less time to arrange,
|
||||||
display control register.
|
which means more time for game computations. If your game has much complexity at
|
||||||
|
all, you'll naturally want to use a tiled mode to display it.
|
||||||
|
|
||||||
Of course, once we're drawing these objects we'll want some scratch space to
|
Tiled modes bring us two big new concepts that each have their own complexity:
|
||||||
work with them a bit, so we'll finally go over the GBA's full memory layout.
|
backgrounds and objects. They share some concepts, but fundamentally the
|
||||||
|
background is for creating a very large static space that you can scroll around
|
||||||
|
the view within, and the objects are about having a few moving bits that appear
|
||||||
|
over the background. Careful use of backgrounds and objects is key to having the
|
||||||
|
best looking GBA game, so we won't even be able to cover it all in a single
|
||||||
|
chapter.
|
||||||
|
|
||||||
And since most games are pretty boring without an RNG, we'll cover the kinds of
|
Of course, once we're all set drawing the objects and backgrounds, we'll want
|
||||||
RNG that you might want to include in a GBA game.
|
them to start keeping track of what's where, and maybe store info on stuff
|
||||||
|
that's off screen. That means it's finally time to go over the GBA's memory
|
||||||
|
layout so that we know where we have scratch space to work with.
|
||||||
|
|
||||||
Then we'll do something or other that includes moving things and and RNG...
|
And, of course, since most games are pretty boring if they're totally static
|
||||||
which is pretty much any game at all.
|
we'll touch on the kinds of RNG implementations you might want to have on a GBA.
|
||||||
|
Most general purpose RNGs that you find are rather big compared to the amount of
|
||||||
|
memory we want to give them, and they often use a lot of `u64` operations, so
|
||||||
|
they end up much slower on a 32-bit machine like the GBA (you can lower 64-bit
|
||||||
|
ops to combinations of 32-bit ops, but that's quite a bit more work). We'll
|
||||||
|
cover a few RNG options that size down the RNG to a good size and a good speed
|
||||||
|
without trading away too much in terms of quality.
|
||||||
|
|
||||||
|
To top it all off, we'll make a simple memory game sort of thing.
|
||||||
|
|
Loading…
Reference in a new issue