Log In  

I want to do a de-make of "Another World", this game is built of many static screens (no scrolling) and the backgrounds are drawn using very creative, data efficient, free-form "polygons".

To increase the number of screens I can have, and match the free-form polygonal art style, it seems better to discard the tile map, and use the map data to store "screens" and each screen would store "polygon info". So it would just be the points for the polygons, or something simpler - maybe just indexes of known shapes and a colour value to apply to them, something like that.

However it's stored - it would be expensive to re-draw the entire thing every frame, so I would have to use the old school technique of;

  • draw the background once,
  • capture the area behind a sprite,
  • draw the sprite,
  • then to re-draw, paste the captured area back over it, adjust the sprite x,y and repeat

How do I prevent the normal re-draw, and how do I capture an area of the screen?

Any thoughts on my approach?

P#17806 2015-12-14 16:04 ( Edited 2015-12-18 02:44)

I just did it on my ldjam entry

on each frame I load my screen then modifiy it then save and draw sprites for the final display.

I saved the screen with memcpy. You need 0x1FFF space for that so I first used 0x1000 adress ( = sacrifice 50% gfx and the whole map )
Then I had to use the 50% gfx so I moved a part of the screen on the user-defined part at 0x4300 ( infact I dont know what it's used for )

Here's the code you need

function load_scr()

function save_scr()

It's the first time I use memory this way and I'm not really used to hexadecimal so maybe there's a better way to achieve this...

P#17813 2015-12-14 18:53 ( Edited 2015-12-14 23:53)

I actually spent a good deal of time on actually reimplementing in AW in the pico-8, but hit the memory barrier pretty fast. The game engine uses 4 screen buffers (one is the active display), and one was a 'copy' buffer (used for a special displacement polygon mode)

to get around this, I was keeping the 4 screens in cartridge memory (cstore/restore) and swapping them out with the 0x0000 / 0x6000 depending on the active pointer mode.

Note: AW contains a LOT of polygon information. it comes out to around ~100k on average of shape information per stage (there are like 8 stages in the game)

Very little of the game is static bitmaps, only like 7~8 screens in the entire game are prerendered (mostly high detailed stuff like the pool scene with the stained glass)

P#17822 2015-12-14 23:41 ( Edited 2015-12-15 04:41)

I wrote this polygon library a while back, which works from strings, but can also read from other memory regions. After drawing to the screen, it stores into a temporary buffer so that it can be redrawn without drawing all the polygons again.

There's also a program to create the illustrations as well.

Feel free to take anything that you can use.



P#17823 2015-12-15 01:56 ( Edited 2015-12-15 06:56)

Thankyou Benjamin. I would have thought you just draw to the screen and then only redraw the parts that change, so why does the whole screen need to be copied?

asterick really?? You had the same idea as me? Can you show me what you did?
Yes I figured I'd run out of polygon data by storing each vertex, so I was toying with the idea of having set shapes or clusters of shapes hardcoded and refer to them by index to re-use them, and make the screens out of that. It would be a simplistic, approximation of the AW screens, but so are all Pico de-makes :D

electircgryphon, wow, thanks! I will definitely be trying that out.

I've heard how helpful the Pico community is, it's all true :)

P#17897 2015-12-17 21:44 ( Edited 2015-12-18 02:44)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-12-02 12:20:27 | 0.006s | Q:12