Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Isn't it possible to make 3D games in Corona?
Started by Coder101 Feb 05 2017 10:57 AM

- - - - -
18 replies to this topic

Best Answer roaminggamer , 05 February 2017 - 12:45 PM

Ah, I see what you're thinking.

 

I wouldn't really call that 3D.  It is really more of a Mode 7 variation.  i.e. It is 2D emulating some aspects of 3D using math tricks and intelligent coding.  

 

Note: I am not diminishing the example.  It is tricky and quite impressive.  

 

Are you asking how to do that?   Sorry, your original post wasn't very clear or at least it seemed to be asking the question "Is it possible to make 3D games with Corona?"

 

TIP

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Coder101

[GLOBAL: userInfoPane.html]
Coder101
  • Contributor

  • 118 posts
  • Corona SDK

[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

Corona is a 2D SDK.

 

What gave you the impression it was 3D?

 

Also, if you're a new developer I seriously doubt you want to start with 3D development.  It is way more to know, learn, and understand.

 

It isn't just one more dimension...

  • It is 3D modelling.
  • 3D physics, math, etc.
  • 3D issues you won't have to deal with in 2D (gimbal lock, and other weird stuff)
  • Also, the mathematics for the really interesting problems get much harder, so be sure you know calculus.
  • This list goes on.

Edited by roaminggamer, 05 February 2017 - 11:11 AM.


[TOPIC: post.html]
#3

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,842 posts
  • Enterprise

I am working a scene kit plugin for corona which allow you to make 3D games

[TOPIC: post.html]
#4

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,842 posts
  • Enterprise

It will only work on apple devices. Apple TV, iOS, and macOS

[TOPIC: post.html]
#5

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

Note:  I'm not trying to discourage you from making 3D games if that is what you think your passion will be.

 

I'm just saying, it is a lot of work, even with all the engines, libraries, and kits you have at your disposal today.



[TOPIC: post.html]
#6

Coder101

[GLOBAL: userInfoPane.html]
Coder101
  • Contributor

  • 118 posts
  • Corona SDK

I meant that even, if it is 2D, you can create 3D stuff. Like this:https://youtu.be/PT70aQPI5ag

I know it is a lot of work though, you need to create 3D libs and engine from scratch.

[TOPIC: post.html]
#7

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

  Best Answer

Ah, I see what you're thinking.

 

I wouldn't really call that 3D.  It is really more of a Mode 7 variation.  i.e. It is 2D emulating some aspects of 3D using math tricks and intelligent coding.  

 

Note: I am not diminishing the example.  It is tricky and quite impressive.  

 

Are you asking how to do that?   Sorry, your original post wasn't very clear or at least it seemed to be asking the question "Is it possible to make 3D games with Corona?"

 

TIP


Edited by roaminggamer, 05 February 2017 - 12:51 PM.


[TOPIC: post.html]
#8

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,641 posts
  • Corona SDK

Note: It is a lot of work.  You are right, but I guess I was also trying to say, "Working in 3D requires a lot of knowledge, skills, and experience."  i.e  If you're new, making 2D games to start will be faster and more rewarding.  

 

I'm not judging anyone.   I am saying, from my own experience, I know starting with 2D is more rewarding and a natural path to 3D.



[TOPIC: post.html]
#9

StarCrunch

[GLOBAL: userInfoPane.html]
StarCrunch
  • Contributor

  • 842 posts
  • Corona SDK

A major hurdle in implementing (basic) 3D is hidden surface removal: not showing things that are behind another object. In 2D this tends to be fairly simple: just order the objects back-to-front. It eats up a little fill rate sometimes, but 2D scenes can usually afford it.

 

Things get trickier in 2D when more than two objects interact. A case of this is shown in the painter's algorithm link, with overlapping polygons. Which one is in front? In back?

 

You can get quite far if you impose constraints on what you see, for instance in Matthew's F-Zero-ish demo or rakoonic's Outrun-ish one. (The MTE author had something too, but I forget what to search.) Along the same lines, something Wolfenstein-ish is VERY feasible, say with thin vertical sprite frames making up the walls.

 

Since meshes became available, BSP-based 3-D games should be totally possible. (Or related techniques, e.g. those under "See also" in that link.) Here the constraint is that the world is mostly static (and possibly favoring "indoor" environments, though I'm fuzzy on that). Suffice it to say, I've been pondering this.  :) With two copies of the world you could render one and use the other to write a z-buffer for drawing depth-sorted sprites into the world. This would make stuff like Doom or Descent or Myst possible; I just recently replayed 7th Guest (ARGH) and that looked quite doable as well. Still, lots of work!



[TOPIC: post.html]
#10

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,842 posts
  • Enterprise

[TOPIC: post.html]
#11

Coder101

[GLOBAL: userInfoPane.html]
Coder101
  • Contributor

  • 118 posts
  • Corona SDK

 

code: https://gist.github.com/scottrules44/1d9ed47d7550655474e64886a96489b8

 

note this code is subject to change

That is very impressing.. :)



