Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Map displays wrong

Author
Message
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 10th Jul 2004 03:56
When i run this code
my cubes and plains do not position them selves in the right place. what am i doing wrong?

here is the map file


I also have a screenshot.



SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 10th Jul 2004 05:25
Jason,

I would also like to point out that you don't need to do a double loop for creating your level this should work fine;



Now, as for why you're getting these results it's because of your READ MAP code... you have the X & Y values switched around.



In other words -- when READ the map, you're reading it Left-to-Right then Top-to-Bottom, but when you build the image you're building it Top-to-Bottom then Left-To-Right. You're reading code and your building code must match...

In Read, the value it map(x,Y) -- with Y changing first, then X
In Build its map(z,x) -- with Z changing first!

oops.
S.

Any truly great code should be indisguishable from magic.
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 10th Jul 2004 06:02
im sorry but i cant get it to show write
coould you should me where i need to put all my x,y,z's please

thanx

SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 10th Jul 2004 06:07
sure ... change;



TO;



Leave the rest as you posted it...
S.

(Look close -- there IS a change in there!)

Any truly great code should be indisguishable from magic.
GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 10th Jul 2004 07:16
this doesn't work i would most apraite it if u would test the code on your pc just don't use the textures

thanx

SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 10th Jul 2004 14:03
Oh! Of course... makes sense now...

You are saving your level file as a TEXT one.. meaning you have two characters at the end of each line. (That's a CR/LF)

The read MUST be changed to reflect this, as in;



You were still reading it wrong in the x/y direction, but the above should solve your troubles...
S.

Any truly great code should be indisguishable from magic.

Login to post a reply

Server time is: 2024-11-27 00:36:06
Your offset time is: 2024-11-27 00:36:06