Skip to content

Instantly share code, notes, and snippets.

View DanBradbury's full-sized avatar

Dan Bradbury DanBradbury

View GitHub Profile

#Making Keyboard Tool Example Source

When all is done we will be making a small keyboard application that will listen to IO even when the screen is out of focus. To do this we will utilize the keyboard_check_direct method that GM provides and use the built in Windows Virtual Key Codes. I heard somewhere that use of these keycodes is not recommended but I think we use whatever we can to accomplish the task at hand.

##Where to get started Create a new project and and let's create a rough skeleton of what this thing might look like.

  1. Create an obect keyboardHUD with a Create Event, Draw Event, and Step Event
@DanBradbury
DanBradbury / gist:07bafe26a5cdfdc24c60
Last active August 29, 2015 14:04
Ep1: Hello GameMaker

What would a first episode be if not Hello World? In this episode we are going to create a simple Hello World application using GML only. For anybody who has used GML before this is going to be eyerollingling obvious but for those Drag & Drop developers this is for you.

So let's get started and create a new project helloWorld and create a new object.

obj_hello -

draw_set_color(c_red);
draw_text(x,y,"Hello World");
@DanBradbury
DanBradbury / EP1 Notes
Created July 20, 2014 20:01
Notes EP1
![](http://i.imgur.com/zhS4Oah.png)
```
CURRENT_COLOR = c_red;
COLORS[0] = c_aqua;
COLORS[1] = c_fuchsia;
COLORS[2] = c_red;
COLORS[3] = c_lime;
RATIO = 1;

CURRENT_COLOR = c_red;

COLORS[0] = c_aqua;
COLORS[1] = c_fuchsia;
COLORS[2] = c_red;
COLORS[3] = c_lime;

RATIO = 1;
@DanBradbury
DanBradbury / gist:fe3df32add2b29e8dc3e
Last active August 29, 2015 14:04
EP2 Gamemaker Components

In order to understand each component it is important to learn as much about each of them as you can. The ultimate source for knowledge in GameMaker is of course the docs.

With this episode there is no ASCIICast ###Resources

@DanBradbury
DanBradbury / ep3.md
Last active August 29, 2015 14:04
Episode 3: Sprites sprites sprites

##Basics of Working with Sprites In order to get the most out of Sprites we will undoubtedly want to add some animation and control to bring our objects to life.

In this episode we will take a look at the core of sprite control within Objects. We will also take a look at working with sprite sheets and using the built in Sprite Editor tool.

We will start with a single sprite spr_player that we control from a top down perspective through our obj_payer. Even though the player is moving around in the room we want to sync up some animation with the players input.

In order to do this we need to add the appropriate sprites for each of the movements that we will be using in our object. Luckily artists have given us the sprite sheet which is a clever way to shove all the relevant sprites we need onto 1 image.

For this project we will be using the artwork for the Liberated Pixel Cup and because we want

MOVE_SPEED = 4;
WALK_SPEED = 10;

if(keyboard_check(vk_up)){
 y -= MOVE_SPEED;
@DanBradbury
DanBradbury / ep4.md
Last active August 29, 2015 14:04
ep4 Parallax

Parallax Backgrounds

In any side scroller you are going to see the Parallax Scrolling effect. This effect was (in my mind) huge for castle crawl games like Castlevania that would utilize it on any window or open scenery to immerse the player in a subtle way. The first appearances of Parallax scrolling can be traced to 1982 in a game called Moon Patrol (video link) and has been used in many games since.

For the purposes of this episode we are going to create a simple sprite based Parallax Scrolling effect.

We will use these 2 backgrounds: Background 1 & Background 2 to create the following basic effect:

@DanBradbury
DanBradbury / ep4Notes.md
Last active August 29, 2015 14:04
ep4 notes
ac = ActiveRecord::Base.connection.execute("SELECT advertiser_id, id_from_network, name FROM advertiser_campaigns WHERE advertiser_id=1 ").first
ad = ActiveRecord::Base.connection.execute("SELECT id_from_network, name FROM advertisers WHERE id=#{ac[0]}").first
affiliate_id = 1
af = ActiveRecord::Base.connection.execute("SELECT id_from_network, name, commissions_ranking,call_volume_ranking, conversion_rate_ranking FROM affiliates WHERE id=#{affiliate_id}").first
dnpr_id = DynamicNumberPoolReferrer.last.id