Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (756)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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 1736 times)
0 Members and 1 Guest are viewing this topic.
Offline samcp12

Junior Devvie


Medals: 1



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

Hello,

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

1  
2  
3  
                  
 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: http://www.java-gaming.org/topics/drawing-isometric-tiles-inside-a-screen/24922/msg/212780/view.html

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  
 
 

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

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

nelsongames (74 views)
2018-04-24 18:14:32

ivj94 (759 views)
2018-03-24 14:47:39

ivj94 (87 views)
2018-03-24 14:46:31

ivj94 (643 views)
2018-03-24 14:43:53

Solater (102 views)
2018-03-17 05:04:08

nelsongames (184 views)
2018-03-05 17:56:34

Gornova (426 views)
2018-03-02 22:15:33

buddyBro (1086 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
java-gaming.org 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‑gaming.org
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!