Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (498)
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 item placement?  (Read 1355 times)
0 Members and 1 Guest are viewing this topic.
Offline LordChandar

Junior Member


Projects: 1



« Posted 2012-12-15 16:05:48 »

Howdy.

So today I am working on the best way to add items into the world.  Things like tables, chairs etc...

My isometric grid is based on a 64x32 terrain.  Charis are obviously smaller than 64x32, and tables can be larger.

The tile writing method I use basically makes a grid and puts images on the map in a grid.  I am having a little difficulty getting larger items to line up with smaller items etc...

Does anyone have any good solutions they would like to share about this issue?  Trying to place an item on the table is my biggest challenge right now.

Should the tables just be forced to be some large size multiple of 64x32?

Should I create little decoration bundle tiles that take 1,2,3,4 items put them together logically and then decorate with bundles?

Should I try to come up with a way to place items in the world in a pixel-perfect precision manner?

I am kinda stumped and it makes me have sad faces.

Any help would let me turn my frown upside down.

Cheers,
Offline ctomni231

JGO Ninja


Medals: 71
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #1 - Posted 2012-12-16 03:16:16 »

This problem is really not as big as you are making it seem. There was an old game called XCOM: Terror from the Deep that uses isometrics and item placement. What your game can learn from it is the ability to add floors. Since you are already able to place tiles on an isometric grid, you need to make another grid above that grid that accounts for a step. In other words, you'll have 2 planes stacked one on top the other.

A table will be placed on the lower plane, but the table top will be on a higher plane. All items on the higher plane will contain your items. You can make the upper plane the same length as the height of the front table leg. It'll also make it easier for items to have different levels in your world.

If you need ideas, take a look at some screenshots from that game to help you out.
http://www.mobygames.com/game/playstation/x-com-terror-from-the-deep/screenshots/gameShotId,348919/

Using planes at different heights will help you place objects a lot more easily. Good luck.

Offline Xyle
« Reply #2 - Posted 2012-12-16 13:16:15 »

I have used layers in my tile game in order to place certain things on top of other things. I used a layer called decorations in order to place paintings on walls, candles or plates on tables, etc.

I also create the table using a 64x64 tile. I just put an algorithm in the tile drawing function that starts drawing that tile based on its height.

Hope that helps a bit!
 Grin

Life is just a game, learn to play!
------------------------------------------
╬-YellzBellz Games!-╬ Cheesy
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline LordChandar

Junior Member


Projects: 1



« Reply #3 - Posted 2012-12-16 14:15:38 »

I appreciate the feedback.  I have 6 layers in the world.

Layer 0 is terrain
Layer 6 is roof
layer 1-5 could be anything.  I guess you are suggesting that layer 0 and layer 6 are drawn as isometric only, and I go back to standard 32x32 tile placement on the layers 1-5, or say layers 1-2 are isometric and layers 3-4-5 are standard 32x32flat tile placement?
Offline Xyle
« Reply #4 - Posted 2012-12-16 18:02:32 »

I use isometric tiles for everything in my game.
I model the object in blender and render it using an isometric camera, then use Gile to give the tile a transparent background.
Depending on the size of the object, it may be 64x32 or 64x64. (I use a sizing algorithm to draw the tile in the right spot when I draw the map)
The object is placed on a layer with a higher zorder or depth than the table.
My layers...
0 = ashpalt/concrete
1 = dirt
2 = grass/ floor
3 = objects (collidable, walls, trees, signs, furniture)
4 = decorations (paintings, candles, plates)
5 = collide layer (for detecting collisions)

I haven't created any objects that are wider than 64, but using the same drawing algo based on size should work with those too.
Heres a pic...


Life is just a game, learn to play!
------------------------------------------
╬-YellzBellz Games!-╬ Cheesy
Offline LordChandar

Junior Member


Projects: 1



« Reply #5 - Posted 2012-12-16 18:35:26 »

You have a beautiful looking game.  I think the artist and I will work out the technical difficulties.  I have decided to keep it all isometric.
Offline LordChandar

Junior Member


Projects: 1



« Reply #6 - Posted 2012-12-16 18:37:46 »

My algo using a sizing algo also, For anything larger than default tile height, it starts right justifying it.  It works well. 
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (16 views)
2014-04-15 18:08:23

BurntPizza (14 views)
2014-04-15 03:46:01

UprightPath (27 views)
2014-04-14 17:39:50

UprightPath (12 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (51 views)
2014-04-10 04:04:31

BurntPizza (110 views)
2014-04-08 23:06:04

tom_mai78101 (211 views)
2014-04-05 13:34:39

trollwarrior1 (180 views)
2014-04-04 12:06:45

CJLetsGame (185 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!