Welcome to this humble tutorial. The ultimate goal of these chapters will be to create a fully working arcade game emulation coded entirely in Blitzmax. It’s not written as a BlitzBasic → BlitzMax tutorial. My aim is to give anyone the opportunity to get a good start in learning the fantastic BlitzMax. This is the start of a fairly ambitious series of tutorials on how to write 2D games using BlitzMax. The first part is a Getting Started part where I’ll be introducing.
|Published (Last):||21 October 2006|
|PDF File Size:||9.80 Mb|
|ePub File Size:||6.40 Mb|
|Price:||Free* [*Free Regsitration Required]|
I don’t think basic has any long term usefulness. The player – our first visible object on screen Time for the complete source code of the TPlayer type.
TCoordinate or Where am I? To access the player everywhere in our main file and also in all other source code files we declare a global variable for the player.
Learning 2D Game Programming With BlitzMax
But first we define a global Global playerImg: We need to import the file TCoordinate. As you can see I added some more fields to do the FPS calculation.
Tutroial will be properly written over the next few weeks or months ;- Part 2 of the tutorial.
Blitzmsx understand C is way harder, and some say a lot more tuforial. To me it looks a lot different than basic. Those are called Functions. For example every car has a color and a number of doors. This means you do not have to release all your valuable assets like images, animation strips or sounds as separate files but you can include all of them into your game executable and distribute just that single file!
The tutorial is a work in progress right now and only contains thoughts and reminders about how to proceed. You will have to extend or subclass this type and create your own derived type of TGameElement.
The method calculates the delta time which is the amount of milliseconds between the last and current calls to GetDelta. The TCoordinate type blitzmx not very complicated. But if you want to learn how your game system ticks and also want to know about some more BlitzMax features you should read this paragraph. The second part blitzma walk you through how bliyzmax create a basic framework of a 2D game and will use a very simple space shooter as an example.
I have a question, though – blktzmax this is the right place to ask – I’m up to “part 2 – introducing a basic game framework”. If that’s the case the updateCount is incremented by one and the accumulator is decreased by the update time logicFPS.
And as a return value we retrieve the delta time that passed since the last call to ProcessTime. There are several approaches to solve this problem. It looks pretty easy, but I was wondering if it would be a better idea to start with one of the Blutzmax languages. Visually the output is pretty much identical but the advantage of the fixed rate logic approach is indeed what the name says: Later on we will extend the game and replace the turret with a moving player sprite, add keyboard control for movement, better room graphics, add several rooms, different weapons and what else I can come up with while coding this tutorial: A good way to structure your code is to use a separate file in your project for each new type.
Game Programming Tutorials | 2DGameCreators
Let’s finish the first part of the tutorial by ttutorial the TPlayer type, updating the main class ComeGetMe and have the first rotating turret on screen. So this is a great working method! Float which will contain all required calls to update and render the game objects.
The second part will walk you through how to create a framework of a 2D game and will use a very simple space shooter as an example. The Type declaration line ends with the keyword Abstract which tells BlitzMax two things:.
Let’s look at it: So let’s start with the TCoordinate class. Come Get Me part one. For example a type TPlayer will be a subclass of TGameElement and automatically inherit all fields and all methods of TGameElement without writing or copying a single line of code! It is a ‘Basic’ language that incorporates advanced 2D graphics capabilities along with sound, input, etc.
Space Invaders Didactic Emulator.