Slick Forums

Discuss the Slick 2D Library
It is currently Tue Jun 19, 2018 3:49 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Oct 07, 2012 6:52 pm 
Offline

Joined: Sat Sep 29, 2012 8:13 pm
Posts: 13
Hi,

I'm now trying to center my isometric testmap for more than 2 hours but it wont work properly :/

So I think the easiest way to center the map is
Code:
map.render(screenX/2,screenY/2)


But it seems that the startpoint is not the middle of the map!

So is there a method to center the map?


Top
 Profile  
 
PostPosted: Mon Oct 08, 2012 1:25 am 
Offline
Regular

Joined: Tue Aug 23, 2011 8:19 am
Posts: 111
Origin is at the top-left of the map, so you'd want to offset your render coordinates by half the width/height of the map.

_________________
My indie games: http://cmagames.webs.com


Top
 Profile  
 
PostPosted: Mon Oct 08, 2012 7:19 pm 
Offline

Joined: Sat Sep 29, 2012 8:13 pm
Posts: 13
phew thanks!
This is the right code other people if needed^^
Code:
map.render(resX/2 - tileX/2,resY/2 - ((mapY*tileY)/2));


Uhm but one question: Whats the difference between render(); and renderIsometricMap(); ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group