Re: Roller Coaster Tycoon Engine
Posted: Sun May 22, 2011 2:48 am
Theres just over 1k lines of code. A lot of it are tricks to try and get VB6 to execute instructions quicker.
For example, theres no Macro or inline function feature in vb6, so I have inlined a lot of functions to minimize procedure calling overhead.
I also do pixel pushing to draw lines for the windows, so theres a lot of for/next to do lines, boxes etc. I presume using the StartDraw/EndDraw and utilizing the Line,Box functions of Purebasic will be optimized enough.
Im trying to get my head around PureBasic, I know coding in DirectDraw there are native commands for drawing lines and boxes (i believe), which draw directly onto the video memory buffer. Does PureBasic expose this directly, so that theres no need to StartDraw/EndDraw (ie. Resulting in a Video->System->Video memory swap)?
Any idea of how to pixel push onto Sprites, is there a way to get a pointer to the 32bpp memory. Im still getting my head around all this
For example, theres no Macro or inline function feature in vb6, so I have inlined a lot of functions to minimize procedure calling overhead.
I also do pixel pushing to draw lines for the windows, so theres a lot of for/next to do lines, boxes etc. I presume using the StartDraw/EndDraw and utilizing the Line,Box functions of Purebasic will be optimized enough.
Im trying to get my head around PureBasic, I know coding in DirectDraw there are native commands for drawing lines and boxes (i believe), which draw directly onto the video memory buffer. Does PureBasic expose this directly, so that theres no need to StartDraw/EndDraw (ie. Resulting in a Video->System->Video memory swap)?
Any idea of how to pixel push onto Sprites, is there a way to get a pointer to the 32bpp memory. Im still getting my head around all this