done by third_dot
logo done by third_dot :: pouët.net is brought to you by mandarine




how to put 2d starfield in intro?
category: code
go to page of 1  
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
20 byte starfield
added on the 2012-06-10 13:37:56 by tomaes  
tomaes
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)
added on the 2012-06-11 08:24:03 by Android Barker  
Android Barker
I really wish we could thumb down bbs posts, or even entire users:
Android Barker
added on the 2012-06-11 09:01:41 by xTr1m  
xTr1m
@xTr1m, go on
added on the 2012-06-11 09:15:54 by Android Barker  
Android Barker
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)
added on the 2012-06-11 10:06:46 by Android Barker  
Android Barker
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
go to page of 1  

post a new reply
You need to be logged in to post a new reply :: register here





pouët.net 0.9-a9e6b6e © 2000-2013 mandarine - hosted on scene.org
send comments and bug reports to webmaster@pouet.net - contribute on GitHub
page created in 0.048264 seconds.