[TOPIC: post.html]
#12

sporkfin

[GLOBAL: userInfoPane.html]
sporkfin
  • Contributor

  • 779 posts
  • Corona SDK

Scott,

 

I would love to see this as a plugin!  Do you have a sense of your timeline until completion?   No pressure ; )

 

I assume the effects will be for straight-edged polygons and not for curved or circular objects?  Either way, that's pretty cool!

 

-Jonathan



[TOPIC: post.html]
#13

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,842 posts
  • Enterprise

Scott,

I would love to see this as a plugin! Do you have a sense of your timeline until completion? No pressure ; )

I assume the effects will be for straight-edged polygons and not for curved or circular objects? Either way, that's pretty cool!

-Jonathan

About 90% percent done with the plugin( mainly just have to finish particle stuff). There are about 50+ functions/ 30+ properties that need be documented. So that maybe the hard part. Just for some clarify this is a 3D engine plugin (not some 2d/2.5d tricks) which taps into the scene kit library and allows you to make 3D shapes and objects. Scene kit was build by apple(which is why it only works on iOS, macOS, and TvOS) and the plugin is native.

Glad you guys like it :)

[TOPIC: post.html]
#14

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,842 posts
  • Enterprise

Here are all the shape I have in the plugin

SCNText

A geometry based on a string of text, optionally extruded to create a three-dimensional object. 

SCNBox

A six-sided polyhedron geometry whose faces are all rectangles, optionally with rounded edges and corners.

SCNCapsule

A right circular cylinder geometry whose ends are capped with hemispheres.

SCNCone

A right circular cone or frustum geometry.

SCNCylinder

A right circular cylinder geometry.

SCNFloor

An infinite plane that can optionally display a reflection of the scene above it.

SCNPlane

A rectangular, one-sided plane geometry of specified width and height.

SCNPyramid

A right rectangular pyramid geometry.

SCNSphere

A sphere (or ball or globe) geometry.

SCNTorus

A torus, or ring-shaped geometry.

SCNTube

A tube or pipe geometry—a right circular cylinder with a circular hole along its central axis.

 

 

Note scnshape was not added because it is easier to just load in models

from: https://developer.apple.com/reference/scenekit?language=objc



[TOPIC: post.html]
#15

sporkfin

[GLOBAL: userInfoPane.html]
sporkfin
  • Contributor

  • 779 posts
  • Corona SDK

Cool!  OK, I don't want to take any time away from your coding or documentation time so I will withhold my 10,000 questions for now and wait for your next update.

 

I hadn't noticed the Apple scene kit release.  I'm glad you are taking advantage of that.  This is going to be awesome for Corona.



[TOPIC: post.html]
#16

Crashcrash777

[GLOBAL: userInfoPane.html]
Crashcrash777
  • Observer

  • 17 posts
  • Corona SDK

Will I be able to use these plugins without having corona enterprise? If so this is going to be awesome :D



[TOPIC: post.html]
#17

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,622 posts
  • Enterprise

Yes, this plugin is available to Corona SDK subscribers.

 

Rob



[TOPIC: post.html]
#18

Crashcrash777

[GLOBAL: userInfoPane.html]
Crashcrash777
  • Observer

  • 17 posts
  • Corona SDK

Oh yeah! Will it work with android?



[TOPIC: post.html]
#19

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,842 posts
  • Enterprise

Oh yeah! Will it work with android?

Scene kit is a library made by apple for apple platforms. It took a lot of work (2 months) to get this working on iOS. I most likely will not be doing the android version at all or least not for a long time.




[topic_controls]
[/topic_controls]