Mirage Source

Free ORPG making software.
It is currently Sun Apr 28, 2024 5:32 pm

All times are UTC




Post new topic Reply to topic  [ 282 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next
Author Message
 Post subject: Problem loading Tiles
PostPosted: Mon Feb 26, 2007 1:25 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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~


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 2:32 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
I don't suppose you use windows 98?

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject: Reply
PostPosted: Mon Feb 26, 2007 2:47 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 2:50 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Then it's probably something with configuration. No idea, really.

Maybe it's the video card? What kind do you have, and what kind does she have?

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 2:54 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 3:18 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Try forcing the surface memory to be in the System instead of the video...

I'm lead to believe that either your video card can't support surfaces that big, or that you don't have enough video memory to hold it all.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 3:20 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
That would be odd considering I used all these tiles on Player Worlds and it worked perfectly though.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 3:33 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
In that case....

You messed up something coding, or Playerworlds does it a different way... I don't know what else to say, sorry.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 3:36 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 3:38 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
Oh and just in case you were wondering, the ignore it and it will go away method does not work here. Kthnx ~Vega~


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 3:54 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
If you had given relevant information in your first post, I wouldn't have needed to ask questions to further understand your problem.


You have as little clue as I do about your problem. We don't know that it's a coding issue. It could be a hardware issue, it could be a configuration issue, it could be a driver issue, it could be a windows issue, and then, finally, it could be your program's issue.

One of the difficulties of programming is that everyone's computer is different. Things will work on my computer that don't work on yours, and things will work on your computer that don't on mine. It's life

I made an attempt to help, and I am sad that it was met with such disrespect.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:00 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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?"


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:06 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
Image[/img]

Bingo.. There is the problem right there. Have fun with this one.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:10 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Some video cards can only support surfaces that are sized in the powers of 2. If your surface is smaller than 512, it may trim it down... or up. It's different for each video card.

If your video card is older, it may not even support surfaces bigger than 256 square.

My act of helping is nothing like "Is your computer plugged in?" I know it's plugged in, because if it wasn't plugged in you wouldn't be here.

Bytes hold numbers 0-255.

Computers act on logic, and you told me that you already checked data types. I ruled that out as soon as you said that.

Are you sure the Tiles.bmp file isn't just blue after that tile? It may seem stupid, but it happens more than you think.
If no,
Do the tiles show up correctly in the mapeditor window?
If yes, do they show up correct in the preview window?
Do you have any blue tiles the exact same as what you see elsewhere in your tileset?
Tile 0, perhaps?

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:13 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:19 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Tile sheet height being 255, are we talking pixels or tiles?

If it's pixels, you would only have 56 tiiles total.
If it's tiles, then you have 1792 tiles total.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:27 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:34 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
I've got a few ideas.

Make sure the tile data is saving correctly server side. Use a hex editor... I'll go through how tomorrow if you can't get it. It's probably not this but it only takes a minute to check.

How tall is your tiles.bmp compared to the height of picBackSelect in pixels please?
What happens if you pick a tile on picBackSelect that isn't in tiles.bmp?
Is it just black, or does it turn blue aswell?

I am going to bed, i will continue bickering with you tomorrow,

ta~

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:43 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 5:19 am 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
Can you show us your Blt functions, please?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 5:23 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
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
        ' Is there an animation tile to plot?
        If Anim1 > 0 And TempTile(x, y).DoorOpen = NO Then
            With rec
                .top = Int(Anim1 / 7) * PIC_Y
                .Bottom = .top + PIC_Y
                .Left = (Anim1 - Int(Anim1 / 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
    Else
        ' Is there a second animation tile to plot?
        If 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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 5:31 am 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
What surface is the tile that isn't functioning properly?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 5:33 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
The Picture I posted is the fringe surface, however mask, animate, and ground turns out the exact same way.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 5:45 am 
Offline
Knowledgeable
User avatar

Joined: Sun May 28, 2006 10:07 pm
Posts: 327
Location: Washington
Would you be willing to give me the source code for the client so I can login and debug this for you? (And possibly see if it does it to me)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 5:52 am 
Offline
Newbie

Joined: Mon Feb 26, 2007 1:13 am
Posts: 18
Fine with me how would you like to get the files?

Image

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 282 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group