Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Isometric (non tiled) background

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    11
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Isometric (non tiled) background

    Hi All,

    I was wondering. If you were to create a Isometric program with a ‘fixed’ background. How can this best be rendered?

    For example:
    Cinema+games+room+1.jpg
    Let’s say the screen is non scrollable. This means the floor, walls, objects are always on the same place. I started thinking, as the player cannot interact with the floor or walls, would it be best to create an image of this ‘background’? Or should it be two images one for the floor (walkable) and one for each wall (non-walkable)?

    At the moment I do not have the knowledge or skill how to do this. I have built tile map programs only. But I would like to continue my dev skills and try a Isometric (non-tiled) program. I would like to create a room with a door. In the room there will be some NPC which do not walk. But they will ‘move’, like wiggling their heads for example.
    I would like the player to be able to walk across the room and through the door. Obviously, I would like collision detection stopping the player when he walks against a wall. I searched on Google, but I did not found anything besides a tile based solution. May be that is the way to go but I do not know? I guess the rounded couch is harder to create using tiles then using an image/sprite? Would somebody give me some insights on how to do this, please?


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 688 Times in 675 Posts

    Default Re: Isometric (non tiled) background

    Thread moved.

  3. #3
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 120 Times in 104 Posts

    Default Re: Isometric (non tiled) background

    These are usually still tiled, but with isometric tiles. Perhaps using the right shader to transform a non-isometric tilemap into an isometric one.
    If you want to keep it simple then make it simple. If you say that objects will never be hidden behind any map graphics, and that the graphics will never change, then simply create them as a static image.

    Unless of course you also want to keep the memory footprint low and that many of your graphics repeat in a certain pattern, in that case you would be back to using tilemaps. Either tilemaps with isometric tiles, or, as I said previously, a complex shader to do the dirty work for you.

  4. The Following User Says Thank You to Cornix For This Useful Post:

    Vinvar (September 9th, 2014)

  5. #4
    Junior Member
    Join Date
    Nov 2012
    Posts
    11
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: Isometric (non tiled) background

    Quote Originally Posted by Cornix View Post
    These are usually still tiled, but with isometric tiles. Perhaps using the right shader to transform a non-isometric tilemap into an isometric one.
    If you want to keep it simple then make it simple. If you say that objects will never be hidden behind any map graphics, and that the graphics will never change, then simply create them as a static image.

    Unless of course you also want to keep the memory footprint low and that many of your graphics repeat in a certain pattern, in that case you would be back to using tilemaps. Either tilemaps with isometric tiles, or, as I said previously, a complex shader to do the dirty work for you.
    Thank you. You gave me some ideas how to do it. I will try it the next couple of days.

  6. #5
    Junior Member
    Join Date
    Jun 2017
    Location
    Central Arkansas USA
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Isometric (non tiled) background

    I love Isometric 3D. There are a couple of ways to transform Model Coordinates to Screen Coordinates. One is to have x and y just as you would for 2D algebra Cartesian coordinate system and then Z is at 45 degrees either positive up to the left and negative down to the right. Or Positive Z up to the right and negative Z down to the left. I usually chose the first. In the first screen coordinate is x2=x3-z3 and y2=y3-z3 then. In the 2nd x2=x3+z3 and y2=y3-z3.

    Another way to do this is Have x axis aligned 45 degrees from up to right positive and down to left negative with Z same as above. So x2=x3-z3 and y2=y3-x3-z3 I think.. Someone check me.

    I found that a Cube looks funny because the top back right corner aligns too perfectly with the bottom left front corner. So I usually slanted it with some multiplication factor to the x axis calculations.

    Removing hidden stuff is easy, you just paint things from back to front. However not very efficient if something behind is totally hidden from view and completely overdrawn.

    I'm going to be working on some code and blog post soon dealing with this very thing.

Similar Threads

  1. introduction and my background
    By Jacob Luweesi in forum Member Introductions
    Replies: 1
    Last Post: August 8th, 2013, 04:46 PM
  2. A Background Image
    By Randor in forum AWT / Java Swing
    Replies: 6
    Last Post: November 14th, 2012, 04:28 PM
  3. Replies: 1
    Last Post: August 4th, 2012, 10:02 AM
  4. New Background
    By Tjstretch in forum Totally Off Topic
    Replies: 6
    Last Post: November 2nd, 2011, 11:25 PM
  5. background
    By b109 in forum AWT / Java Swing
    Replies: 0
    Last Post: May 24th, 2010, 06:37 AM

Tags for this Thread