2d game with libgdx where to start?

i want to make a 2d game with libgdx but im not sure where to start like what files to import and stuff

all i know is that i want to use tiled map editor tmx format maps

as far as sprites and controls i dont really know where to start

so far all i know is that gdx-setup-ui.jar can make the project folders but thats as far as i got

i tried running some example projects and i got nothing but errors and i tried following tutorials and their not exactly noob friendly :emo: :point:

if someone could help me out i’d really appreciate it ;D

http://code.google.com/p/libgdx/wiki/

And check the http://github.com/libgdx/libgdx, they have lot of test classes.

  1. Programming isn’t very n00b friendly. (But it is sometimes newbie friendly)
  2. Google is your friend.
  3. If asking for help, please be more specific. What errors were you getting?
  4. Start small, then work your way up to bigger projects.

i tried running the test/examples but when i import them i get a ton of errors like this (big list down below)

thats why i gave up on the examples…importing crap into eclipse seems like it chokes when i import too many files at once or something either way i rather just start working on my own game instead of trouble shooting other peoples example projects

people say libgdx is good so i might as well give it a shot and try to build a project from scratch but thats why im here right now asking for some help

sorry i wasn’t specific the first time but what i meant to ask was what backends/jars do i need, to get a 2d sidescroller started and where do i put those files(i assume the libs folder but im not 100% sure)?

do i need any other stuff before i can start coding ?

btw thanks for the quick replies guys 8)

EDIT*
removed long list of errors

Forum:
Use pastebin for long paste, and use code tag for in-post code.

Libgdx:
Learn by reading wiki first. Understand the concept. Don’t touch any code before you know how to setup libgdx projects. And after that, you better start from desktop first. Good luck :slight_smile:

yea i spent two days on the wiki going back and fourth i took a few notes but it all seems more like the guts of libgdx no so much the starting point

i know how to use the libgdx-setup-ui.jar thats about it
i was actually planning on going straight to andriod i dont want to risk putting together a game for desktop then struggle to port it to android i know with libgdx its supposed to be a pain free process but i rather just focus on my main target till i have a working prototype done

Then you may want to narrow down the use of classes. Have you known usage of TextureRegion, Stage, scene2d, Table, Screen, Game, InputListener, etc?

do you mean like the basic features and things i want in the game? or something else?

Something like that.

well i just want to get a very basic setup going

like haveing a map a chracter and the controls

so
sprites
controls
audio
collisions

maybe even particles buts thats later
particles(i couldn’t make the particle editor run on my main computer but i tested it on my sisters computer when she wasn’t home and it worked perfectly :o i’ll probably figure that out later)

i know how to use tiled map editor and i know theres some info about it in the wiki i was going to start there but idk if i might need some backend files/jars before i start trying to render out the map

so first off getting a map on screen
then maybe the collision and tile properties

Instead of using the Sprite and Texture classes, I would recommend using the newer Stage/Actor classes (not in some of the tutorials, because they’re newer) - they encourage better OOP design and make your code cleaner. Good example and basic tutorial here: https://code.google.com/p/steigert-libgdx/

Note that scene2d (and any scene graph) couples model and view. This is also true of Sprite. You can still make a fine game using them of course. :slight_smile:

I always use combo of Stage and Image for entities.

im getting kinda confused now some people tell me to use scene 2d then others people on other forums say not to use it and the wiki says its for UI but people say you can use it for the whole game ???

It’s true that scene2d is used for UI. Your game still needs UI right? for menu there are buttons, label, and more on option screen. However for entity (your ship etc) you may want to use Image, Sprite, or your own (? extends Actor) homemade class.

scene2d is great for UIs, use it. :slight_smile: For 2D games you can use scene2d or you can just use SpriteBatch. Using scene2d means you won’t be able to do the MVC pattern easily, but otherwise it is fine. Some games likely benefit more from scene2d, such as board games (mahjong, match3, etc).

Does no one use TableLayout anymore? Considering switching to Scene2D/TWL (mostly TWL) but idk.

Everyone uses TableLayout, because it is absolutely awesome. :slight_smile: Doing layout with anything else is pure hell.

Scene2D is yUp. Problematic if you have a yDown mindset and legacy code.
Only using it for ui stuff. Also not using table layout yet just pixels. But I see the benefits. We’ll see.

ok so i’m going to be using scene 2d for the menu but sorry for asking such a dumb question but how can i transition from the splash screen to the menu screen? :stuck_out_tongue: im still a bit new to java and im not sure what i should be looking for in the api