Jump to content


Photo

Is That A Bug Of Gm7? (about Tiles)


  • This topic is locked This topic is locked
6 replies to this topic

#1 zplay

zplay

    GMC Member

  • New Member
  • 2 posts

Posted 23 March 2008 - 04:25 AM

I was working on an ARPG with GM7 ,and i wanted to load rooms from external files
When I use
ind=room_add();
room_tile_add(ind,back,left,top,width,height,x,y,depth);
//...and some thing like that

and when i goto that room i got right tiles in right position BUT the color of the tiles have changed.some times they are little bit blue ,some times pinkl, It's all ramdom. And the room_set_background(..) don't work properly . So you cannot change tiles or background while the room isn't current room??Is that a bug?

I think it maybe has somthing to do with the pallette,when you are no in 32bit corlo ,but it's not....I was in 32bit corlor

But the
tile_add(background,left,top,width,height,x,y,depth)
is OK
so,I wrote a script to load tiles to current room,and set it to the creation code after room_add(). that works ,and you can use control object to load tiles which i think is much better
  • 0

#2 Qwertyman

Qwertyman

    C&D Games

  • New Member
  • 1178 posts

Posted 23 March 2008 - 06:02 AM

So, what's your question?

In regard to the tiles changing colors, are you changing the draw color anywhere in your code?
  • 0

#3 Thomas

Thomas

    Waffles Good!

  • New Member
  • 1026 posts

Posted 23 March 2008 - 08:35 AM

So, what's your question?

In regard to the tiles changing colors, are you changing the draw color anywhere in your code?

Sounds more like a graphical artifact to me...
  • 0

#4 xot

xot

    GMC Dismember

  • GMC Elder
  • 4785 posts
  • Version:GM:Studio

Posted 23 March 2008 - 08:45 AM

Can you provide some screenshots and something we can download that demonstrates the problem?
  • 0
GMLscripts.com, rise from your grave!

If any of my posts contain broken images or links, I can probably supply them for you. PM with a link to the post.

#5 mememe

mememe

    GMC Member

  • New Member
  • 1328 posts

Posted 23 March 2008 - 08:53 AM

Maybe there could be something wrong with your graphics card. Does everything else look normal?
  • 0


Visit my lifeDevvar blog - The life of a Devvar for tips, hints and reviews to producitivty, useful apps and more.

#6 zplay

zplay

    GMC Member

  • New Member
  • 2 posts

Posted 23 March 2008 - 03:11 PM

It should looks like this
Posted Image

but when you use room_tile_add() you get this tile_add() has no such problem
Posted Image
  • 0

#7 xot

xot

    GMC Dismember

  • GMC Elder
  • 4785 posts
  • Version:GM:Studio

Posted 23 March 2008 - 03:51 PM

That's weird. I get exactly the same kind of problem in both GM6 and GM7. I don't really have a lot of experience with this particular stuff. The problem is that the blending color is not being set to white. If you set it to white after the fact, the tiles looks fine. I don't know how to set the blending when the tile is added to the room. A workaround is to save each tile id to a list (or stack, or array) and then when you change rooms, run through the list setting each tile blend color to white with tile_set_blend(id, c_white). I think. I haven't tested that theory.

EDIT: Unfortunately, the index values returned by room_tile_add() are not the same as tile ids, and they seem to be basically worthless. If you add 10000001 to them, they might be useful, but that seems a little sketchy.

torigara suggests this:
http://gmc.yoyogames...&...t&p=2477375

This problem is reported several times in the forum. I'm forced to agree that this is a genuine bug, and an old one at that. It doesn't make sense as a design feature.

Edited by xot, 23 March 2008 - 04:58 PM.

  • 0
GMLscripts.com, rise from your grave!

If any of my posts contain broken images or links, I can probably supply them for you. PM with a link to the post.