This is all still in the thought process, but this is what I was thinking for doing such a game.
I want to have a bunch of rooms that are connected, but no scrolling is involved. If you can exit the edges you are in a new room.
The rooms themselves, I was thinking of having definitions for each one. Some examples would include:
-The obvious one, an array of the 16x16 tiles that make up the room.
-The tiles themselves would have some definitions like what type they are (floor, passable, spike, lemon), what attribute #, and what four 8x8 tiles are needed to draw it.
My thoughts for doing something like this would be like this:
-Things like events that would occur in the room, if applicable. After drawing the BG, it would check for if it's a special room like a boss room. The boss may have events for its entrance and such. If no event takes place, then control is simply given back to the player.
Anyway, this is my proposed plan. I just wondered if what I'm thinking is reasonable or if there's anything that looks seriously wrong with it.
Thanks.
I want to have a bunch of rooms that are connected, but no scrolling is involved. If you can exit the edges you are in a new room.
The rooms themselves, I was thinking of having definitions for each one. Some examples would include:
-The obvious one, an array of the 16x16 tiles that make up the room.
-The tiles themselves would have some definitions like what type they are (floor, passable, spike, lemon), what attribute #, and what four 8x8 tiles are needed to draw it.
My thoughts for doing something like this would be like this:
Code:
gameRoomArray:
.dw room_01, room_02, ...
room_01:
.dw SomeTileNameToLoadIntoCHRRAM ;Something here to specify if some new graphic tiles may come into play to draw the room
.dw giveControl ;Events
.db $01,$01,$02,$03,$02,... ;The tiles that draw the room
room_02:
.dw SomeTileNameToLoadIntoCHRRAM
.dw bossEntrance ;Events
.dw giveControl
.db $01,$01,$02,$03,$02,... ;The tiles that draw the room
tileSetArray: ;Various areas of the game may have different graphics and thus a different tileset...
.dw tile00Definitions, tile01Definitions, ...
tile00Definitions:
.db $00 ;Passable
.db $00 ;Attribute 0
.db $00,$01,$02,$03 ;The four tiles to draw it. Top left, top right, bott left, bott right...
tile01Definitions:
.db $01 ;Solid
.db $01 ;Attribute 1
.db $10,$11,$12,$13 ;The four tiles
.dw room_01, room_02, ...
room_01:
.dw SomeTileNameToLoadIntoCHRRAM ;Something here to specify if some new graphic tiles may come into play to draw the room
.dw giveControl ;Events
.db $01,$01,$02,$03,$02,... ;The tiles that draw the room
room_02:
.dw SomeTileNameToLoadIntoCHRRAM
.dw bossEntrance ;Events
.dw giveControl
.db $01,$01,$02,$03,$02,... ;The tiles that draw the room
tileSetArray: ;Various areas of the game may have different graphics and thus a different tileset...
.dw tile00Definitions, tile01Definitions, ...
tile00Definitions:
.db $00 ;Passable
.db $00 ;Attribute 0
.db $00,$01,$02,$03 ;The four tiles to draw it. Top left, top right, bott left, bott right...
tile01Definitions:
.db $01 ;Solid
.db $01 ;Attribute 1
.db $10,$11,$12,$13 ;The four tiles
-Things like events that would occur in the room, if applicable. After drawing the BG, it would check for if it's a special room like a boss room. The boss may have events for its entrance and such. If no event takes place, then control is simply given back to the player.
Anyway, this is my proposed plan. I just wondered if what I'm thinking is reasonable or if there's anything that looks seriously wrong with it.
Thanks.