3D game development for Android

I am a new game developer and started developing a game for Android. I followed the basic lessons and was able to draw a 3D object on the screen.
I want to draw a scene in the game as a background and other objects along with the player’s object.
Please suggest how I can do this using opengl. I do not use any of the libraries. I started opengl development from scratch.
Thanks.

+6
source share
2 answers

This is a very abstract question, although there are several ways to go if you want to create a scene in which the player can move.

In this answer, I assume that you have the knowledge and control over the processes of vertices, indexes, textures, colors, and normals when creating your model in code.

  • Use the 3D program to simulate your world. This three-dimensional model should contain information about vertices, indices, texture coordinates, colors, and normals. At runtime, your application applies the information from your model file to regular vertex arrays.

  • Generate a scene using an image (usually an image in grayscale), and let, for example, black represent the lowest point and white represent the highest point. Then use a texture that describes the landscape and texture for the landscape, and also apply colors to the landscape to get, for example, black color that describes the pits and white that describes the top of the mountains.

These methods, as a rule, I use, however, a quick Google search for "generating OpenGL terrain" or "highfield terrain OpenGL" will give you a good start. I also know that there are several models ready to use on the Internet.

+2
source

You should probably learn the Unity3D or UDK game engine rather than try it from scratch.

http://www.unity3d.com/

Download the engine and complete the tutorials. It comes with free 3d assets, so making the first game is pretty easy. Then you can deploy it for free on Flash, PC, Mac. and if they are successful, then you can pay for distribution on Android, iPhone, PS3, xBox and Wii ...

EDIT: Now they let you publish for free on Android and iPhone if you don't care about professional features. It's nice that the code I'm writing is once capable of deploying on so many platforms. That makes a lot of sense.

There is also a new version made by the Havok development guys called project anarchy.

Good luck.

0
source

Source: https://habr.com/ru/post/893051/


All Articles