Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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  
  LIBGDX  (Read 953 times)
0 Members and 1 Guest are viewing this topic.
Offline pavul

Junior Devvie


Medals: 4
Exp: 4 years



« Posted 2018-03-09 02:21:17 »

i have been reading about libgdx and seems to be the better option to me ( i was about to use godot and libgdx, cause im moving from game maker studio 2, im a java developer so i had to choose between libgdx), so, the main class should be a GGAME, that game should have Screens, screenes is where each level reside, but there is another approach called Scene2D, bassically is to add an Stage and actors to a screen, so, my question is, what advantage have Stage over screen, what if i dont use Stage or actors, but screen and sprites?

its better not know why it works, that know why is not working
Offline VaTTeRGeR
« Reply #1 - Posted 2018-03-09 09:04:08 »

They are not on the same level of abstraction:

->Screen does nothing for you except provide a template, it's an interface for you to implement, it contains no logic.

->Stage on the other hand does transformation solving, sprite sorting, event management, hit detection etc etc for you. It's a class like SpriteBatch or ParticleController, containing lot's of logic, meant to be used inside your game/screen.

You could have multiple screens with each multiple stages in them, which is what you should probably do!
Use one Stage for your gameplay and another for your GUI. Then use multiple screens for your different levels.

What you don't want to do is add and remove objects piece by piece from the stage yourself when you change levels, which is why you should use different screens with each their own Stage(s).

Read this: https://github.com/libgdx/libgdx/wiki/Scene2d
Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (349 views)
2018-11-16 13:46:03

hadezbladez (183 views)
2018-11-16 13:41:33

hadezbladez (348 views)
2018-11-16 13:35:35

hadezbladez (84 views)
2018-11-16 13:32:03

EgonOlsen (2179 views)
2018-06-10 19:43:48

EgonOlsen (2221 views)
2018-06-10 19:43:44

EgonOlsen (1378 views)
2018-06-10 19:43:20

DesertCoockie (2011 views)
2018-05-13 18:23:11

nelsongames (1668 views)
2018-04-24 18:15:36

nelsongames (2308 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!