Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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 15865 times)
0 Members and 1 Guest are viewing this topic.
Offline Slip

Junior Newbie





« Posted 2010-02-23 02: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.

cheers

Slip.
Offline Wildern

Junior Member





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

For the graphics, I recommend looking at
http://reinerstileset.4players.de/
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 14: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 03:08:10 »

http://www.gamedev.net/reference/articles/article744.asp

http://www.gamedev.net/reference/articles/article747.asp

http://www.gamedev.net/reference/articles/article738.asp

http://www.java-gaming.org/topics/isometry-mouse-mapping-screen-to-worldcoordinates/16936/view.html

http://www.gamedev.net/community/forums/forum.asp?forum_id=13 (show all topics)

http://www.compuphase.com/axometr.htm

http://www-cs-students.stanford.edu/~amitp/gameprog.html

http://www.gamedev.net/reference/list.asp?categoryid=44
Offline sloth

Senior Newbie




"And you will shed tears of scarlet."


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

You could always fake isometric maps.. Tongue


.
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 9


Age of Conquest makes your day!


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

See section 2 for some Java code I wrote:
http://www.noblemaster.com/public/

Webstart Demo: http://www.noblemaster.com/public/webstart/isomap/IsoMap.jnlp

Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #6 - Posted 2010-04-09 00:37:39 »


I entered 2 isometric games in the recent Java4k competition
Falcon4k
Assassins4k

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.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
                                    // Draw shadow after drawing top block

                                    // Create an image for compositing        
                                   gc.setComposite(AlphaComposite.Src);
                                    gc.setColor(transparent);
                                    gc.fillRect(0, 0,
                                      IMAGEWIDTH, IMAGEHEIGHT);
                                    gc.drawImage(
                                      m<2?shadow[6+m]:shadow[8],
                                      bsx, bsy,        // Destination
                                     bsx+tw, bsy+th,
                                      tx, ty,          // Source Tile
                                     tx+tw, ty+th, null);

                                    // Mask anything not at floor level
                                   gc.setComposite(
                                      AlphaComposite.DstIn);
                                    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 07: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  
 
 
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 (56 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (212 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

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