In my game I'd like to have enemies randomly drop health or various power up as they are defeated, kinda like in Mega Man games.
The problem is that if I make it actually random (using a RNG), it will end up "too random", and there would be always some chances to get a lot of rare items consecutively. Additionally as long as the RNG isn't perfect, the number probability is likely to be a bit off.
So I decided not to make it random (kinda like the "random" encounters of Final Fantasy games).
My idea was to have a table with a lot of entries, $00 means no item is dropped, other numbers tells the number of an item to be dropped. Only the increment in this table is random, which varies between 1-4 (so it only relies on 2 bits of the RNG).
This idea woked very fine, but there is a major problem : The table takes a large amount of ROM space, and if I'd like to have stronger monsters more likely to dropp items then I have to have multiple tables, wasting a ridiculously high amount of space.
So anyone here have an idea to make item dropping not random, but in a solution that doesn't waste too much ROM ?
The problem is that if I make it actually random (using a RNG), it will end up "too random", and there would be always some chances to get a lot of rare items consecutively. Additionally as long as the RNG isn't perfect, the number probability is likely to be a bit off.
So I decided not to make it random (kinda like the "random" encounters of Final Fantasy games).
My idea was to have a table with a lot of entries, $00 means no item is dropped, other numbers tells the number of an item to be dropped. Only the increment in this table is random, which varies between 1-4 (so it only relies on 2 bits of the RNG).
This idea woked very fine, but there is a major problem : The table takes a large amount of ROM space, and if I'd like to have stronger monsters more likely to dropp items then I have to have multiple tables, wasting a ridiculously high amount of space.
So anyone here have an idea to make item dropping not random, but in a solution that doesn't waste too much ROM ?