Sign in to follow this  
Tischnoetentoet

DirectDraw + zooming

Recommended Posts

Quote:

zoom so only a part of that world is visible in my surface?

By 'surface' I assume you mean 'Destination Surface'. Call the DestSurface::Blt method using a destination RECT large enough that the image is stretched to the desired size.

NOTE: Making entire worlds out of a single bitmap is generally a bad idea. Use a tile-map.

Share this post


Link to post
Share on other sites
Hi,

This is the first time I am working with DirectDraw, so every tip is appreciated.

I have already implemented the zoom function using the Draw() function with SrcRect and DestRect. It is working very well!

I am going to find out how tilemaps are working. If you have any nice links, could you please post them here?

Thanks!

Share this post


Link to post
Share on other sites
I did a quick search for tilemaps. It sounds good to use them, however, I have a question.

This is my engine (don't look at the ugly grass, need to fix that one):
View example

If you look to the water, it is an animation (you cannot see in the image though). I have an array. Loaded all bitmaps into the array and created surfaces for each one of them. I draw them one by one so I can get a nice animation for the sea (as well for other objects, for example the weather icons).

Can I still use the animations when using tile-maps?

Thanks!

Share this post


Link to post
Share on other sites
Follow this link. Under the subcategory 'General' you will find a series called 'Game Programming Genesis'. That might be a very good start. And to answer you animation question: Yes it can be done and is explained in the series I just showed.

Another good place is GameDev.net's articles section (link is a top of nearly evey page). Look into Isometric and Tile-based Games. And don't forget the Isometric and Tile-based forum.

Hope that helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this