An Intro to The A-Engine and How to Find Your Way Around It
Page 1 of 1
An Intro to The A-Engine and How to Find Your Way Around It
CONTENTS : -Basic Introduction -A-Engine Introduction |
-Intro & What is the A-Engine all about
Long time ago, as a kid, video games, and computers in general, have always been a very important part in my life. One thing I have always questioned my self: How do they make games? I kept fantasizing about what game I would create if I can make one. Days passed, and I stumbled upon a beat 'em up game called LF2. One thing that interested me the most was it's ability to be completely modified into another complete game. Along side that, I adopted programming as a hobby I practiced in my free time. Time passed, programming got more fun than ever, thus I was motivated to start up my very own project to help people create their games easily without facing any limitations.
Now to answer my question "How do they make games?":Games are computer software just like the internet browser you're using right now to read this. The only thing that makes a particular software be called a game is the way it works. Computer software are generally created, or more precisely written, in a programming environment; an environment where you pack a set of commands and orders into an executable which can be run later by what we are most used to; that is double clicking the exe icon XD. Writing games is not really any thing other than that; but it is not as easy as it sounds.
Suppose you want to create a game where you can control an cockroach on a screen. To do that, you will first have to create your very first black window. And then you will command the computer to "Blit" or "Render" or show your cockroach image into this black window. In order for it to move, you will have to set up a loop where you handle all the inputs, have the cockroach move according to what arrow button the user will click. The term moving, is still a hard concept for computer to understand just like that. You will have to explain to the computer how to move the cockroach image. From the definition of velocity, we know that we need to change the position of the image X distance unit per a second (in our case, the distance unit it going to be the Pixels on the screen).
Now suppose "position_x" is where your cockroach is right now. You want to move your cockroach to the right 20 pixels when the Right Arrow of your keyboard is clicked. Here is a pseudo code of how you would do it:
- Code:
if (right_button_is_held){ position_x=position_x+20}show_image_of_my_cockroach_at(position_x) //comment: this will show the new moved cockroach image on the screen
Tada! Another problem! We forgot to tell the computer to clear the first cockroach before we show another one!! It is still a long way to go for such a basic thing!! Now that's what Game Engines are for. In a game engine, the programmers have already wrapped up everything you would need into few simple commands with even a simple syntax!In an already designed engine, to have your cockroach move on the screen, you would write something as simple as:
- Code:
move_on_x= 200
Last edited by A-MAN on 24th April 2014, 7:29 pm; edited 5 times in total
-The A-Engine
-The A-Engine
The A-Engine is beat 'em up game engine that I wrote in C++ using the strongest combination of the multi-platform OpenGL API and the SDL library. The beat 'em up game genre involves usually swarm of enemies attacking you at the same time. The genre also features the ability to move side ways in the Z-axis, usage of items and weapon on the ground and wide open battle fields to play on. Here is a demonstrating screen shot:
Sounds are well supported with various formats; MP3, OGG, WAV. Various run time audio editing statements are available as well.
Videos are not supported just YET, but I am planning to allow using them for cut scenes or for games' intros.
To get started, you will have to understand what the A-Engine package contains. Inside the package folder, you will find an "A-Engine Demo.exe". This is your main game's exe which runs a demo game with a template character and a template stage.
Once everything is loaded:
-Your custom introduction screen, and the A-Engine's introduction screen shows.
-The main menu shows with all the modes and other stuff.
-Upon selecting any playable mode, you will be taken to the character selection screen. From there, the player will pick characters and a stage to play on.
Note that both the character's and the stage's data are stored in 2 ".a" files located in the "obj" folder; however, the content of both kinds of files differ. Characters, energy balls, effects or anything that can move will be referred to as an "Object". A stage or background will be referred to as "BG" or "Background" all together.
Although both Backgrounds and Objects use the same data type (".a"/".A" file format), they still differ in their structure. An Object ".a" file is made up of unites called "Frames". Each "frame" contains the data of a single sprite(1), and these frames work sequentially together to form a dynamic animation for your object; whether they form the walking animation of your character, or the moving animation of your energy ball. Other certain data elements you will set will decide if that object is a playable character, a moving energy ball or just a spark effect that function for nothing but visuals. A Background ".a" file, on the other hand, consists of "Layers". To be simple, a background such as this one:
Can be said to be made up of 3 different layers:
The sky layer (back):
The vegetation layer (middle):
The ground layer (front):
And that is exactly what you do when working with backgrounds. In addition, you are given the ability to add more dynamic background features such as wind that can actually push your characters, moving platforms, water ..etcetera.
Now after you pick your character and the stage you are going to play on from the selection screen, the exe will work load your characters from an extremely important .txt file, the "load.txt" file. This file contains the directories(2) of almost all the ".a" files you're going to use in the game. For now, you just need to understand that when you start a fight after choosing your characters and a BG from the selection screen, they're going to be loaded in the manner "load.txt" commands. It will be covered in detail later.
Now, if you understood everything above, then you are ready to proceed with more detailed and covering topics:
Please report any spelling or grammar mistakes if found. Question are welcome.
The A-Engine is beat 'em up game engine that I wrote in C++ using the strongest combination of the multi-platform OpenGL API and the SDL library. The beat 'em up game genre involves usually swarm of enemies attacking you at the same time. The genre also features the ability to move side ways in the Z-axis, usage of items and weapon on the ground and wide open battle fields to play on. Here is a demonstrating screen shot:
- Spoiler:
- ~Sprites and BG by Z-Studios
Sounds are well supported with various formats; MP3, OGG, WAV. Various run time audio editing statements are available as well.
Videos are not supported just YET, but I am planning to allow using them for cut scenes or for games' intros.
To get started, you will have to understand what the A-Engine package contains. Inside the package folder, you will find an "A-Engine Demo.exe". This is your main game's exe which runs a demo game with a template character and a template stage.
Once everything is loaded:
-Your custom introduction screen, and the A-Engine's introduction screen shows.
-The main menu shows with all the modes and other stuff.
-Upon selecting any playable mode, you will be taken to the character selection screen. From there, the player will pick characters and a stage to play on.
Note that both the character's and the stage's data are stored in 2 ".a" files located in the "obj" folder; however, the content of both kinds of files differ. Characters, energy balls, effects or anything that can move will be referred to as an "Object". A stage or background will be referred to as "BG" or "Background" all together.
Although both Backgrounds and Objects use the same data type (".a"/".A" file format), they still differ in their structure. An Object ".a" file is made up of unites called "Frames". Each "frame" contains the data of a single sprite(1), and these frames work sequentially together to form a dynamic animation for your object; whether they form the walking animation of your character, or the moving animation of your energy ball. Other certain data elements you will set will decide if that object is a playable character, a moving energy ball or just a spark effect that function for nothing but visuals. A Background ".a" file, on the other hand, consists of "Layers". To be simple, a background such as this one:
Can be said to be made up of 3 different layers:
The sky layer (back):
The vegetation layer (middle):
The ground layer (front):
And that is exactly what you do when working with backgrounds. In addition, you are given the ability to add more dynamic background features such as wind that can actually push your characters, moving platforms, water ..etcetera.
Now after you pick your character and the stage you are going to play on from the selection screen, the exe will work load your characters from an extremely important .txt file, the "load.txt" file. This file contains the directories(2) of almost all the ".a" files you're going to use in the game. For now, you just need to understand that when you start a fight after choosing your characters and a BG from the selection screen, they're going to be loaded in the manner "load.txt" commands. It will be covered in detail later.
Now, if you understood everything above, then you are ready to proceed with more detailed and covering topics:
- Spoiler:
-The "system.a" file.
-Objects,Frames and an introduction to "A-Scripting" (still in progress)
--About the content of {info}{/info}
--Loading your sprite grids
--Visual Tags
--Input_Response
--Switches
--???
-The "load.txt" file.
-Collision detection mechanics
---The "set_rect[]"s and "set_bdy[]"s
---Flags
---Rects Switches
---Bdys Switches
---Practicing what we have learnt
-Advanced Inputting with "set_combination[]"
-Energy balls and run time spawning
-Backgrounds.
---Simple BGs
---Dynamic BGs and Platforms
-Artificial Intelligence
-Advanced A-Scripting: Advanced operations
---Variables.
---Conditionals.
---Registers and "set_reg="
---Functions
---Practicing what we have learnt
-Advanced A-Scripting: Object-Oriented collision detection
---Sharing Registers and Variables
---"Remote Rects" and "remote_id="
-Scripting a user interface
---Scripting a main menu
---Scripting a character selection
---Scripting a game mode
Please report any spelling or grammar mistakes if found. Question are welcome.
Similar topics
» A-Engine icon And Lab
» A-Engine Guide for LF2 coders
» A-Engine Test Release
» An Idea for A-Engine
» [log]Since 8th August 2014: A-Engine v0.1
» A-Engine Guide for LF2 coders
» A-Engine Test Release
» An Idea for A-Engine
» [log]Since 8th August 2014: A-Engine v0.1
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|