Log In  

5

Cart [#38370#] | Copy | Code | 2017-03-18 | Link
5

Happy Saturday!

This is an attempt to create a faster falling sand simulation (60fps) by reading and writing directly to screen memory. All pixels / sand particles are active at all times.

I was inspired by Helado's Tiny Terrarium and Axnjxn's Falling sand.
https://www.lexaloffle.com/bbs/?uid=10783
https://www.lexaloffle.com/bbs/?uid=23000

I'm writing 1X2 pixel blocks in order to work directly with bytes and avoid bit-masking to address individual pixels. Then, I am using the display mode hack ( poke(0x5f2c, 2) ) to stretch the vertical scale of the display by 2X without requiring me to write any more data to screen memory.

-Electric Gryphon

P#38371 2017-03-18 16:12

::

huh, is it just me or did you get a speed increase above mine? i might have to integrate some of this into it when i get around to updating it :)

P#38383 2017-03-18 20:01

Log in to post a comment

user:
password:

New User | Account Help
:: New User
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2017-04-29 17:42 | 0.185s | 1572k | Q:15