|
-
Mar 7th, 2001, 01:22 AM
#1
Thread Starter
Addicted Member
hey people i've upadated my website and now its a whole ne design. go check it out and let me know what you think. also take a look at my map editor and let me know what you think. its not complete yet buts its got all of the basics for now.
by the way. how come on the editor when i hold the mouse down and drag it only draw one square instead of a whole line of them. i think i know how to make it work but if anyone has any suggestions i'm completely open to them.
thanks one and all,
Drewski
I see said the blind man as he spat into the wind.
It all comes back to me now!
A.D.T.'s VB
-
Mar 7th, 2001, 01:03 PM
#2
Junior Member
-
Mar 7th, 2001, 04:01 PM
#3
Thread Starter
Addicted Member
my map type is *.map
if you look in the code under loadmapfromfile or something like that you should be able to find it.
thanks for the feed back guys
Drewski
I see said the blind man as he spat into the wind.
It all comes back to me now!
A.D.T.'s VB
-
Mar 7th, 2001, 05:16 PM
#4
Thread Starter
Addicted Member
if you guys want the code posted i can do that just you'll have to wait till i get home. but if you already have it just look around for it in the source. by the way, sorry if the code isnt that pretty and i'm not much on commenting my code. hopefully you can piece it out
I see said the blind man as he spat into the wind.
It all comes back to me now!
A.D.T.'s VB
-
Mar 8th, 2001, 12:14 AM
#5
Thread Starter
Addicted Member
heres the map format chris:
Code:
Public Type TileArray
SrcX As Long
SrcY As Long
DestX As Long
DestY As Long
Walkable As Byte
TileSet As Byte
End Type
Public Type LayerArray
Tile() As TileArray
End Type
Public Type Map
StartX As Byte
StartY As Byte
BGround As LayerArray
'FGround As LayerArray
'Triggers As LayerArray
'Items As LayerArray
End Type
Public Sub LoadMapFromFile()
Dim Level As Map 'dim a variable that will be used to determine the length of a record in the file
Dim Number As Integer
Dim FileName As String 'dim a variable to hold the name of the map
Dim intFileFree As Integer 'dim a variable to hold a handle to the next available free file
Dim RecordNumber As Long 'dim a variable to track what record we are on
Dim RecordLength As Long 'dim a variable to hold the length of a record
On Error GoTo ErrorHandler
Form1.CmnDialog.Filter = "Map files (*.map)|*.map"
Form1.CmnDialog.flags = cdlOFNFileMustExist
Form1.CmnDialog.flags = cdlOFNHideReadOnly
Form1.CmnDialog.DialogTitle = "Load Map"
Form1.CmnDialog.ShowOpen
strMapName = Form1.CmnDialog.FileName
If strMapName = "" Then Exit Sub
intFileFree = FreeFile
Open strMapName For Binary As #intFileFree
RecordNumber = 1
RecordLength = CLng(Len(Number))
Get #intFileFree, RecordNumber, MapWidth
RecordNumber = RecordNumber + RecordLength
Get #intFileFree, RecordNumber, MapHeight
ReDimArrays
RecordNumber = RecordNumber + RecordLength
Get #intFileFree, RecordNumber, Level1
Level1.BGround.Tile(1, 1).DestX = Level1.BGround.Tile(1, 1).DestX
Close #intFileFree
Exit Sub
ErrorHandler:
If Err.Number = cdlCancel Then
Exit Sub
End If
End Sub
i got this code from the game examples off of oneringsoftware.com. thats the place where i first started vbgp. ah the memories
I see said the blind man as he spat into the wind.
It all comes back to me now!
A.D.T.'s VB
-
Mar 8th, 2001, 12:48 AM
#6
PowerPoster
thanks drewski, I'll take a look on it.
-
Mar 13th, 2001, 01:19 AM
#7
Thread Starter
Addicted Member
UPDATE!
hey people check it out! the website is updated. check it out and give me some input here. by the way pranavdesai i would like a little more than just "good work friend" i thank you graciously for the compliment but i need a little more input.
thanks y'all
I see said the blind man as he spat into the wind.
It all comes back to me now!
A.D.T.'s VB
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
|