Looking for source code resources

I’m new to Java and LibGDX and find I learn well by examining source codes from games. I see a lot of platform games for LibGDX and a lot of overhead RGPs…but I want to make a top down shooter/rogue-like, and haven’t found many source codes for them…at least not in the last year or so.

Thanks.

If you want to learn you better start at the LibGDX wiki and not by sifting through convoluted bodged-together hobby projects on github.

Also, literally the second thing you find when searching for “libgdx rpg site:github.com” on google already looks pretty damn polished and nice: https://github.com/mingli1/Unlucky

But that IS on Github? Also it’s an RPG but I said all the source codes I found so far were RPGs and platform games…?

You wanted to make a top down shooter right? Adding some shooting mechanics to a top down rpg is piss simple. The hard parts are map/asset loading/handling, menu transitions, save states and basically everything except spawning a bullet and doing some intersection testing.

[quote]But that IS on Github?
[/quote]
The repo i linked does most of what you would need for a top down shooter in a seemingly professional fashion and assets are included, if that doesn’t help you i don’t know what could.

LibGDX provides all the facilities to implement a top down shooter out of the box, circle/ray<->box/triangle/etc collision and all kinds of easy to use abstractions, just read the manual and get accustomed to the framework.

I wanted to do top-down shooter too ;D With LibGDX something like Alien Breed will be relatively easy, so yeah “just read the manual and get accustomed to the framework.”

Well it’s all hard in the beginning. I think you mean those parts are ‘harder’.

So there’s hope for github after all. :wink:

The reason I’m looking for source codes is because I hate reading manuals. Video tutorials are alright but I tend to get the most from analysing source codes, that’s why I’m looking for them. The only element a top down rpg has in common with a top down shooter is the movement, everything else is different. RPGs also tend to be huge and bloated with all kinds of other stuff too. Those source codes tend to be the biggest of all.

Well I posted this because I hate using manuals to learn. I much prefer going through a source code to get used to the framework and how a game is put together in LibGDX. I found this useful for example https://github.com/ingriddev/Libgdx-Box2d-Platformer since it’s quite bare bones but still has structure. Although it’s not a top down shooter.

[quote]The reason I’m looking for source codes is because I hate reading manuals.
[/quote]
The LibGDX wiki is basically a collection of simple source code examples plus a brief explanation, it doesn’t get much better than this :smiley:

The LibGDX wiki is basically a collection of simple source code examples plus a brief explanation, it doesn’t get much better than this :smiley:
[/quote]
Ok that sounds good. I couldn’t see where the source codes are from the index though: https://github.com/libgdx/libgdx/wiki

You’re almost there buddy, keep your eyes wide open for that sweet sweet source code :smiley:

Ok there’s no source code…you must be so funny at parties. ::slight_smile:

Almost every single topic there has example snippets of code, i’m amazed at how you can navigate around that so elegantly: https://github.com/libgdx/libgdx/wiki/Rendering-shapes

Don’t you think this or this here is more up to your speed ::slight_smile:

We were all beginners once. If doing things right, we will be a beginner many times over in many different spheres. I can certainly understand checking for code examples if starting out in a new area. They can be a big time saver.

If I knew of a good example, I would point to it. Someone else may yet provide a link to something useful. I suggest asking at a couple other sites as well, but please follow up here if you get a solution worth sharing.

Sometimes attempts to help don’t help, but one can still appreciate a good intention.

Is the request for a rare combination of genres? This could be a situation where the best course turns out to just push forward, reinventing the wheel so-to-speak. Then, make the reinvented wheel available to others via github and tutorial. Or post either or both on JGO. That helps build the community.

Like Phil said, we’re all beginners first. But you just can’t come and ask how to do it…Whatever source code anyone gives to you will be an example of probably their game, and how THEY did it, and there’s more than one way. What you need to do, is study this forum, and google and SO, and try to do the first thing, and when you cant figure it out, post examples of what you have tried to do and ideas of why it won’t work. You will get a lot more help this way. One thing at a time.

Also, you can just take the source and copy someones game and it magically works. Even if the most successful person on this form gave you all the code, it wouldn’t work when you try to run it. Even the basics take years of learning. Make pong or a flappy birds game with LibGDX first, so you get the basics. I guarantee if you just look at source codes for all sorts of different games you’ll be in the same place as you started.

I say, dive into whatever source code you can find, and aim high. The worst that can happen is that you’ll learn something. :slight_smile:

FWIW, I’ve got a few LibGDX repos, my best probably being https://github.com/SteveSmith16384/SimplePlatformer . It’s a multiplayer platformer (yes way) with collectables and mobs, and I designed it to be easy to understand and thus extended by others. It’s a side-view game, but the only difference between side view and top-down is the gravity component.

I agree with this…you put a lot of source code up that is very helpful. If you dig deep enough in threads you can find the source code to my game (hint it’s here: https://github.com/IanFell/GameTemplate/tree/master/MyGame-core/src ) but I dunno if you wanna look at that because I dunno if it’s technically correct, but it works.