Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

smokes

Softwareblitting in tile engines?

This topic is 6082 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am thinking about remaking my tile engine in software... Not using the the Direct Draw blitter but only its capabilities of direct vidmem access.. Writing my own blitting routines etc.. implement shadowmaps, particle effects.. the like. Is this a good idea? I want my game to aim for something like P200 mhz. Is it possible to fill a screen (640x480x16) with three layers of tiles and player and NPC graphics, fast enough, by using software blitting routines? I would like to hear your guys opinion about this :-)

Share this post


Link to post
Share on other sites
Advertisement
You can get about 20-25 fps if you fill the screen every update. Then you have to update the critters and play sounds. You could do it using 8 bit colour. Also remember by the time you finish coding there won''t be too many P200s left that are still working. My P166 died last year. It was a sad day.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
A P200 might be a bit slow but still doable. You need to pay very close attention to only updating that which has changed from one frame to the next. If you re-build the entire buffer every frame your performance will suffer badly!

good luck,
hebertjo

Share this post


Link to post
Share on other sites
You probably know this but: do it ALL in system memory, including the back buffer. Then only blit the backbuffer to the primary surface.
And yeah, you really might want to consider 8-bit graphics, especially as you can create cool effects by manipulating the palette.

Greetings,
JonnyQuest (the Tweedledee guy)

Share this post


Link to post
Share on other sites
thanks guys :-)

JohnnyQuest: but I dont like palettes, they''re a pain in you know where.. and yes i know but thanks anyway..
the area I need to focus the most on will probably be fast blitting routines :-)

Share this post


Link to post
Share on other sites
Actually I believe the most important factor in creating a solid software engine is probably figuring out how to do as little blitting as possible. How to update the smallest areas of the screen per frame, how to sort animating objects, scroll the screen single rows of tiles at a time, etc...

Just a thought.
Best of luck,
-m

mat williams
Lead Programmer, Designer
Zero Sum Software
www.zero-sum.com

Share this post


Link to post
Share on other sites
I can see the point in that.. but how do I do it? I mean I can''t scroll one tile a time.. its going to be a multiplayer action game, so I need smooth scrolling. Of course I only need to update the scrolling everytime the player character moves.. animations can be done by only updating the animated tiles.. but then other characters come into play.. my characters are larger than the tiles.. so to implement at dirty rectangle scheme I need to figure which tiles the character passes.. getting complicated :-)

Share this post


Link to post
Share on other sites
the software blitting works great so far.. but my fps drops 10 if I wait for vertical blank (using the WaitForVerticalBlank() function in directdraw).. why is that?.. not waiting is ugly due to tearing

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hello,

I''m an exceptionally green with c++ but I made a little app that had a 2d scrolling scene that did not use the ddraw function WaitForVerticalBlank()

Like I said I''m real green and I was using Dx7sdk flipping the entire screen, I used some while(1) loop that waited for my drawing routine to finish, the loop checked for a WASSTILLDRAWING DD_ERR

lpDD->Flip(NULL,WAIT); Or something like that...

I''m not sure if this just tells Dx to use the WaitForVerticalBlank() so you can tell me...

I''m also not sure as to what my fps were, sorry.

Hope I didn''t waste too much of your time...

Mike

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!