Creating a game: the terms and structure of code (libraries, languages, frameworks, APIs) who calls who?

Started by
1 comment, last by arka80 10 years ago

I have medium experience with C++ and Java

I am trying to write my first small-scale game just to understand the concepts behind it.

Let's say I want to develop a 2D game for mobile (Android)

I know about some concepts like to ad graphics on a PC program you would need to use SDL (which is a library or API?) I'm not even sure what that is...

I am trying to figure out how it all comes together. All the libraries and APIs and frameworks..

If someone could explain how to go about making a 2D game for Android

(Ex: you need to write a Java App, import a library for graphics, one for sound or instead you could import an API or "use a framework" <- what does that even mean?)

I'm just really confused with all the terms and how they connect to create a game that people can download on their phones... Any clarifications/links are welcomed :)

Thanks!

If I was clear enough don't hesitate to ask!

Advertisement

"Toolkit" and "Framework" say what strategy was chosen when people decided how to bundle functionality.

In toolkits ideally the tools are mostly isolated from each other. Their purpose is clear and they might be designed to work well together.

Still, the programmer has to bring them together.

In a framework programmers have (partly) done that job for you. They wrote convenient code that uses tools and brings them together in many common use cases.

There is less freedom, but good framework developers can make sure that the tools are not used in a wrong way.

Tools and Frameworks need APIs (the public application programming interface) that exposes classes and functions to users who want to use them.

Tools and a framework could be part of a software project and be isolated (not public at all). If the build process does extract them and it turns the tools into distributable packages those are the Libraries, which can contain standalone version of one tool, a bundle of tools or a framework using the tools.

They can often be downloaded as runtime or development versions. Runtime libraries are needed for distribution with your app, so that the functionality which your tool wants to use is actually available. Development versions usually come with public files (often as part of an SDK) that have some additional functionality and resources which are only needed at compile time.

What is SDL ... I'd go with: a framework (it offers convenience functionality to deal with rendering, input and resource loading etc.) which is distributed as a library and has an API that allows programmers to use it.

When you do an image search for Android you can see the architecture of Android.

You could develop in C++ and use the native layer ... but Android offers high level functionality to develop games more quickly.

Most of it is written in Java, so using Java for Android development is convenient. They did write or add several tools and turned them into a framework.

Because the Java bytecode is interpreted by the JVM (Java Virtual Machine) it is also platform independent, while C++ applications need to be recompiled for different target systems (CPU architectures) which means it can be portable but not platform independent.

With the SDK (software development kit) you can write apps that use the framework by using functionality that its API lets you use:

http://developer.android.com/guide/index.html

There are many tutorials that show how to build apps and turn them into executable packages.

http://developer.android.com/develop/index.html

http://developer.android.com/training/basics/firstapp/index.html

I think you will find many resources for the Eclipse IDE. You would download the SDK from the Eclipse marketplace and then go through step-by-step tutorials that show how to do basic things ...

But careful ... SDL is mostly used by C++ programs. You would probably not use it directly and instead use the graphics functions that the Android SDK API offers (it is another thing that some frameworks do: abstraction ... which makes sure that different implementations of similar tools can be used in a unified way).

Android will probably use SDL and/or OpenGL under the hood. But I am not sure how those things work exactly.

Given enough eyeballs, all mysteries are shallow.

MeAndVR

If you want to develop a game for android using android's standard environment (eclipse+adt bundle+java), which I suggest, take a look at the libGDX, a framework for game development.

There are lots of tutorials on how to setup everything and start coding, just search "libgdx android tutorial"

This topic is closed to new replies.

Advertisement