This is something that I have learned the hard way. 🙂 Don’t code when you are tired, night time really isn’t the best time to code. It may be the case that you’ll have to do everything at least twice. Also when posting or publishing something, it’s better first sleep over night. Image courtesy ofContinue reading “Perhaps the Most Important Rule In Programming”
Tag Archives: programming
Scaling Bitmap Font Made With Font 2 PNG in Monkey X
This time a little tutorial on how to scale bitmap font made with Font 2 PNG in Monkey X. The code uses DrawImageRect command to draw the font. The font.dat file has two 4 byte integers for each character. First is the starting position in the PNG-file in pixels, the second is the width ofContinue reading “Scaling Bitmap Font Made With Font 2 PNG in Monkey X”
Nostalgia: Missile Attack
Again, some nostalgia. I remember, that it was late 80s, when I had a game called “Missile Attack” for Amiga. It was shareware game priced at $5. Many years ago I made just for fun my own implementation of this classic game in Blitz3D. For curiosity, if my memory serves me right, in Terminator IIContinue reading “Nostalgia: Missile Attack”
Touching an object in Monkey X
I’ll share here something that is related to a project I’m working on. How to test if the user/player has touched an object on the screen. In our example program the object is the following (you may download the object): My little code tests if object is touched while it moves around the screen. TheContinue reading “Touching an object in Monkey X”
How to capture a screenshot from BlitzMax 2D fullscreen game
It’s of course possible to capture a screenshot from BlitzMax fullscreen game with video capture programs such Fraps. It can be also done with the in the BlitzMax code of the game. Here’s my little code to do it: SuperStrict HideMouse Const JPEG_QUALITY:Int = 90 Graphics 640,480,32,1 Local screenpixmap:TPixmap = CreatePixmap(640,480,PF_RGBA8888) While Not KeyHit(KEY_ESCAPE) ClsContinue reading “How to capture a screenshot from BlitzMax 2D fullscreen game”
How to make a worm game
Let’s have some nostalgia here, we’ll take a look, how to make a simple worm game. The example codes have been coded in Monkey X Pro, but can be compiled with free Monkey X to desktop and HTML5. Perhaps someone will develop a fun worm game with Monkey X Pro to Android. 🙂 First,Continue reading “How to make a worm game”
Hex 2 Dec
In many programming languages there is built-in command or function to convert a decimal value to a hex value. But at least in BlitzMax there isn’t a command or function to convert a hex value to a dec value. In this post I present my little function to convert a hex value to dec valueContinue reading “Hex 2 Dec”
How to retrieve the %AppData% folder
AppData folder is used to store data like hiscores, config, etc. of a game (or app). The AppData folder is a special folder that’s location is related to Windows version one is using. This is why AppData folder must be retrieved with the aid of the system. In Blitz3D retrieving the AppData folder is asContinue reading “How to retrieve the %AppData% folder”