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”

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”