Skip to main content
gamedev.net
🔒 Locked

Help with rectangular map needed

Started by Freaker13 Dec 21, 2002 at 11:02 AM 6 replies 150+ views
Original Post
Freaker13
Freaker13
Hi all, When i render my isometric map with dx8 (3d) i want to show a rectangle and not a maps like this. /\/\/\/\/\/\/\ \/\/\/\/\/\/\/ /\/\/\/\/\/\/\ \/\/\/\/\/\/\/ How do i get this rectangle? I'm not sure of my solution: I'm thinking to render it on a surface and then to use copyRect to place it on the backbuffer. What kind of surface do i have to use? Image Surface? Sry if this are stupid questions. Freaker13 [edited by - Freaker13 on January 5, 2003 11:46:06 AM]
sofsenint
sofsenint
Do you mean that you don''t want to show the jagged edges of the tiles? Or do you mean that there are holes in your image?
-----------------------------Weeks of programming can save you hours of planning.There are 10 kinds of people in this world-- those who understand binary and those who don't.
Freaker13
Freaker13
I mean i don''t want to show the jagged edges of the tiles.
Freaker13
Freaker13
Can nobody help me?

Alan Kemp
Alan Kemp
Instead of starting your rendering loops at x=0 and y=0, start them at x= -(TileWidth/2) and y = -(TileHeight/2).

Alan
"There will come a time when you believe everything is finished. That will be the beginning." -Louis L'Amour
Freaker13
Freaker13
My tiles dont't take up the whole screen. They have to be a rectangle in my screen.






[edited by - Freaker13 on January 2, 2003 6:34:46 AM]
F G K
F G K
Hi Freaker13

Render the map in an Offscreen Surface like Alan said!
Blitting on the left and right side on more tile as the map should displayed to fill up the holes at the borders. Then blit the offscreen surface wich holding the map to the primary Surface.
The starting Left-Point of the rect is 1/2 Tile width and the right Point is 1/2 Tile width less than the Mapwidth which should displayed.

Look at my engine at:

http://f.kastl.bei.t-online.de/downloads/BetaRelease05.zip

Freaker13
Freaker13
Hi FGK,

I’ve seen your engine and i wish i was so far with mine engine.
It’s my first time working with offscreen surfaces and I don’t know how to do it exactly.

1.
a.create a new rendersurface with D3DXCreateRenderToSurface (or CreateRenderTarget?)
b.render map on rendertarget
c.And then move it with copyrects from rendertarget to backbuffer?

2.
a.create a new rendersurface with CreateTexture
b.render map on texture
b. blit this texture as usual on the backbuffer?

3.another method?

Thx in advance

Freaker13


[edited by - Freaker13 on January 5, 2003 5:19:44 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.