Blog

Day 11: Abstract Sprite

Introduction

Each game we are going to make with our engine comprises of several scenes, and scenes will be made up of sprites. So what we are going to make today is a fundamental part of our graphics framework. What Sprites usually bring to mind are pictures or small pieces of animation that are integrated into the scene. Our definition of sprite is a bit wider and encapsulates everything that you can see on the scene, even pieces of text. We will originally have a few typed of sprites as depicted in the figure below. You can think of other sprite types to add to the framework.

Sprite Types

Continue reading

Day 10: Centralized Texture Manager

Using the texture class

Drawing a texture

On day 8 we created a self-drawing texture class, but we never used it. It is now time to finally give it a try (not to mention you should now have Android Studio opened). First we need a simple image we can work with. Create a directory named drawable under the res directory of your Artenus module. Download the following image into your drawable directory:

Sample Texture Image

Continue reading

Day 9: Creating a Library Module

Today we finally start our engine’s Android library. After this day there will be a distinction between the game project we are working on and the game framework that powers it. If you are new to Android Studio, today will be specially interesting for you.

Starting a library

Projects and modules

If you are making a simple app, you will probably have a project with all the graphics, meta information, and code files that make up that app. It gets more complicated when you work on bigger solutions. Apart from your specific project, you might also need some external libraries which are not coded by you, or some additional apps to test your app. In other words you will be putting together a few individual projects to work together to achieve a bigger goal. This kind of modularity is addressed by modern IDEs. However, different IDEs handle it in different ways.

Project Structure in different IDEs

Continue reading

Day 8: The Texture Class

Based on what we learned about textures last day, we are now going to create a drawable texture object. Today the focus will be on coding. The difference between today and previous days is less of general knowledge, and more of a guide to the implementation of one of the classes in our engine. And unlike Stage, this class will be very close to the final version. Before we begin, I would like to express my best Christmas wishes for all!

Merry Christmas

Continue reading

Day 7: Textures

Up to now we can draw basic primitives. But these primitives cannot make a game if there are no pictures to complete them. Today we learn about textures and how they can help display images on our primitives.

What is a texture?

A texture is a 2D representation of the surface of an object. The object itself might be 2D or 3D. In order to understand what textures are, take a glance at the following figure.

Earth With and Without a Texture

Continue reading