Roller Coaster Tycoon Engine

Advanced game related topics
timfrombriz
User
User
Posts: 13
Joined: Sat May 21, 2011 9:59 am

Re: Roller Coaster Tycoon Engine

Post 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
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Roller Coaster Tycoon Engine

Post by c4s »

I think DrawingBuffer(), DrawingBufferPitch() and the like are what you need.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Roller Coaster Tycoon Engine

Post by DoubleDutch »

Does it read in original RCT data?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Swos2009
Enthusiast
Enthusiast
Posts: 112
Joined: Sat Nov 08, 2008 8:19 pm

Re: Roller Coaster Tycoon Engine

Post by Swos2009 »

That is amazing ! 8)
timfrombriz
User
User
Posts: 13
Joined: Sat May 21, 2011 9:59 am

Re: Roller Coaster Tycoon Engine

Post 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
Post Reply