Page 2 of 2

Re: Roller Coaster Tycoon Engine

Posted: Sun May 22, 2011 2:48 am
by timfrombriz
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

Re: Roller Coaster Tycoon Engine

Posted: Sun May 22, 2011 9:33 am
by c4s
I think DrawingBuffer(), DrawingBufferPitch() and the like are what you need.

Re: Roller Coaster Tycoon Engine

Posted: Mon May 23, 2011 2:59 pm
by DoubleDutch
Does it read in original RCT data?

Re: Roller Coaster Tycoon Engine

Posted: Sat Jun 25, 2011 11:39 pm
by Swos2009
That is amazing ! 8)

Re: Roller Coaster Tycoon Engine

Posted: Thu Jul 07, 2011 1:37 pm
by timfrombriz
Version 0.2... Misc bugs fixed, renderer now DirectX not GDI, other behind the scenes stuff

Thanks for the nice feedback thus far.

http://anotherprophecy.com/system/scrip ... %200.2.zip