Jump to content


Member Since 29 Apr 2007
Offline Last Active Dec 22 2014 10:01 AM

Topics I've Started

Loading image from URL not working?

20 December 2014 - 01:37 AM

I am wondering: will image load not work for a different port number, but the same domain? E.g. I have apache running on port 80 and I am trying to access the image from the game hosted on the GM web server port 51268. 


Everything appears fine at first glance... async image loaded is called, ID is valid, status is valid, filename matches, however in game using background_index[] or draw_background() results in a black screen instead of the image.


Given the following code:

newbg = background_add("http://localhost/test/test.png", false, false);

var resId = ds_map_find_value(async_load, "id");
var status = ds_map_find_value(async_load, "status");
show_debug_message("ID: "+string(resId));
show_debug_message("Status: "+string(status));
show_debug_message("File: "+string(ds_map_find_value(async_load, "filename")));
if(newbg == resId) {
    show_debug_message("Resource ID match!");
    if(status >= 0) {
        show_debug_message("Status OK");
        background_index[0] = newbg;
    } else {
        show_debug_message("Status SAD");

It prints "1, 1, correct filename, resource match, OK"

Async connect/disconnect doesn't seem to work

18 December 2014 - 07:29 AM

Hello I am creating a client in GM and a server in another language. I am utilizing the raw socket functionality in GM. I've noticed however, that in the asynchronous event network_type_disconnect and network_type_connect don't ever seem to be called... however network_type_data works correctly receiving data from the server.


Here is the full code I have...

var t = ds_map_find_value(async_load, "type");

if(t == network_type_connect) {
    show_popup("Successful connection");

if(t == network_type_disconnect) {
    show_popup("Unable to connect to server.");

if(t == network_type_data) {
    var t_buffer = ds_map_find_value(async_load, "buffer");
    var data = buffer_read(t_buffer, buffer_string);

Now I know I successfully connect to server (since I can send and receive data). And the function network_connect_raw does return the proper value for when it is and is not able to connect to the server

if(network_connect_raw(global.sock, "localhost", 2469) < 0) {
    show_popup("Unable to connect");
} else {
    show_popup("Successful connection");

However what I really need is a way to detect if the connection to the server is lost, if the asynchronous method of doing so will not work. I can submit a ticket if this is truly a bug, but at this point I'm not sure.


Using GM 1.4.1496, testing with Windows.

Multitouch Support for Desktop?

17 September 2014 - 08:35 PM

I don't want to publish a Windows 8 application, but it doesn't appear there is any support for multitouch for regular Windows deployment. Is there any way around this or am I stuck?


This is the simple bit of code I used for testing.

for(i = 0; i < 5; i += 1) {
    if(device_mouse_check_button(i, mb_left)) {
        mx = device_mouse_x(i);
        my = device_mouse_y(i);
        draw_line(mx, my-48, mx, my+48);
        draw_line(mx-48, my, mx+48, my);
        draw_circle(mx, my, 48, true);

Anyone notice Chrome executing too fast?

22 April 2012 - 04:39 AM

Chrome 18.0.1025.162 m
GM:HTML5 1.0.218

I've noticed that Chrome seems to be executing step events at 60/second instead of 30/second. I am not sure if this is caused by GM or Chrome, but Chrome reports the FPS as 60 and the room speed at 30 where as other browsers (such as Firefox) report FPS as 30 and room speed at 30; WebGL being enabled/disabled doesn't seem to have an impact. Anyway based on the only "evidence" I have above, I am thinking perhaps Chrome is running the room speed at the FPS instead of the room_speed. :( I might do some more poking later to find solid proof for a bug report.

Plain Savior

25 July 2009 - 09:42 PM

Plain Savior
A game in 48hrs for a mini ludum dare.

Posted Image
Posted Image

[Begin rip from my site]
Plain Savior is an interesting little platform game with the usual set of deadly tiles. You are in your company's building, and suddenly decide to destroy anything and everything you can. This was a game I created in 48 hours for the mini ludum dare #10.

7 sound effects
6 levels
3 enemies (One of which is progressively created and stalks you)
4 destructible objects

* Arrow keys to move and jump
* ESC to quit
* R to restart the level (Or just die)
* Jump on stuff to destroy it
* There's a certain number of people & objects that have to be destroyed
each level, but it's not revealed. It'll make a sound effect and activate
the portal when you meet the requirements.
* All statistics are generated after each completed level.
* Being made in 48 hrs, there wasn't a lot of time to work on the AI. It's basic at best, and often fails. Still, with the way that one enemy is continuously created and somewhat follows you, you'll find some parts a challenge.
* This game can be beaten. It might take you a while, heck it even took me a while to beat the last level myself.

System requirements:
Windows 2000+
DirectX 8+
8-16mb video ram
500 mhz CPU
128mb ram

(These are estimates. May run on less)
If you want to run this from a VM, install DX first or it'll whine it can't find a DLL.

Feeling suicidal? Press escape or beat the game, then make your way to the portal on the right side for a rediculously challenging level.

Download here
Zip, 1.33mb, Vista compatible.