• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps learn game development

oriz

Newbie
I learned android on eclipse ide and i want to get in to game development on android but when can i learn that subject?
 
Oh, first of all you need to learn game development stuff in general, which is not related to Android at all. You should learn trigonometry, a bit of linear algebra, as well as collisions and AI. Try to create a classic game, like space invaders.
 
Oh, first of all you need to learn game development stuff in general, which is not related to Android at all. You should learn trigonometry, a bit of linear algebra, as well as collisions and AI. Try to create a classic game, like space invaders.

Ok i will try should i do levels? And i put the invaders in some sort of picturebox right? But the picture box is square and the space ship isnt how can i make the picture box shape like the spacesheep shap?
 
You should draw ships, bullets and invaders in a separate app, like Gimp and load these images, but in game logic, for collisions, treat them as squares. At first try not to bother with levels, just create one level, to learn how the real time game cycle works, how can you handle collisions, etc.
 
You should draw ships, bullets and invaders in a separate app, like Gimp and load these images, but in game logic, for collisions, treat them as squares. At first try not to bother with levels, just create one level, to learn how the real time game cycle works, how can you handle collisions, etc.

I did not understood what you ment
how can i make the picture box fit the space sheep and bullet size? It is square and the bullet is circle so there can be a situation that the bullet didnt hit the sheep and it stil count as hit
 
Do it for the sake of simplicity. It's your fist game and you shouldn't mess with exact collisions. When it's ready, when you are able to play, then you can update your game with exact collision test. This can be done by testing these images pixel by pixel.
 
Do it for the sake of simplicity. It's your fist game and you shouldn't mess with exact collisions. When it's ready, when you are able to play, then you can update your game with exact collision test. This can be done by testing these images pixel by pixel.

Ok no problem can you answer the private message i sent you? I cant relize how to do the bullets..
 
No, the ship can shoot only one bullet at the time, take a look at it here. When the bullet is hit or out of the screen, you can ignite another one, which is, in fact, the same bullet.
In complex cases, when you really need more than one bullet, you should use a so called "pool of objects", but it's too early for you to learn about pools.
 
No, the ship can shoot only one bullet at the time, take a look at it here. When the bullet is hit or out of the screen, you can ignite another one, which is, in fact, the same bullet.
In complex cases, when you really need more than one bullet, you should use a so called "pool of objects", but it's too early for you to learn about pools.

Ok and what about the enemies bullets? How to choose which enemy needs to shoot and the enemies dont shoot only one bullet at a time so how to make them shoot multiple bullets?
 
Ok and what about the enemies bullets? How to choose which enemy needs to shoot and the enemies dont shoot only one bullet at a time so how to make them shoot multiple bullets?

Your getting ahead of yourself here man. You should be asking yourself different questions right now. like "How do i set up the frame work for such a project?" or "How do I create a start screen?" or anything besides bullets really lol. At least for now.

I appreciate your enthusiasm but you just need to focus a bit.:)
 
Your getting ahead of yourself here man. You should be asking yourself different questions right now. like "How do i set up the frame work for such a project?" or "How do I create a start screen?" or anything besides bullets really lol. At least for now.

I appreciate your enthusiasm but you just need to focus a bit.:)

I thought of making a space sheep picture box that moves left and right and on the top make a picture box table containing the enemies is that ok for the framework of this project?
 
You kinda got the right idea. By "framework" for the project I basically mean. Coming up with a plan of attack to lay down the foundation for your app/game. It makes it much easier to plan out a flow chart of some sort for more complicated projects to give yourself an idea of how things should work together.

Ok, since your just starting out lets stick with an easy beginning. The start screen.
I would advise just doing a background picture with the title of your game and one button to start and possibly another button to exit the game.

Do you already know how to set up a project in eclipse? Are you going to be using the eclipse emulator or will you be using a connected device to test your game?
 
You kinda got the right idea. By "framework" for the project I basically mean. Coming up with a plan of attack to lay down the foundation for your app/game. It makes it much easier to plan out a flow chart of some sort for more complicated projects to give yourself an idea of how things should work together.

Ok, since your just starting out lets stick with an easy beginning. The start screen.
I would advise just doing a background picture with the title of your game and one button to start and possibly another button to exit the game.

Do you already know how to set up a project in eclipse? Are you going to be using the eclipse emulator or will you be using a connected device to test your game?

I am using a real device that i own and i know how to create eclipse project i learned java to a good level and the basic of android
 
