Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Isometric Object Rendering  (Read 1909 times)
0 Members and 1 Guest are viewing this topic.
Offline samcp12

Junior Devvie

Medals: 1

« Posted 2015-07-19 04:44:31 »


I've recently begun experiementing with rendering tiles isometrically, currently I'm using 128 * 64 tiles however I'm running into some difficulty on how to render objects that span multiple tiles and are larger than 128 * 64, a pattern I've noticed is that when the objects width exceeds 192 it  begins to become offset from the terrain tiles. I thought prehaps breaking the larger objects down into 128 * 64 tiles but then wouldn't that requiring rendering the individual tiles in a specific order?

Any tips would be great!

Offline ziozio
« Reply #1 - Posted 2015-07-19 07:42:19 »

It might be easier to see with a screen shot and some code of how you place your tiles (ie calculate x,y). It might also be good to see your projection matrix.
Offline samcp12

Junior Devvie

Medals: 1

« Reply #2 - Posted 2015-07-19 17:04:39 »

I'm simply using a nested for loop which contains the following

 int tileX = (j * tileWidth / 2) + (i * tileWidth / 2);
 int tileY = (i * tileHeight / 2) - (j * tileHeight / 2);

and then im drawing the tiles using the tileX and tileY, no matrix is being used.

I'm also curious how I would render sprites, I've tried finding articles explaining the process but I can't seem to wrap my head around it.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jonjava
« Reply #3 - Posted 2015-07-22 23:13:26 »

This may help, maybe not:

Offline DavidBVal
« Reply #4 - Posted 2015-07-27 10:57:57 »

Maybe my reply will be disappointing but... the fact they're called "tiles" lets out the fact that they're supposed to have a regular size, and match each other in size. In my isometric game I have spent a lot of time into "preparing" tilesets, i.e., once I have the 3D rendered image, cut and split it in tiles so I can then compose it as in a puzzle in the editor.

However, sometimes the big effort is not neccessary. For instance, I have created a layer called "scenery" that is always behind the objects layer (drawn first). another called "roofs" that is painted above (drawn later). It comes in handy for large structures like buildings, rock walls, etc that you know won't be walked around, and saves you the effort of splitting in tiles.

Pages: [1]
  ignore  |  Print  

hadezbladez (745 views)
2018-11-16 13:46:03

hadezbladez (386 views)
2018-11-16 13:41:33

hadezbladez (736 views)
2018-11-16 13:35:35

hadezbladez (194 views)
2018-11-16 13:32:03

EgonOlsen (2394 views)
2018-06-10 19:43:48

EgonOlsen (2557 views)
2018-06-10 19:43:44

EgonOlsen (1482 views)
2018-06-10 19:43:20

DesertCoockie (2145 views)
2018-05-13 18:23:11

nelsongames (1949 views)
2018-04-24 18:15:36

nelsongames (2629 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!