chrismaltby / gb-studio

A quick and easy to use drag and drop retro game creator for your favourite handheld video game system
https://www.gbstudio.dev
MIT License
8.51k stars 469 forks source link

Feature request: Matrix/array system and control commands for #1043

Open PRobbie opened 2 years ago

PRobbie commented 2 years ago

I would like to request a feature for GB Studio that I believe would greatly increase the type of games that would be developable, and certainly help developing current styles of games so much easier. I have one specific game I have been entertaining porting for quite a while but it just isn't possible using the current GB Studio and available commands. It is a game that I think would be so enjoyable and appreciated by many GameBoyers!

Basically a Matrix/Array definition system (herein to be referred to as Matrix only) and control commands for, in relation to using tiles/graphics to represent the state of the matrix. Why? Well...in the game I would like to create it is simply not possible to create using actors as the number of actors needed exceeds the current GB Studio limits. And the graphics don't need to be moved as such. They only have to be able to change their look.

Basically I want to be able to define a matrix of 20 x 18 positions - being representative of the screen tiles being 8 x 8 pixel sized tiles, within the 160 x 144 GameBoy resolution. I want to be able to define and redefine the values in the matrix, to represent screen changes based on various events, and have this reflected on the screen. If for example at the start of the loop all the values within the 20 x 18 matrix are the value 1, then all the tiles on the screen will have the same look. But if I want tile position 10,9 to look different to all the other tiles, I want to be able to redefine the value in the matrix to say the number 2, and have my routine read the values in the matrix, and update the tiles accordingly - and effectively have the tile at position 10,9 be different to all the other tiles. in my particular game I need to be able to have the available numbers in the matrix be at least 16 different values (I am not sure if 8 will cover it - I need to look into the amount of possible different tiles again - of course, GameBoy hardware number handling may only allow 8 to be possible - if 16 could be possible it would greatly enhance possibilities).

So basically having the commands to define a matrix (via a table or similar), and redefine key positions in the matrix easily, and have the matrix reflected by tiles on the screen is the request. Addition, subtraction, etc. The more defineable the matrix via the commands, the better.

You may ask, why not define a bunch of backgrounds and switch between them? The answer is because the amount of possible backgrounds to match all the possibilities is completely impractical. It would be 20 tiles x 18 tiles x 16 different tiles x 60 stages = 345,600 possibilities - juuuust a few too many!!! Whereas if I can just define the 16 different types of tiles, and display different tiles as needed, based on an easily configurable matrix, my game will be doable.

I really do not wish to give away the game I would like to port - and I don't think it is necessary. I can mention games that I think use a similar matrix system and hopefully this gives people more of an understanding. Think Pacman. and how the pathways and dots being controlled via a matrix would make sense (especially since the possible number of "actors" to do the same would be huge and therefore over the limits of GB Studio. Think of those picture puzzle sliding games. Perhaps games like Tetris could use this matrix system. Games like Columns. There is a game just saw on on the C64 called Pieces II that would probably use this type of system. Think Boulderdash (but obviously there'd be no animation as the tiles "move"). Think maze type games. Think perhaps a jigsaw puzzle game. Think "snake"" type games (with a fat snake). Those kind of games. Without giving too much away, my game is much more exciting than most of those styles!

I hope my request is clear and people appreciate the possibilities in the variety of games such a system would allow...to see these commands added to GB Studio would be fantastic! Thank you...

teaaaaaaaa commented 2 years ago

I think there's already a feature like that being developed, which is, according to the engine, the set tile submap event.

PRobbie commented 2 years ago

That is freakin' awesome teaaaaaaaa!

Would you happen to have a link to the discussion/post/reference please? It'd be great to read about it.