OrangyTang wrote: Wed Apr 04, 2018 3:45 pm
Having said that - I wonder if what GH is doing is using the main thread as a background loading loop? It seems to be idle until memory addresses get poked with load requests. That way the vblank can do important logic, then yield and let the rest of the frame be filled with low-priority streaming. If the streaming is taking too long, the vblank will still kick in and run the next frame. Plausible?
Actually is a pretty good dam idea... no, it's very close to necessary IF you are building a continuous level loading game, for other types of games it involves more problems than solutions.
Let's recapitulate: exceptions/interruptions allows the programmer to avoid uninterrupted polling along all the code. Then, if you are making a game that follows those rules:
- Game loads into ram continuously the level. So in ram we have a few screens around (or forward) the main character. The farthest is the one is loading.
- Having the level in ram let's you modify it. If you think a bit: you have to chose between the ability to modify it or double scroll direction.
- Only forward scroll, although it's not strictly necessary, helps simplifying things.
- Level is compressed in big chunks, like for example screens, that provides much better compression which is a winner since big levels take a lot of it.
So in the main/start/reset you basically have a procedure to decompress a level which have not to do pulling at all, neither has to be synchronized at a frame level with the game. And in the vertical exception all the remaining things. Half way to a current sand box really.
Plainly this approach is not useful at all for a more conventional game that loads the level only at the start, but other ways it rocks.
Other way to see it is that what makes it so impressive is that you don't need to compress the level in little chucks, probably columns, and accommodate this time inside a frame, but you can do it asynchronously in really big chunks without impact on the frame rate.
OrangyTang wrote: Wed Apr 04, 2018 3:45 pm
Yeah, I don't have much experience with MD programming, but in my mind interupts should do the smallest amount of work possible and finish as quickly as possible.
That's completely correct within a operative system: just fill the buffer and quit the interrupt as quickly as possible.
But in a MD you can do what ever you want: there is no other program to be taken care of.
HELP. Spanish TVs are brain washing people to be hostile to me.