BCB for a tile editor...
I''ve been using Borland C++ Builder to create my game-building tools (wonderful program for many things like that btw), but I seemed to have hit a small snag, and I was wondering if anyone with BCB experience has ever tinkered with this before:
In my map editor, I have my tiles blitted to my DDraw surface and then I use the get the DC and bitblit it to a CCanvas component on my game window. Seems to work ok, since BCB doesnt incorporate DDraw very well in a windowed component. Well, when it comes to wanting to animate some of the tiles, the only way to update the screen would be to call Repaint() some-odd times per second...and as everyone knows using a DC to do something like that flickers badly.
Now, Im not sure of any other way to blit something to a component like that. Anyone have and windowed BCB experiences with DirectDraw they could share?
quote:
Original post by Fuge
In my map editor, I have my tiles blitted to my DDraw surface and then I use the get the DC and bitblit it to a CCanvas component on my game window.
Shouldn''t you be using BltFast or DDraw''s Blt function instead of a GDI (DC) BitBlit?
"All you need to do to learn circular logic is learn circular logic"
"All you need to do to learn circular logic is learn circular logic"
In this particular case, using DDraw''s Blitter is apparently not possible when dealing with a VCL component. The VCL window only has a DC handle, and therefore limits alot of the faster surface-to-surface blitting.
Now, bitblitting to the DC seems to work ok, but its the flicker from having to repaint the component every frame that is the most annoying.
This is one of the main reasons why BCB is wonderful for tools, but not neccessarily for the actual game (unless you''re going full-screen of course)
Now, bitblitting to the DC seems to work ok, but its the flicker from having to repaint the component every frame that is the most annoying.
This is one of the main reasons why BCB is wonderful for tools, but not neccessarily for the actual game (unless you''re going full-screen of course)
hi there,
depends on the control but most window controls in
the vcl support a property doublebuffered if your
grid has this property set it to true, it defaults to
false in the form create event.
hope it helps
Mark.
depends on the control but most window controls in
the vcl support a property doublebuffered if your
grid has this property set it to true, it defaults to
false in the form create event.
hope it helps
Mark.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement