lol yes...thanks to me for the help. but the reason i kept changing it is because i was posting at around 1 in the morning.
alright, here's how I did it.
Okay, basically right now, I only have about ten tiles. (My friend has been doing them in photoshop...once we have the basic engine done we're gonna make a game (yay)). Anyway, basically all you do is create a text document and type your level using numbers (eventually letters, and all sorts of characters too). You use this template:
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
1111111111111111
The map is 16x12 at a size 40x40 pixels per tile, if you do the math, that's 640x480 resolution. The catch is, once your done typing out the map like that, you have to put it all on one line (that's the way the engine reads it: a single line.) So the above would become:
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Here's the engine...which is far from complete:
Sync On : Sync Rate 0
Set Display Mode 640, 480, 32
TileX = 0
TileY = 0
Images = 1
Load Image "Tiles\01.JPG", 1 : ` Rock
Load Image "Tiles\02.JPG", 2 : ` Water
Load Image "Tiles\03.JPG", 3 : ` Dead Grass
Load Image "Tiles\04.JPG", 4 : ` Dirt
Load Image "Tiles\05.JPG", 5 : ` Grass
Load Image "Tiles\06.JPG", 6 : ` Tree/grass
Load Image "Tiles\07.JPG", 7 : ` Tree/dead grass
Load Image "Tiles\08.JPG", 8 : ` Tree/dirt
Load Image "Tiles\09.JPG", 9 : ` Mini-stone path
Open To Read 1, "Levels\Stoneroad.TXT"
For I = 1 To 192
Read Byte 1, a
a = a - 48
Paste Image a, tilex, tiley
tilex = tilex+ 40
If TileX = 640 Then TileY = TileY + 40 : TileX = 0
Next I
Do
If ReturnKey() = 1 Then End
Sync
Loop
Lines 20-26 are the key to the engine - well, right now. Like I said, it's NOT done (it doesn't even scroll yet!). As you can see, there is a loop I that goes to 192. How did I get that? 16*12=192...simple. When you put the map on one line, it just reads up to 192 characters. Each number has a certain byte value. For example, 1 has a bv of 49. 2 has a bv of 50, etc. So what I did was read the byte value, and subtract 48 from it. That value is written to a. The proper image is then pasted as a tile according to the value of a. Then the x value of the tile is incremented. Once it gets past 640, it resets to 0 and the y value moves down 40 (telling the engine that otherwise, we'd be tiling off the screen).
Maybe that's more complicated than a lot of engines, but the point is, it's the first tiling engine i've ever successfully done like that (reading from a map file), and I did it myself! Yay! I'm a big boy now! Lol.
Well peace and thanks for listening to me rant....comments welcome