Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (781)
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 2D Tutorials?  (Read 34350 times)
0 Members and 1 Guest are viewing this topic.
Offline Slip

Junior Newbie

« Posted 2010-02-23 01:47:26 »

Ok, im a student, and I will be starting my final year project this september, I would like to do a little research starting now on the feasability of certain ideas, one of which is an isometric 2D game, from the angle at which it might look slightly three dimensional.

I have developed games in java in the past, for university, but nothing this big, and I feel I may be in over my head, which is why I am researching this now...

Ideally I would like to get hold of some tutorials on this topic, so I can come up with a spec document, and begin development next month, so that come september I will be able to focus heavily on this as a project.

I am entirely willing to contribute all work that I complete to this forum in the form of an engine for people to use, however, for obvious reasons, publishing of code would have to wait until after I have handed the project in.


Offline Wildern

Junior Devvie

« Reply #1 - Posted 2010-02-23 01:50:58 »

For the graphics, I recommend looking at
He used to have some tuturials, but there are a lot of free isometric game graphics there.
Offline Slip

Junior Newbie

« Reply #2 - Posted 2010-02-23 13:18:38 »

Thanks, but its not so much tile sets that I need, I will probably create my own, what I need is a tutorial or sample starter kit, to show how I display the tiles in a 2D java game...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SwampChicken
« Reply #3 - Posted 2010-02-25 02:08:10 » (show all topics)
Offline sloth

Senior Newbie

"And you will shed tears of scarlet."

« Reply #4 - Posted 2010-04-08 20:14:20 »

You could always fake isometric maps.. Tongue

Offline noblemaster

« JGO Spiffy Duke »

Medals: 35
Projects: 11

Age of Conquest makes your day!

« Reply #5 - Posted 2010-04-08 20:19:07 »

See section 2 for some Java code I wrote:

Webstart Demo:

Offline Alan_W

JGO Knight

Medals: 8
Projects: 3

Java tames rock!

« Reply #6 - Posted 2010-04-08 22:37:39 »

I entered 2 isometric games in the recent Java4k competition

The drawing routine starts at the back row and draws each column of blocks in turn in back to front order (painters algorithm).
This works 100% for drawing the blocks, but what do you do when you want to draw the player, which can overlap up to 4 columns?
The answer is to draw the player in every column it overlaps.  You draw all the blocks below the player.  Then draw the player.  Then draw any blocks above the player.

However you need to mask out the pixels that fall outside the column.  This can be achieved by clipping left and right to the column boundaries. Assassins4k uses this technique.  You effectively draw the player 4 times.  This only works if there are no blocks above the player.

If there are blocks above the player (i.e. you can go under an arch) or you want to draw shadows (as in Falcon4k), clipping left and right is insufficient. You need to mask for the hexagon shape of the isometric cube for the player, and for the quadrilateral floor tile shape for the shadow.  You can use Graphics2D and AlphaComposite for this.

                                    // Draw shadow after drawing top block

                                    // Create an image for compositing        
                                    gc.fillRect(0, 0,
                                      IMAGEWIDTH, IMAGEHEIGHT);
                                      bsx, bsy,        // Destination
                                      bsx+tw, bsy+th,
                                      tx, ty,          // Source Tile
                                      tx+tw, ty+th, null);

                                    // Mask anything not at floor level
                                    gc.drawImage(mask, 0, 0, null);

                                    // Draw Shadow
                                    if (mHeight>0)
                                        g.drawImage(composite, sbx, sby, null);            

The complicated stuff in the drawImage calls deals with the fact that the player shadow is offset w.r.t. the mask (which is aligned to the column we are drawing)

Time flies like a bird. Fruit flies like a banana.
Offline Xyle
« Reply #7 - Posted 2010-04-09 05:23:18 »

Excellent List of information that I continually browse for information. Once I read the title of the post those links were the first thing I thought of posting.

They all show a few different approaches and give a pretty good idea of what the Isometric view is. They should all at least give you a good stepping point as they did for me that will eventually lead you to understand what kingaschi and Alan_W are talking about.

I've been working on my isotiler program for a few months now and I constantly keep changing the tile size, recreating my iso tiles in the new size and trying it out, just to start all over. The hardest part for me was figuring out how to detect what column and row the mouse was clicking in. Thanks from the help of Demonpants and Dishmoth, I finally got that working.

SwampChicken, you may want to consider creating an Isometric Tutorial Link post in the Tutorial Section to help out the newbs like me.

Thanks for all the info!

Life is just a game, learn to play!
╬-YellzBellz Games!-╬ Cheesy
Pages: [1]
  ignore  |  Print  

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

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

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

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

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

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

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

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

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

nelsongames (2815 views)
2018-04-24 18:14:32
Deployment and Packaging
by philfrei
2019-02-17 20:25:53

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 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!