pouët.net

Go to bottom

how to put 2d starfield in intro?

category: code [glöplog]
 
Hi guys, i was wondering how on earth can I put a 2d starfield like this one
--> http://www.pouet.net/prod.php?which=14559
into my intro? I hope I have the theory correct ---

- Generate lots of random numbers
- get some co-ordinates from those numbers
- move those co-ordinates into memory
- draw pixels/lines at the co-ordinates
- every time timer clicks, increment X coord and draw to buffer

Could anyone give me some source on how to do this with DIB, especially in MASM32?

Thanks :)
added on the 2012-06-10 12:51:29 by zorke zorke
By DIB you mean GDI?
added on the 2012-06-10 13:15:21 by Gargaj Gargaj
if you can draw a circle, you can draw a 2d starfield! :P
added on the 2012-06-10 13:19:59 by maali maali
There's plenty of stuff on hornet, e.g.: http://goo.gl/AAKx0
added on the 2012-06-10 13:47:15 by ara ara
hmm... thanks :)
added on the 2012-06-11 03:31:48 by zorke zorke
tomaes: FWIW, I discovered the "les bp, [bx]"-trick while tinkering with pascal's 20-byte starfield. you can get a 19-byte starfield by replacing the 3 pops at the start with "lds cx, [bx]" :)
added on the 2012-06-11 05:33:11 by ryg ryg
2d starfield = random dots moving in the same direction at slightly different speeds.
added on the 2012-06-11 08:12:04 by sol_hsa sol_hsa
rip code,be man)
I really wish we could thumb down bbs posts, or even entire users:
BB Image Android Barker
added on the 2012-06-11 09:01:41 by xTr1m xTr1m
@xTr1m, go on
that 20b (or 19 now) starfield is insane.
added on the 2012-06-11 09:53:32 by superplek superplek
@el generalissimo : i haven't link, but sn0w32 intro are more crazy)
For me, the ridiculous part of that 20 byter is the super cheap'n'dirty PRNG. :)
added on the 2012-06-11 10:58:55 by tomaes tomaes

login

Go to top