I agree with ProjectLiquid, you are running ahead of yourself. oriz, don't bother with bullets of enemies. Let's assume they never fire. Also assume they are just boxes, as well as yous ship. Your ship (which is just a box) can shot one bullet at the time. When this simle project is finished and it works - only then you can ask other questions. Even if you are very good in Java, it will take a couple of hours to finish.
 
Just adding a bit the conversation.
You should learn the LibGdx framework. There are a bunch of great tutorials on YouTube and around the internet. It has a lot of built in functionality like hit-detection, gravity and texture-mapping/loading. But be patient. I spent 2 days making the simplest of platform games.
Other benefits are that while you work on the core project it also lets you automatically make PC, Android, and iOS ports depending on your knowledge of these platforms (I personally have not tried successfully exporting to iOS as I have no idea how that works in a java environment)

libgdx
 
I wanted to propose a bunch of frameworks too, but I think it's a bit too early to dive into game frameworks. At first it's much better to create a simple game using the basic language functionality.
 
I wanted to propose a bunch of frameworks too, but I think it's a bit too early to dive into game frameworks. At first it's much better to create a simple game using the basic language functionality.

I don't know. I dove pretty head first into it after 1.5 years of java experience with no prior programming experience, let alone Android development.
If the goal is just to make games I don't see why at least trying it out wouldn't help get an understanding of how things work in games.
I agree, he is definitely getting ahead of himself in the way that he doesn't know about these game-specific terms, but I learned so much from using libgdx, though not Android specific to be fair.

Running into these kinds of problems helped me understand the mentality behind game design a lot more.
https://www.youtube.com/watch?v=S4pAnnrgsPk
 
Of course, you are right, you can successfully jump into game framework immediately, but it's helpful to start to create a simple game without tutorials, by using your own mother wit, and also you need to be able to use bare boned API to avoid abstraction leaks or to be able to switch between different game engines if necessary.
 
Of course, you are right, you can successfully jump into game framework immediately, but it's helpful to start to create a simple game without tutorials, by using your own mother wit, and also you need to be able to use bare boned API to avoid abstraction leaks or to be able to switch between different game engines if necessary.

Interesting article!
Though to be fair a lot of the tutorials do explain the stuff that's going on behind the scenes, and the theory of what's happening with each line of code. Even with LibGdx, making simple games takes a long time and a lot of patience, and I don't believe you necessarily need to know all of the quirks of game development before you can start experimenting with it. I don't think you're necessarily tying yourself to a specific API by doing that, and a lot of game engines share the same core principles. But yeah, you definitely should not expect to invent the new Super Mario Bros. on your first day. Start simple.
 
Exactly, the simple start is important for clear vision.

The thing is that if you recommend a framework, you should recommend something more universal, for example HaxeFlixel/OpenFL, which allows you to create games for Android and iOS (as well as HTML5 and all major desktop OSes). Libgdx looks nice, but it obviously limits you to Android. It's not that I don't like Android, to me it's the best OS ever, but the market dictates its own rules.
My own choice for creating games is to use OpenFL as a platform, but no game engine, because I have noticed they always limit my creativity and add too much boilerplate junk to the code and final file size.
 
Sorry, my bad, I didn't notice LibGDX is not for android only, but for iOS and HTML5 too.
But how does it work, you write it in java and compile it to Objective-C?
 
Sorry, my bad, I didn't notice LibGDX is not for android only, but for iOS and HTML5 too.
But how does it work, you write it in java and compile it to Objective-C?

I honestly have no experience in exporting to iOS or HTML5. There must be some kind of Objective-C compiler you need to aquire for the iOS port, but I have no idea how the whole developer app store key security measure will keep you from actually testing it out on anything other than a Mac machine. The nice thing about Libgdx is that everything is centralized into a single project that the different ports then compile with using the built in references in Eclipse.

So you'll have
  • my-game
  • my-game-android
  • my-game-desktop
  • my-game-html
  • my-game-ios

Depending on what you want to port to.

EDIT: Some info about iOS porting in Libgdx
 
Seems a bit complex to me. I will stick with OpenFL for now, besides, I already successfully compiled both to Android and iPhone, as well as to Win/MasOS using OpenFL.
But oriz should consider Libgdx after he finishes his "Invaders" masterpiece, if he wants to continue to code in Java (in OpenFL you need to code in Haxe).
 
Back
Top Bottom