NOGDUS
December 09, 2018, 02:34:27 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Blogs Help Search Tags Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Allegro Starter Kit  (Read 3302 times)
0 Members and 1 Guest are viewing this topic.
Richard Marks
202192397
Administrator
Member
*

Respect: 3425
Offline Offline

Posts: 1027


happy


« on: March 25, 2010, 04:53:27 PM »

Allegro Starter Kit

Version 9.0 of my project templates, gets itself a new name. Grin

Behold, the A.S.K. (Ay-ess-kay) - a few hundred lines to make starting an Allegro based project easier and faster.
You only need to concern yourself with 4 functions in order to get rolling.

I'll post some new tutorials soon that utilize this new project template (I chose starter kit for the new system, since I plan to be expanding on this every now and then, and as I do, it truly will become a starter kit - practically plug in the features you want and make your game.) Cheesy

Anyway, the A.S.K. is comprised of 6 files:
  • AllegroStarterKit.h - the kit's current code base header (warning: don't mess with it unless you know what you are doing - doing so can cause problems needlessly. You can use the A.S.K. without modifying this file)
  • AllegroStarterKit.cpp - the kit's current code base (warning: don't mess with it unless you know what you are doing - doing so can cause problems needlessly. You can use the A.S.K. without modifying this file)
  • PrimaryWindow.h - the header file in which you will tie your game into the kit
  • PrimaryWindow.cpp - the source file in which you will tie your game into the kit
  • main.cpp - program entry point
  • startup.cfg - program startup configuration file

You can download the files in a .zip file by clicking here.

You should treat the AllegroStarterKit.* files as a black-box, where you just use it, and don't mess with the internals.
At least, until you are versed in Allegro enough to drop A.S.K. and implement your own system. Cool

The startup.cfg file currently is somewhat strict in its format.
I just wanted something that worked, and not really bothered with making it very user friendly.
The format is simple, and is plain-text so you can edit the file in Notepad or whathaveyou.

The startup.cfg file consists of (at the time of this writing) three lines as follows:
Code:
Geometry=800x600@24
FullScreen=false
Caption=Allegro Starter Kit -- Richard Marks <ccpsceo@gmail.com>

The Geometry parameter can be any valid screen resolution or window size.
The @ part is the bit-depth of the video mode, so @24 means 24 bits per pixel.
You do need the lowercase x between the width and height of the desired video mode.

The FullScreen parameter can be true or false - if true, the program will run in full screen mode if possible (if not, it currently will lock up; sorry)

The Caption parameter will set the window caption text to whatever is on that line after the equals sign.

OK, thats all the explanation for now.
Let me know what you think, and if you have issues, etc.. lol

Logged

Tags: ask code  Allegro project template starter kit c++ 
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!