Demos > ROTATING EARTH


3D Globe
made by Frantisek
uploaded by frantisek
added:
updated:
download cartridge

15


Rotating Earth

This is my tribute to XCOM - Enemy Unknown Geoscape mode.
[img https://en.wikipedia.org/wiki/UFO:_Enemy_Unknown#/media/File:UFO_Geoscape.jpg]

If you are interested how the texture is uploaded into cartridge then please see:
https://github.com/jahodfra/tic80-earth

Change log
------------
2018-09-17 Add land borders. Fix the texture shifting.
2018-09-09 Mipmapping to remove twinkling of clouds.
2018-09-03 Better colors for dark side and reflection.

Comments


StinkerB06

How did you get the OVR palette separated from the TIC palette? Whenever I try to change the palette for it, the TIC function gets the same palette too.

frantisek

I set the palette in scanline function for the first line (0). This sets palette for everything drawn in TIC function. Then I set the upper palette at the end of OVR function so everything drawn in OVR uses this palette.

You can see how this happens in api_blit function.
https://github.com/nesbox/TIC-80/blob/master/src/tic.c#L1934
At the start it sets the palette for OVR then it calls scanline(0) and sets the palette for everything displayed on the screen at the end it calls OVR function which uses cached palette and sets the palette for next call of api_blit.

StinkerB06

That's very interesting. Don't know why anyone would want to use the SCN function just to get a 32-color display with separate TIC and OVR palettes.

Yes, SCN() has been implemented to fit with the 3-char names of TIC and OVR, but left scanline() highlighted for backwards compatibility with older cartridges. It is basically just another way to call scanline().


Post comment