|
-
Feb 4th, 2000, 07:11 AM
#1
Thread Starter
New Member
I want to make a strategy game... But i dont get this **** with using tiles. So if anyone wanna explain please do so.
-
Feb 5th, 2000, 01:21 AM
#2
Hyperactive Member
-
Feb 5th, 2000, 12:20 PM
#3
Fanatic Member
-
Feb 5th, 2000, 09:21 PM
#4
Thread Starter
New Member
-
Feb 6th, 2000, 12:50 PM
#5
-
Feb 6th, 2000, 03:21 PM
#6
PowerPoster
OK guys,
I'm making a RPG and I know something ybout tiles (I'm using BitBlt, but doesn't matter how to draw them).
Well, my tiles are stored in DCs and I've got a 'map' array of indexes. I think that's what you have too. Make them scroll is a bit difficult, depending how you're storing the map array. I've taken a 1D array so I can resize it while it's running, but like I said that's a bit harder to make. With a 2D map you can easy calculate the positions, best will be to make a camera object or just 2 coordinates like CameraX and CameraY. By drawing the scene you have to include this coordinates to know what to draw and where to draw. Look at this example code:
-
Dim A as long, B as long
Dim TempX as single, TempY as single
'Calculate precise map coordinates
TempX = Camera.x / TileWidth
TempY = Camera.y / TileHeight
For B = 0 to (Form1.Height / TileHeight)
For A = 0 to (Form1.Width / TileWidth)
DrawTile (A - (TempX - Int(TempX))) * TileWidth, (B - (TempY - Int(TempY))) * TileHeight, Tile(Map(int(TempX) + A, int(TempY) + B)).DC
Next
Next
-
I hope you can understand what I wrote . If not you can download my game at my website and take a look of it's code...
Fox
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
Feb 6th, 2000, 09:38 PM
#7
New Member
I personally store all the Images in DC, then have a 2d array to store which tile goes where. Then I use a viewport, somthing similar to:
type viewport
x as int
y as int
w as int
h as int
end type
To do the scrolling, all I do is move the view port around the 2d array, then you redrawn what is contained within the viewport. Easy.
-
Feb 8th, 2000, 05:39 AM
#8
Hyperactive Member
-
Feb 8th, 2000, 06:47 AM
#9
PowerPoster
(My code is the same technic like space_cadet's)
Hm... I've lovely 200 frames with 24 bit true color, but not fullscreen.
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
Feb 8th, 2000, 07:35 PM
#10
Thread Starter
New Member
Hehe, well how'd ya'll learn how to use bitblp? I just need to
-
Feb 8th, 2000, 11:50 PM
#11
PowerPoster
Learning by doing... It's really simple.
I can send you a well-comentated demo project how to using BitBlt, if you want.
-
Feb 9th, 2000, 03:06 AM
#12
Thread Starter
New Member
Yeah sure, thanx
email to [email protected]
!
-
Feb 11th, 2000, 09:56 AM
#13
Addicted Member
Can I get a copy of that demo for bitblt too?
Thanks a lot
Drew
-
Feb 11th, 2000, 04:29 PM
#14
Lively Member
Can I get a copy too?
e-mail: [email protected]
------------------
Website
-
Feb 14th, 2000, 11:15 AM
#15
Addicted Member
sorry for not including my address its [email protected]
thanks alot
drew
-
Feb 15th, 2000, 02:52 AM
#16
Hyperactive Member
Me too? 
Thanks.
-
Feb 15th, 2000, 02:52 AM
#17
Hyperactive Member
-
Feb 15th, 2000, 04:28 AM
#18
-
Feb 15th, 2000, 04:48 PM
#19
Thread Starter
New Member
-
Feb 18th, 2000, 10:03 AM
#20
Lively Member
Who wants to get back to the top?
Cause
<<<!BACK TO THE TOP!>>>
------------------
Website
-
Mar 1st, 2000, 07:05 AM
#21
Yo, fox can I get a copy of the program too? It would really help me out. Also, anyone, do you know of any good newbie tutorials for someone just starting DirectX????
Thanks
~~~~~~~~~~~~~~~~~~~~
The Monkeys fly at midnight
AGbsa84
-
Mar 1st, 2000, 07:53 PM
#22
PowerPoster
Of course, visit my website:
http://derzirkel.tsx.org
If TSX doesn't work try it directly :
http://members.xoom.com/Der_Zirkel/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|