Game Maker sample games/examples converted to Purebasic

Advanced game related topics
Teng
User
User
Posts: 21
Joined: Thu Aug 27, 2009 12:13 pm

Game Maker sample games/examples converted to Purebasic

Post by Teng »

Some simple 2d 3d demos / examples I've converted from Game Maker sample files made by other GM users to PureBasic to familiarize myself with PB. Source and media files only. For beginners to PureBasic like myself :lol: .

Download at :
http://host-a.net/Teng/

Game Maker List of examples :
1945 (horizontal shooter, use arrow keys to move and left ctrl key to fire)
asteroids (same control scheme as 1945)
hit the ball (click on the ball with your mouse cursor to score)
scrolling star field
rotating star field
rotating wireframe cube
rotating solid cube
mode7 effect
isometric maze
parallax scrolling
parallel scrolling
perspective scaling

Made with Purebasic 4.31 demo version x86. Not sure I should post it here since this section is for 'advanced game related topics'. If not mods can delete this post.
Last edited by Teng on Fri Sep 25, 2009 7:56 pm, edited 7 times in total.
Lost
User
User
Posts: 63
Joined: Fri Dec 19, 2008 12:24 am
Location: Tasmania

Post by Lost »

Thanks mate, I'll definately have a look at them.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

Interesting idea... I am at work and cannot Download anything... how did you convert the samples? Did you just use the graphics? Details are important! :D
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Teng
User
User
Posts: 21
Joined: Thu Aug 27, 2009 12:13 pm

Post by Teng »

Rook Zimbabwe:
Many people seem to think that Game Maker is just a drag and drop game builder like Klik 'N' Play or Multimedia Fusion. This is far from the truth, Game Maker has a built in scripting language GML, the syntax of GML is easily converted to PureBasic. I included the source Game Maker files with the Purebasic sources you can take a look at them. Just remember :
*.gm6 files should be opened in Game Maker version 6
*.gmd files should be opened in Game Maker version 5 or below

The latest extension is *.gmk which can only be opened in Game Maker 7.

Example of actual GML code for the scrolling starfield :

Code: Select all

numberOfStars = 150;
lensFactor = 50;
starSpeed = -5;
zMin = 10;
zMax = 2000;
xSpan = 10000;
ySpan = 10000;
cx = screen_width / 2;
cy = screen_height / 2;

for (i = 0; i < numberOfStars; i += 1)
{
	stars_x[i] = random(xSpan) - xSpan / 2;
	stars_y[i] = random(ySpan) - ySpan / 2;
	stars_z[i] = random(zMax - zMin) + zMin;
}

for (i = 0; i < 256; i += 1)
{
	starColor[i] = make_color(i, i, i);
}

myTextColor = make_color(50, 200, 0);
You give me too much credit... :lol:
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Post by luis »

Nice conversions, good idea to familiarize with pb !

Thanks for sharing.
Post Reply