Results 1 to 7 of 7

Thread: my website

  1. #1

    Thread Starter
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242
    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

  2. #2
    Junior Member pranavdesai's Avatar
    Join Date
    Feb 2001
    Location
    india
    Posts
    24

    cool site

    that's good work friend
    pmd

  3. #3

    Thread Starter
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242
    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

  4. #4

    Thread Starter
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242
    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

  5. #5

    Thread Starter
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242
    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

  6. #6
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    thanks drewski, I'll take a look on it.

  7. #7

    Thread Starter
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242

    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
  •  



Click Here to Expand Forum to Full Width