Forking for porting to sdl2

96 views
Skip to first unread message

Niels Neumann

unread,
Jan 11, 2014, 6:17:52 AM1/11/14
to freer...@googlegroups.com
I have forked the project to make it run with sdl2.
You can check out by

it runs now basically (not really neat)

ToDo:
  • store sdl_texture conform format in voxels or in a special texture list (we dont need to create same textures again and again)
  • divide screens in rects to update (render) the only dirty rects

Niels Neumann

unread,
Jan 18, 2014, 9:55:02 AM1/18/14
to freer...@googlegroups.com
Today ive done some work

The crappy line for fetching pixeldata from x,y is deleted and modificate to old pixelcopy style


@todo:
- need to rework the gui render stuff
- simplificate basic image handling
- mark voxel as dirty to repaint all of them

@footline
yesterday as ive played the good old rct1, ive get the frames very low to see how is rct render :D
frame is divided in rects like 50x50 pts each is only redraw if its needed

Alberth

unread,
Jan 19, 2014, 4:23:29 AM1/19/14
to freer...@googlegroups.com
Can you make the dirty rectangles code parameterized with the rectangle size? (a few "static const int" values is sufficient, no need to dynamically change the size while the program is running)

That allows you (or someone else) to do simple profiling tests with the best size. At the time of RollerCoaster Tycoon 1, there was no hardware video support, and CPUs were much slower. Thus, what was good then doesn't have to be good now.

Niels Neumann

unread,
Jan 19, 2014, 1:06:28 PM1/19/14
to freer...@googlegroups.com
Yes indeed my aim is to do some mixing it.
So game voxels are linked to textures where to draw, these textures marked with dirtyflags and represented the rectangles on screen.
But the gui i thing gets its own container to draw (or simply explained as rectangle which is dynamically sized by the window size) so we dont need to redraw every pixel beyond the gui windows when a window is closed or moved, only updating the dirty textures. When the window is reopened or moved we dont need to rebuild it, cause its in the texture memoy alive and only change the point on screen.
Also top and bottom bar should be exclude from these game rectangles and only be updated when is needed.

But for now the drawing or pixelcopying for gui-containers are very slow, so i have to rethink about drawing guis on screen or textures.
Reply all
Reply to author
Forward
0 new messages