Native Android Studio Game Engine?

Started by
8 comments, last by GNPA 6 years, 1 month ago

Hi, I'd like to make a 2D game engine native to Android Studio. I'm looking for tutorials on how to do it. So far I've only found one: http://gamecodeschool.com/android/building-a-simple-game-engine/

Does anyone know any other tutorials? Also, are there certain limitations that simply can't be overcome using Android Studio, perhaps optimization limitations?

Mend and Defend

Advertisement

Is this to make a game you have in mind?  If so, make the game.  You can always extract out the common functions for the next game and make that into an engine.  If you want to distribute the engine and are asking for tutorials no one but you will likely use it.  I'm not trying to be mean here.  If it's for a demo for a possible job that is a different but following a tutorial is not the best way to go honestly.  What aspects of a 2D engine are you having issues with also?  Doubt there are tons of "This is how to write a complete 2D engine" tutorials exist honestly.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

1 hour ago, Mike2343 said:

Is this to make a game you have in mind?  If so, make the game.  You can always extract out the common functions for the next game and make that into an engine.  If you want to distribute the engine and are asking for tutorials no one but you will likely use it.  I'm not trying to be mean here.  If it's for a demo for a possible job that is a different but following a tutorial is not the best way to go honestly.  What aspects of a 2D engine are you having issues with also?  Doubt there are tons of "This is how to write a complete 2D engine" tutorials exist honestly.

 

It's a simple engine for a game I want to make. I just want to make sure I do it the best way. Core stuff for the basic game loop, like update and drawing. I know there's zero reason for anyone to use it since there's multiplatform engines out there. But I just wanted to do my whole game from scratch, start to finish solely in android studio.

Mend and Defend

2 hours ago, Jordan Hoffman said:

Hi, I'd like to make a 2D game engine native to Android Studio. I'm looking for tutorials on how to do it. So far I've only found one: http://gamecodeschool.com/android/building-a-simple-game-engine/

Does anyone know any other tutorials? Also, are there certain limitations that simply can't be overcome using Android Studio, perhaps optimization limitations?

I would just focus on making games unless you have a real reason to make the engine. Most people will just create games and recycle code from prior projects for their new games. Overtime you can put all those features into one engine package of your own, but that isn't a good way to start.

Based on your reply to @Mike2343 if you just want to make this engine for your game, you're taking the wrong approach. Just make your game as you normally would, no reason to get into engine design at this stage. Your game will have a game loop, time step, asset management, collision, ect... either way. I've programmed many engines and tool editors, it's not something you do without a good amount of experience in game development, and certainly not advised for beginners.

Programmer and 3D Artist

3 hours ago, Rutin said:

I would just focus on making games unless you have a real reason to make the engine. Most people will just create games and recycle code from prior projects for their new games. Overtime you can put all those features into one engine package of your own, but that isn't a good way to start.

Based on your reply to @Mike2343 if you just want to make this engine for your game, you're taking the wrong approach. Just make your game as you normally would, no reason to get into engine design at this stage. Your game will have a game loop, time step, asset management, collision, ect... either way. I've programmed many engines and tool editors, it's not something you do without a good amount of experience in game development, and certainly not advised for beginners.

 

Okay, so what's the definition for game engine? Because what you described (game loop, time step, asset management, collision, etc) is what I want to achieve. I thought that was a game engine, but it's not? Should I just say game library?

Mend and Defend

There are many various definitions for "Game Engine", but in this context when I'm referring to a Game Engine it's framework designed for the creation and development of games. Game Engines in this context are simply your foundation for building a game upon, they hold several functions needed to build a game, but there is no actual game attached to it. Your engine can have time steps, input, sound, graphics, physics (collision), asset management, networking, and more already pre-done. When you're making your game from scratch you still need the same things an engine would provide, but you're only programming what you NEED, not everything possible.

This is why over a period of time you'll have so much code to handle a variety of game projects, and could even merge code to make an engine as a base for all future games.

Think of game engines like Unity or Unreal, but they're not "games".

Game libraries would be something like LWJGL which are not "Engines" or "Games", but allow you to create them.

Game frameworks are collections of libraries to stream line the creation process, much like LibGDX.

When creating games you can do some of the following for example:

- Create your game with an existing game engine.

- Create your game using an game library which means you need to program everything needed from scratch: Game Loop, Time Step, Asset Managers, Collision, ect...

- Create your game using a game framework which may have a lot more helpers to do a lot of the prior work required when working with a library, such as collision.

Programmer and 3D Artist

Hello Jordan,

In some way you are right: Every game can be considered to have an "engine", actually that's basically the game code itself (without the data like graphics, levels etc.). Speaking of e.g. the " StarCraft engine" or the "Sim City" engine is a totally valid thing to do, even if those games are not based upon a generic "engine" in the stricter and more often used sense, like omnipresent Unity or Unreal.

The difference is just how de-coupled from specific game types/genres an engine is, and common understanding is that the more generic/flexible an engine is, the more it is considered a "true" engine, and also more often used of course (very game-specific engines are used for exactly one title, more generic ones sometimes for thousands).

Also, note that when using a very generic engine, you still need to write game-specific code. It's just that you save writing the generic parts, since they are already provided by the engine.

So, like Rutin said: As a beginner, just write your game first. You'll learn what you need and end up with a specialized engine which you can later generalize and re-use for your second game. Just don't over-do the generalisation right from the start. Not even total experts like John Carmack / id Software have started like this.

 

Give lib SDL a try, actually kinda curious about this myself, just been buried under work to mess with it

https://www.libsdl.org/

https://wiki.libsdl.org/Android <-- to get you started.

https://www.sitepoint.com/using-c-and-c-code-in-an-android-app-with-the-ndk/ for some additional help

SDL is a pretty commonly used graphics layer to work with, it's 2d, but would be a good way to easing into building a game on android should you want to start from scratch. Otherwise you'll be in openGL land...

-a

Hi Jordan,

No sure if you have a native android Studio engine.

I know JMonkey aside the ones priorly mentioned but the SDK is Netbeans.

Regarding algorithms I made an engine in Java during my studies https://github.com/g-amador/JOT
If you find any code useful integrate it.

Best regards

This topic is closed to new replies.

Advertisement