forums

TNT Basic Forums > Programming Q&A
How do you put the map on to the screen?
< Last Thread     Next Thread >
Author
Thread        Post A Reply

07-11-2003 08:25

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

How do you put the map on to the screen?

I used this code, but map does not appear, why?


Graphics mode 640,480
Load images 128
Load map 128
draw map section 1,1 to 20,10,1 to 5,5

07-11-2003 21:10

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Try drawing layer 0 instead of layer 1

draw map section 1,1 to 20,10,0 to 5,5

Also, make sure you don't forget to call draw frame.

07-12-2003 00:15

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

It works, but do you have any idea so that the map "scrolls" when the main character gets to the edge of the screen?, because the map is just too large, (I am trying to make a platform type game)

07-12-2003 05:37

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

http://www.tntbasic.com/learn/maptutorial/maptutorial.html

A good tutorial right here at tntbasic.com, it should help.

07-12-2003 07:23

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Yes, it is good, but when I run the tutorial(copying it onto Hieroglyph), it has an error saying that the line "set view port....." is wrong because that i cannot put tiles out of the viewport,( this is the last thing that you can copy on the page.)

07-12-2003 15:38

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Hi, I made this tutorial.

First of all, I noticed a strange bug. THis tutorial is made in html, so,to tab the code, I had to use &nsbp; spaces ( it's HTML ) wich Hieroglyph does not recognize as spaces on my computer.

Second, you must make sure you do have a map, that you have the appropriate tiles picture, that it is larger than the viewport ( or you can't do scrolling ), that you do not place the viewport X or Y smaller than 0 and X not bigger than ( the width of the map ) - ( the width of the screen ) and Y not bigger than ( the height of the map ) - ( the height of the screen ).

07-12-2003 15:39

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

And run only green codes, as some yellow codes aren't complete. They are fragments of the entire code.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.