Like Tree2Likes

What type of graphics is this ?

This is a discussion on What type of graphics is this ? within the Game Programming forums, part of the General Programming Boards category; I'm thinking of investing some time into making a 2D game. (I'll use sfml and standard C++...and create the sprites ...

  1. #1
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498

    What type of graphics is this ?

    I'm thinking of investing some time into making a 2D game.
    (I'll use sfml and standard C++...and create the sprites and edit textures in Krita and GIMP respectively).

    I found the following picture some days ago and forgot what game it is from, but I'm curious how the graphics is structured.

    Name:  190953_large.jpeg
Views: 4192
Size:  150.4 KB

    Is it possible to do without *any* 3d stuff ?
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,246
    The vast majority of those style of games don't use any 3D.

    That one may use 3D (I think this because the shadows look very nice for stuff done in advance.), but it looks to me as if it is just 3D models rendered into sprites with specific rotations.

    Anyway, what you have their is almost certainly a simple rendered background with a "walk path" layer.

    Oh, and yeah, it is absolutely possible; a lot of old isometric games that appear 3D was all simple (even if incredibly well drawn) 2D stuff.

    Soma

  3. #3
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Can you give me some technical terms I can look up ?

    I "think" I've figured it out, but I'd rather not go trial and error for this, if I can avoid it.
    Last edited by manasij7479; 06-12-2012 at 12:17 PM.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,532
    manasij7479 likes this.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,246
    Can you give me some technical terms I can look up ?
    I kind of thought my reference to "walk path" and "isometric games" was sufficient.

    Soma

  6. #6
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Quote Originally Posted by phantomotap View Post
    I kind of thought my reference to "walk path" and "isometric games" was sufficient.

    Soma
    Yes, it was.
    Though it'll be much more complicated in practice, involving multiple layers.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  7. #7
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    OT: Do yourself a favor, and forget about SFML 1.6, just use the 2.0 RC, it's so much better, even though it's still in beta.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  8. #8
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Quote Originally Posted by Neo1 View Post
    OT: Do yourself a favor, and forget about SFML 1.6, just use the 2.0 RC, it's so much better, even though it's still in beta.
    Already using that...for some time. (The documentation is fabulous !)
    Though I haven't decided yet if I'd use its graphics api or take the difficult way with OpenGL (3.3) .
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  9. #9
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    It's an isometric, more correctly an axonometric, projection. It's not exactly the same as a classic engineering/CAD isometric because of the way the pixels line up, but as close as damn it. It looks like a classic 2-across, 1-up isometry that almost every "isometric" game uses - for every pixel you go "up", you go two to the side so in order to draw a "straight" line that follows the grid of sprites.

    To make it, you blit 2D sprites that have been drawn that way (i.e. lay down two lines that cross using the "2-across, 1-up" rule, those are your "axes" and then you have to make the sprites face the right way, look parallel to them, etcc.) onto a 2D background in the right order. No 3D involved but you may have to manually handle some depth (e.g. the top of the screen is drawn first so the bottom of the screen draws over it, etc.). You'll probably find that if you're doing a lot of drawing, you can accelerate the graphics with something like OpenGL but you still tend to keep it 2D and just use OpenGL as an accelerator, not a 3D-space creator. I'm in the middle of writing a game like that (very similar to Theme Hospital style, though that example is particularly pretty) and I just rewrote my SDL 2D blitter routines to use OpenGL to make it faster (about a 5-10x speed improvement I think, but not quite finished that yet).

    The hardest part is probably obtaining the sprites (and especially animated sprites) in the correct projection. Not many spriters can do iso and make it look good. You basically have square images with a "diamond" shaped sprite / tile inside them. By using colour key transparency / alpha tricks you get those sprites and tiles to overlap and come out like your image. Inside the game, it's just a grid and a simple conversion formula or two to go back and forth between grid and screen coordinates and the drawing routines are pretty simple. Not much code, lot of work for the artist, though. It's also a bit of a faff when it comes to rotating the screen so you can see things from "the other side" (e.g. behind a house) - you can only really rotate between the four views and only then if you bothered to make the sprites all properly (i.e. facing each way) and you have to code it yourself.

    If you're interested in actual code and the way sprites are used in a real game, go have a look at the Theme Hospital remake, corsix-th, based on an old DOS isometric game (so, no, you definitely don't need 3D!).
    Last edited by ledow; 06-13-2012 at 01:56 AM.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  10. #10
    Registered User
    Join Date
    May 2012
    Posts
    71
    Quote Originally Posted by Neo1 View Post
    OT: Do yourself a favor, and forget about SFML 1.6, just use the 2.0 RC, it's so much better, even though it's still in beta.
    Can you post a link or explain what the 2.0 RC is, im kinda interesting.

  11. #11
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,246
    Can you post a link or explain what the 2.0 RC is, im kinda interesting.
    ^_^

    That is "release candidate of SFML version 2.0" and not a distinct thing.

    Soma

  12. #12
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by CoffeCat View Post
    Can you post a link or explain what the 2.0 RC is, im kinda interesting.
    As Phantomotap said, it's just the newest version of SFML, it's still in beta, but i would bet it has less bugs than SFML 1.6 does anyways, and it is much better to work with. You'll have to compile it yourself though, there is a thorough tutorial (as always) on their site, here: SFML - Simple and Fast Multimedia Library

    There aren't any tutorials for actually using it yet, but you really don't need them, since the documentation is rather fantastic.
    The only downside is that they moved to lower camelcase
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  13. #13
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    In today's world it would be much simple to render in 3D and position the camera so that it appears isometric. Almost every tool out there is built for 3D not to mention every framework and API that wraps OpenGL or Direct3D. If you do this in 2D it will be extremely painful. It is no small task to build iso graphics that look good, fit together seamlessly, and hide the underlying 2D grid.

  14. #14
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    Quote Originally Posted by VirtualAce View Post
    In today's world it would be much simple to render in 3D and position the camera so that it appears isometric. Almost every tool out there is built for 3D not to mention every framework and API that wraps OpenGL or Direct3D. If you do this in 2D it will be extremely painful. It is no small task to build iso graphics that look good, fit together seamlessly, and hide the underlying 2D grid.
    Won't it be too daunting to try making my first game in 3D, without having a good idea about Computer Graphics theory ?
    And things like animation, collision detection, etc will be very difficult to handle, especially if I'm to do everything from scratch.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  15. #15
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,246
    It is no small task to build iso graphics that look good, fit together seamlessly, and hide the underlying 2D grid.
    Using rendered sprites is already a big thing with a lot of 3D tools so it isn't actually more difficult to get the look of parallel projection.

    Won't it be too daunting to try making my first game in 3D, without having a good idea about Computer Graphics theory ?
    I don't agree with what he said, but that's not exactly the right way of thinking.

    If you are only doing 2D, all interactions are isolated in 2D with the projection giving the look of 3D, the extra mathematics is almost trivial.

    One thing we do agree on is using "OpenGL" or "Direct3D" directly.

    Soma

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. creating a list pointer of parent type from base type...
    By Adamkromm in forum C++ Programming
    Replies: 14
    Last Post: 04-14-2012, 02:07 PM
  2. Replies: 2
    Last Post: 05-23-2011, 02:04 PM
  3. Replies: 5
    Last Post: 01-24-2011, 04:37 AM
  4. Replies: 17
    Last Post: 03-06-2008, 01:32 PM
  5. Converting type string to type const char*
    By rusty0412 in forum C++ Programming
    Replies: 1
    Last Post: 07-11-2003, 05:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21