Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem loading Tiles
#1
Where to start... I recently download the Mirage Source and started on my programming adventure.. Everything I have attempted works well except loading more tiles than it was originally set to load. It loads the tiles in the map editor and when you select a tile lower than where it was normally set to load, it loads the tile in the picture box set to preview the tile. However any tile lower than the normal number comes up as a light blue tile on the map. I thought to myself "Hm... The tile sheet height was originally set to 255 as well as the scroll bar for viewing the tiles.. Perhaps they Dimmed something to a Byte instead of an Integer seeing as a Byte is only whole numbers 1 - 255" However, I cannot find such a line of coding to prove this theory. My fiance has the files I have worked on as well, but the tiles show up fine on her screen. I am just curious as if anyone would know what to caused this problem on my end and perhaps a way to fix it. Much thanks to those whom email me or message me about the problem. I am on msn more than Yahoo so try MSN first. Thanks again. ~Vega~
Reply
#2
Negitive. I use Windows XP Pro with a Windows Vista Transformation pack, same as my girlfriend actually. My mom runs Windows XP Media edition and the tile problem is on her computer as well, just not my girlfriends.
Reply
#3
Not sure what Video Card I use right now to be honest. Like I said, the first half of the tiles work perfect, the second half only shows up as blue tiles. The last tile that works is the last tile that was available before I changed it to load more tiles and the scroll bar.
Reply
#4
That would be odd considering I used all these tiles on Player Worlds and it worked perfectly though.
Reply
#5
o_O.. Dude.. I know I messed up coding somewhere.. wait.. you let me sit here.. and talk about problems i know it isnt, just to get to the conclusion yourself that I messed up some coding? WTH? I had to answer questions that if you had just read in my first post, you would have known already except for the operating system. And the video card thing? Real good... Seriously. Mission accomplished o_O
Reply
#6
Oh and just in case you were wondering, the ignore it and it will go away method does not work here. Kthnx ~Vega~
Reply
#7
Aye you are correct in stating all computers is different. However.. the possibility of the video hardware not being good enough is very unlikely, even though half the tiles work. I know the problem is in the code somewhere, but I was asking for help as to where that may be.. Such as.. "Hm... The tile sheet height was originally set to 255 as well as the scroll bar for viewing the tiles.. Perhaps they Dimmed something to a Byte instead of an Integer seeing as a Byte is only whole numbers 1 - 255" Correct me if I am wrong.. But I am pretty sure computers do not act on coincidence.. considering the height of the last tile able to be used is 255 and that the normal height of the tile sheet loaded in was 255 and yet a Byte is only a whole number through 1- 255.. That says something to me.. Maybe not to you, but heh what can I say.. Forgive me for flaming you but your act of helping was more of like.. "Is your computer plugged in?"
Reply
#8
[Image: TileProblem.JPG][/img]

Bingo.. There is the problem right there. Have fun with this one.
Reply
#9
Understood your concept. The tiles are not blue after that tile, they do show up correctly in the mapeditor window, and they do show up correctly in the preview window, and I do not have any tiles the same as the one showing up. I have been working on this problem for 4 days straight, 14 hours a day so forgive me for being grumpy.
Reply
#10
With frmMirage.picBackSelect
.Width = 7 * PIC_X
.Height = 1000 * PIC_Y
.Picture = LoadPicture(App.Path + GFX2_PATH + "tiles" + GFX_EXT)
End With

The .Height property was 255. It only loaded a certain amount of tiles. The last tile loaded with the .height property at 255 is the last tile that works when I set it to 1000. I have tried different numbers and it doesnt change the fact nothing works past that one tile. I am not sure what that number is such as pixel wize.

' Image constants
Public Const PIC_X = 32
Public Const PIC_Y = 32

that is the image constants so maybe that would help you out as well.
Reply
#11
Picking a tile that is not on the tile sheet is black.

It does this before making it to the server side. While in mapeditor it shows up right on preview box but on the map where you draw the tile, it turns blue before you send the data. Thus it shouldnt be going to server side yet. I thought so myself before I realized that.
Reply
#12
Code:
Public Sub BltTile(ByVal x As Long, ByVal y As Long)

Dim Ground As Long
Dim Anim1 As Long
Dim Anim2 As Long

    With Map.Tile(x, y)
        Ground = .Ground
        Anim1 = .Mask
        Anim2 = .Anim
    End With
    
    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = y * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = x * PIC_X
        .Right = .Left + PIC_X
    End With
    
    With rec
        .top = Int(Ground / 7) * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = (Ground - Int(Ground / 7) * 7) * PIC_X
        .Right = .Left + PIC_X
    End With
    Call DD_BackBuffer.BltFast(x * PIC_X, y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT)
    
    If (MapAnim = 0) Or (Anim2  0 Then
            With rec
                .top = Int(Anim2 / 7) * PIC_Y
                .Bottom = .top + PIC_Y
                .Left = (Anim2 - Int(Anim2 / 7) * 7) * PIC_X
                .Right = .Left + PIC_X
            End With
            Call DD_BackBuffer.BltFast(x * PIC_X, y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub

Public Sub BltItem(ByVal ItemNum As Long)
'****************************************************************
'* WHEN        WHO        WHAT
'* ----        ---        ----
'* 07/12/2005  Shannara   Optimized function.
'****************************************************************
    
    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = MapItem(ItemNum).y * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = MapItem(ItemNum).x * PIC_X
        .Right = .Left + PIC_X
    End With

    With rec
        .top = Item(MapItem(ItemNum).Num).Pic * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = 0
        .Right = .Left + PIC_X
    End With
    
    Call DD_BackBuffer.BltFast(MapItem(ItemNum).x * PIC_X, MapItem(ItemNum).y * PIC_Y, DD_ItemSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End Sub

That is the bltTile Sub

Code:
Public Sub BltFringeTile(ByVal x As Long, ByVal y As Long)
Dim Fringe As Long

    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = y * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = x * PIC_X
        .Right = .Left + PIC_X
    End With
    
    Fringe = Map.Tile(x, y).Fringe
        
    If Fringe > 0 Then
        With rec
            .top = Int(Fringe / 7) * PIC_Y
            .Bottom = .top + PIC_Y
            .Left = (Fringe - Int(Fringe / 7) * 7) * PIC_X
            .Right = .Left + PIC_X
        End With
        Call DD_BackBuffer.BltFast(x * PIC_X, y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If
End Sub

That is the blt Fringe Tile sub. Anything else needed for review?
Reply
#13
The Picture I posted is the fringe surface, however mask, animate, and ground turns out the exact same way.
Reply
#14
Fine with me how would you like to get the files?

[Image: TileProblemagain.JPG]

This is the result of the tile problem while using the map editor. If it worked right, the map on the game would have the exact same thing in the exact same order as the shown part of the tile sheet in the mapeditor.
Reply
#15
Aye The lines are the same color, however the lines are coming from the first tile, the tile set to where it is a grid to show where tiles are able to be plotted easyer. That is an actual tile, the first tile standard in all maps that isnt messed with. That tile works.. It is the tiles past that certain point that dont work. I could change the color of the blue lines to red or green but the other tiles still show up that blue color, I have tried that too.
Reply
#16
Set up your equations properly.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#17
Such as?
Reply
#18
RGB(0,64,128) Is what was used, but nothing came up when I searched for it.
Reply
#19
Aye, I am stumped as well. I have looked and looked and cannot figure out why it is like this. @_@ It is madning. Dave, Perhaps you would like to download the source code and see for yourself?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)