Jump to content


Clarkyboy

Member Since 04 May 2007
Offline Last Active Nov 27 2011 01:26 AM

Topics I've Started

Clarky's Gm Drum Machine :d

06 January 2010 - 12:14 PM

Hi, long time since I done anything with game maker but I wanted to make this. . . so for the last 3 hours I've been working on a drum machine in game maker :whistle:

Not really much to say at the moment here's a tutorial screen pic:

Posted Image

Controls:
Left Click: Play sample
Right Click: Stop Sample
Control + Left Click: Loop Sample
Middle Button: Load Sample
Control + Middle Button: Button colour changer
Num 0-9: Same as left clicking buttons

Features:
Sample loading, Playing, Looping, Stopping.
Button colour changing
Button picture changing
Sample directory choosing (for easy sampling loading)

Things to come:
- Accurate sample looping
- Recording
- Sample set saving/loading
- Button Key binding

KNOWN BUGS!
The sample directory will bring you to the directory below the one you want.
Looping is ****ED!
Not all keys are numpad controlled.
Drum pads do not display correct sample name.


DOWNLOAD LINK

and for all you homosexuals who still use ZIP's

NOTES:
There is a hip hop drum set I stole from FL studio included in the download links below for you to play with ^_^

If anyone has some feedback, suggestions or bugs please feel free to post them! :(
Thanks.

Surface Alpha [solved] :)

18 October 2008 - 01:42 AM

Hello, I am having a bit of trouble drawing things with an alpha from a bitmap on a surface.
What I would like to do is draw a tiled sprite of a ground tile, and use a stretched gray scale background as an alpha mask.

Thanks.

PS:
Need more info just say, help me help you help me! :)

EDIT:
Code I've tried:
background_set_alpha_from_background(bck_mask_1, bck_mask_1)
draw_background_tiled(bck_tile_1, 0, 0)

draw_set_blend_mode(bm_subtract)
draw_background_stretched(bck_mask_1, 0, 0, 640, 480)
draw_set_blend_mode(bm_normal)


background_set_alpha_from_background(bck_mask_2, bck_mask_2)
draw_background_tiled(bck_tile_2, 0, 0)

draw_set_blend_mode(bm_subtract)
draw_background_stretched(bck_mask_2, 0, 0, 640, 480)
draw_set_blend_mode(bm_normal)

Vista Registry

24 September 2008 - 10:43 AM

I'm trying to get a entry in the registry but for some reason it returns an empty string or number depending on what command I use. (an error has occurred or the entry does not exist, BUT IT DOES EXIST!!!)
Is the game maker registry editing broken for vista?

I have ran as an administrator as well and it still did not work.
Could it be game maker get blocked by vista when it tries to read certain parts of the registry?

I'm sorry but I'm not able to give out the reg entry I am trying to read but if someone could answer for sure any of the previous questions that would be great.

NOTES:
I just installed vista on my machine so that I can make my games compatible for both XP and vista.
I am using game maker 7 pro.

Thank you.

Removing Comments

03 March 2008 - 09:25 AM

var str, q, d, str_length, str_copy, s;

str = argument0
str_length = string_length(str)
str_copy = str

d = 0
s = 0

for (i = 0; i < str_length; i += 1)
    {
    if (string_char_at(str, i) = "/") && (string_char_at(str, i + 1) = "/")
        {
        comment[d,0] = i
        s = 0
        while (1)
            {
            do
                {
                comment[d,1] = (i + s)
                s += 1
                if s > 9999
                    {
                    show_message("Error,type 1 comment unbroken after 9999 char's!#" + string(i) + "#" + string(s) + "#" + string(comment[d,1]))
                    show_message(str)
                    return ("PHAIL")
                    }
                }
            until (string_char_at(str, i + s) = "#")
            d += 1
            }
        }
    else if (string_char_at(str, i) = "/") && (string_char_at(str, i + 1) = "*")
        {
        comment[d,0]=i
        s = 0
        while (1)
            {
            do
                {
                comment[d,1] = (i + s)
                s += 1
                if s > 9999
                    {
                    show_message("Error,type 2 comment unbroken after 9999 char's!#"+string(i)+"#"+string(s))
                    show_message(str)
                    return ("PHAIL")
                    }
                }
            until (string_char_at(str, i+s) = "*") && (string_char_at(str, i+s+1) = "/")
            d += 1
            }
       }
    }
       
for (q = 0; q < d; q += 1)
    {
    str_copy = string_delete(str,comment[q,0],comment[q,1])
    }
return (str_copy)

ok, its sorta long but stay with me please lol.
What this does is scan through the string and looks for '/' then if it finds a '/' it then looks for a '*' or another '/' once it has found it it then says there is a comment starting at that position, then it scans through for a carriage return or a '/*' depending on which type of comment it was, then it stores that position in the array, then using a for loop it deletes those sections.
for some reason if you run this, the variable 's' is always 1 higher then the limit, which i added to stop it from going forever.
anyone notice anything wrong with this, i'm stuck!

Encrypting Data With A Key?

28 February 2008 - 10:26 AM

Yeah, just a quick question, if i wanted to save a file so it looked like gobbledygook, how would i go about it?
are there dll's made for encrypting things or do i just do like value=(value*3)
to right and value=(value/3) to read? being simple.
or is there some special way to do it?
I'm sorta completly lost so if someone could go through how people encrypt things that would be great, I'm not really looking for code examples but they could also help.

Thanks in advance.