Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

I was wondering if there is any place..

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Sephiroth   Members   

122
Like
Likes
Like

Posted 28 November 1999 - 06:26 AM

I can get some sample code on a simple tile engine. If you have any idea, could you please email me at Seph@telebot.com

Thanks!


#2 Anonymous Poster_Anonymous Poster_*   Guests   

Likes

Posted 28 November 1999 - 06:18 AM

To make a simple tile engine is pretty easy.

Here is some sample code of how to plot tiles:

// loop variables
int lx, ly;
// destination of tiles
int destx, desty;
// destination on map
int mx, my;

// the map array
int map[MAPXSIZE][MAPYSIZE];

for (ly = 0; ly<20; ly++)
{
for (lx = 0; lx<20; lx++)
{

destx = lx * TILEXSIZE;
desty = ly * TILEYSIZE;

drawtile(destx,desty,map[lx+mx][ly+my]);
};
};


To add scrolling all u would do is add an offset to destx, and desty, so it's pretty simple. This code may not compile but it shows how to make the actual tile engine.

Good Luck!

Later,

Da_KiD


#3 Gromit   Members   

144
Like
Likes
Like

Posted 28 November 1999 - 06:26 AM

http://www.gamedev.net/reference/docs/refarticlelistuser.asp?catid=44




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.