Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (622)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (674)
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  
  Platformer Style with Depth  (Read 1722 times)
0 Members and 1 Guest are viewing this topic.
Online Jimmt
« League of Dukes »

JGO Kernel

Medals: 163
Projects: 5
Exp: 3 years

« Posted 2013-02-24 01:11:39 »

So, I've been wondering whether to make my game true 2d, or 2d with depth like in the old TMNT arcade games. I would have outright picked 2d with depth, as it looks a lot better and expands gameplay, but I'm not too sure how I would perform collision with that (would the box2d shipped with libgdx work? I honestly don't know). I looked at this thread: but there was only 1 reply, "You'll need to decide whether you're doing 2D or 3D. That's more an art decision than a programming one"
There's probably other problems with 2d and depth that I haven't thought of, but any help is appreciated.
Offline davedes
« Reply #1 - Posted 2013-02-24 01:51:01 »

I would use a 3D collision system (eg. bounding boxes). The rendering would be fake... simply adjust a sprite's Y value and size based on the Z value of the entity's bounding box. Order your sprites by layer (background, middleground, foreground) and then by Z position / depth.

Also see this answer:

Offline relminator
« Reply #2 - Posted 2013-03-04 13:30:58 »

Why not go full 3d with 2d collisions?

You can just leave 3D out of the picture by setting your gameplay at z == 0 just like I did with this game (2d sprites are still in a 3D world, but collisions are in 2D):

Source is in the /source folder.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mike

« JGO Spiffy Duke »

Medals: 147
Projects: 1
Exp: 6 years

Java guru wannabe

« Reply #3 - Posted 2013-03-04 13:57:17 »

Because in the old TMNT games and so on you can actually walk in the depth axis.

I'd do it with 3d collisions. but fake the rendering like davedes suggested.


My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Online Jimmt
« League of Dukes »

JGO Kernel

Medals: 163
Projects: 5
Exp: 3 years

« Reply #4 - Posted 2013-03-05 23:57:16 »

Sorry for the extremely late reply, but I've been pretty busy. How do you suggest I go by bounding boxes, just have a thickness/depth variable in each player/enemy class? Will this still work with a high-level library like libgdx's box2d?
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

basil_ (32 views)
2015-09-30 17:04:40

shadowstryker (16 views)
2015-09-29 15:55:06

TheSpaceHedgehog (22 views)
2015-09-29 01:58:48

GamerC4 (45 views)
2015-09-24 21:10:38

GamerC4 (66 views)
2015-09-24 21:09:48

htuy (21 views)
2015-09-24 04:57:24

htuy (30 views)
2015-09-24 04:56:35

htuy (20 views)
2015-09-24 04:56:09

htuy (21 views)
2015-09-24 04:47:33

Roquen (58 views)
2015-09-21 12:54:28
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 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!