2d game with libgdx where to start?

This too: libgdx.l33tlabs.org/docs/api/

Hmm, that is from the old build server, Mario still probably has access there.

so the tablelayout-editor is the only thing i shouldn’t use
everything else is ok ?

The Idea of the DSL for me was not to write the DSL inside my .java files, but actually have them lying outside in layout files. I’d call them .tbl or .lay then. Or simply .txt, but the point is:
My goal was to write a little nashorn javascript magic inside the DSL, pre-parse the DSL to separate the Javascript stuff from the DSL stuff and then make it be the ‘Model’ and ‘Component’ part of the MVC pattern, the ‘View’ part being in java code.

The goal was not to create 10 classes for all of my layouts.
The real goal was to have something, where I don’t have to write any code anymore for writing a game. But that is only fiction :wink:

MTX uses a ton of classes just for a fancy menu but you gotta admit its really nice

Whats MTX? Googleing doesn’t help that much there…

To add a little bit to what I said: In [i]my[/i] opinion, code should [i]not[/i] represent Data, but data should represent Data, and code should be the abstract Structure of the Data. In other words: Classes are Button types, the table layout, the Label, the ScrollPane, etc., but not my "MenuScreen" or "SplashScreen". Since those classes would (almost) only contain data.

MTX is something for making menus, haven’t looked into too much but it looks interesting

someone told me about it in another forum when i was asking “how do you make your menus” i think the guy that told me about it, is the same guy that made MTX :o

The DSL works fine to describe your layout, until you need some code to generate layout. JavaScript could help there, but I would rather all my code be in Java for debugging, type safety, refactoring, etc. Ultimately it is better to do layout in Java, just need a nice API and to separate widget creation from layout. :slight_smile:

MTX is built on top of scene2d, AFAIK. I haven’t look at it much so can’t comment.

Nice to live in the same Time Zone now ;D

Javascript was more or less only an example. Also it’s always a personal preference. Why deprecate the DSL, if you could make your library a little bit more awesome? :wink: Yes. I read the Article about the deprecation. But maybe the DSL just needed to be tweaked a little? maybe…
The Idea I had was to actually use Scala for scripting. It’s incredibly easy and I know how it works. And It’s typed. Also, Javascript might be un-typed, but (I quote) “then it’s less ‘typing’” :wink: It’s a scripting language, so it should be suited for such kind of thing.

Aye, I’m in Croatia. :slight_smile:

I’m not too interested in Scala, but dragging around the runtime would be inconvenient. The DSL was cool but increased the complexity of the lib. The biggest reason to dump it is that its goal was to make complex layouts easier and to expose their hierarchy. What actually happened was the DSL could only be used for simple layouts. Anything complex had to be written in code anyway. This means it was the wrong tool for the job. I don’t see how it could have been saved. Turns out the Java API is quite easy to use.

i really hate myself for asking this but can someone show me what a simple table layout looks like all coded out or can someone tell me what are the important bits of code i need to get one together and on screen

i know theres this example but when i try running it i just get errors

i’m just trying to set up a simple main menu with a few buttons

I’m keeping tabs on this thread since I’ll be jumping into libgdx as well :slight_smile: Looking forward to the exchange of information. Reading the whole thread as been enlightening so far.

FYI mostly Test classes on libgdx official repo is kinda outdated. For example test classes that use ShapeRenderer, there’re some unknown enum members. Refer to Nate’s link, it has very complete guides.

http://code.google.com/p/table-layout/

And it’ll be better to post the error.

Start by creating a class ;DDD

There’s around 5 hours of video tutorials here spread out over 10 videos guiding the viewer through a single project:

Seems awesome.

heres the code its basicly the same thing as my last link
http://pastebin.java-gaming.org/ed22e146058

and heres the error
http://pastebin.java-gaming.org/d22e4206853

What error? These are simple warnings (even less than warnings).

You might want to learn simple java first if you think those are errors… :o

Nothing wrong on code, although you forget the @Override on listeners’ methods.

lol my bad its cause every time i see something under the problems tab i always just think to my self its an error

i’ll be more specific next time :wink:

so what am i missing cause when i do the quick fix it just tell me to get rid of those lines an with or without them i still dont get anything on screen

im just running that class by itself

heres what shows up on the console tab
http://pastebin.java-gaming.org/22e40386354

where exactly do i put it ?