Advertisement Jump to content
Sign in to follow this  

ISO rendering code snippet

This topic is 4967 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello there Does anyone happen to have some code dealing with ISO tile rendering with smooth scrolling and stuff like that. Be so kind as to share. ++I would also like to know how you guys determine the number of tiles you draw on the screen. Is ScreenWidth/TILE_WIDTH ScreenHeight/TILE_HEIGHT good enough for isometrics? The thing is that if you use these formulas you don't get screen totally filled with tiles but rather have you backgound showing on the sides. Hopefully what I say makes sense. Thanx

Share this post

Link to post
Share on other sites
I have an Diablo style RPG example, that I've downloaded from net. Unfortunately the web page I've downloaded from is closed. The code is free. Is there any way to upload this piece of example to Code is totaly funcional. It is client/server based, there is pathfind routine, layer routine, animation routine inside of it, etc...

Share this post

Link to post
Share on other sites
Did not get a chance to look at it but, here is a link to download it.

From streamer: "Here it is. A piece of RPG. Orignaly made by wonyee...from (now don't exist).

Best Regards,

download here


-hammackj =)

Share this post

Link to post
Share on other sites
#include <stdio.h>
#include <stdlib.h>

#include <sdl.h>
#include <hxrender.h>
#include <hxSDL.h>
#include <hxutility.h>

void Render(void);

int tileMap[16][16] = {

hxSurface *isoTile;
hxSurface *it2;

int main(int nArgs, char **args)
bool isRunning;
SDL_Event event;


hxsSetupWindow(640, 480, 0, 0, "hxTest");


isoTile = hxsLoadBMP("isotile.bmp");
hxReplacePix(isoTile, hxuBuildColor(0,255,0,255), hxuBuildColor(0,0,0,0));

it2 = hxsLoadBMP("it2.bmp");
hxReplacePix(it2, hxuBuildColor(0,255,0,255), hxuBuildColor(0,0,0,0));

isRunning = true;

isRunning = false;



return 0;

void Render(void)
int xStart = 0;
int yStart = 0;
int xInc = 0;
int yInc = 0;

for (int i = 0; i < 16 ; i += 1)
xStart = -i * 64;
yStart = i * 32;

for (int j = 0; j < 16; j += 1)

if(tileMap[j][15-i] ==0 )
hxuBlitSimple(isoTile, (j * 64)+ xStart, (j * 32)+ yStart);

if(tileMap[j][15-i] ==1 )
hxuBlitSimple(it2, (j * 64)+ xStart, (j * 32)+ yStart - (512-64));


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!