Jump to content


Polatrite

Member Since 11 Dec 2005
Offline Last Active Oct 17 2012 02:02 PM

Topics I've Started

(HTML5/Win) room_persistent working differently

26 February 2012 - 09:24 PM

I am an old GM user who is trying to take some of his old apps and convert them into HTML5.

I have some code so the player can hit the "E" key and bring up a spell menu to select different spells. He then can hit "E" again to go back to the game. It uses room_persistent to keep the room alive as it switches from the Game room to the Menu room and back to the Game room.

In the player Step event:


    if (keyboard_check_pressed(ord('E')))
    {
        global.mousedown = 0;
        global.autofire = 0;
        show_message(global.lastroom);
        show_message(room);
        global.lastroom = room;
        show_message(global.lastroom);
        room_set_persistent(room, true);
        room_goto(room_stats);
    }

In the menu Step event:

    if (keyboard_check_pressed(ord('E')) || keyboard_check_pressed(vk_escape))
    {
        show_message(global.lastroom);
        room_set_persistent(room, true);
        room_goto(global.lastroom);
    }

If I ran this code in Windows mode, in the HTML5 editor, it will work fine. When the show_message() boxes pop up, they will print out the room index (5) for global.lastroom, and they'll transition the player correctly.

But when I run this as an HTML5 game, it no longer works. Instead it puts a blank message (perhaps NULL) for the show_message() calls, and when it calls room_goto(global.lastroom) the player receives a black screen and nothing else works.

Does anyone have any ideas?

(HTML5/Win) room_persistent working differently

26 February 2012 - 09:20 PM

I am an old GM user who is trying to take some of his old apps and convert them into HTML5.

I have some code so the player can hit the "E" key and bring up a spell menu to select different spells. He then can hit "E" again to go back to the game. It uses room_persistent to keep the room alive as it switches from the Game room to the Menu room and back to the Game room.

In the player Step event:


    if (keyboard_check_pressed(ord('E')))
    {
        global.mousedown = 0;
        global.autofire = 0;
        show_message(global.lastroom);
        show_message(room);
        global.lastroom = room;
        show_message(global.lastroom);
        room_set_persistent(room, true);
        room_goto(room_stats);
    }

In the menu Step event:

    if (keyboard_check_pressed(ord('E')) || keyboard_check_pressed(vk_escape))
    {
        show_message(global.lastroom);
        room_set_persistent(room, true);
        room_goto(global.lastroom);
    }

If I ran this code in Windows mode, in the HTML5 editor, it will work fine. When the show_message() boxes pop up, they will print out the room index (5) for global.lastroom, and they'll transition the player correctly.

But when I run this as an HTML5 game, it no longer works. Instead it puts a blank message (perhaps NULL) for the show_message() calls, and when it calls room_goto(global.lastroom) the player receives a black screen and nothing else works.

Does anyone have any ideas?

$10 (paypal) For Weather Graphics Today!

31 December 2009 - 07:26 PM

Hey folks! It's come down to crunch time for me, and I need some graphics for a contest entry due tomorrow. I'll pay the winner $10 via Paypal (no other payment methods, sorry) if you want. It's not a ton, but the contest isn't winning me any money or anything anyways :P.

I need only 3 simple animated weather graphics for a top-down 2D RPG game. The graphics should be 32x32 and should have at least 3 frames of animation, but you don't have to have any more than that if you don't want to... after all, it's just a simple effect! For each (except the last one) these effects will just go over the entire screen at once (so it will be laid over every 32x32 tile).

Light rain
Specification: falling slightly to the left in a diagonal line, possibly with light "splashes" where it is hitting the ground (remember, top-down!). Should be very, very mild - very unobtrusive!

Heavy rain
Specification: similar to the light rain, but this is more "in your face" in that it is obtrusive, and could even obscure your vision of the game slightly by falling so hard - diagonal could be slightly sharper, so it's falling at more of an angle

Snow
Specification: simply tiny snowflakes falling, possibly back and forth slightly as snow sometimes does, should not obscure vision very much, just a nice powdery snow fall

Wind
Specification: this is probably the hardest of all of them, some kind of horizontal wisping or something to just barely show that there are heavy winds... I already have the trees waving in the wind, and other things happening, but I would like a little graphic to display on random tiles just to show that the wind is blowing extra hard. Unlike the others, I will just be showing this randomly on random tiles maybe a couple tiles per second or so.


If you want to do one, none, or do them all, be my guest! I would really love you all very much if it was possible to use these graphics by tomorrow. =D

2d Ball Physics Engine

16 July 2009 - 06:23 PM

I am designing a game that needs to make use of ball physics in a 2D side-view environment. I've seen a lot of engines in the Examples section, but haven't come across something that does what I need in a relatively simple manner. All I am looking for is something that can handle ball physics - falling, bouncing, rolling down slopes, with different terrain features such as an elasticity variable. It's also particularly important that it can handle standard objects with sprites - something that is vertice/vector based or defines objects programatically won't work for this project.

Even if it doesn't provide all of the above, I'd still like to look at any basic examples. Does anyone know of a decent engine that can suit this purpose?

Console/text Output Window?

16 April 2008 - 07:35 PM

I have been searching for the last 20 minutes or so but haven't really found something that will do what I am looking for.

I am looking for an extension or some very easy way to just output some text. Nothing fancy, I just need to be able to output lots of text, and scroll up and down. Console windows are used in traditional applications, you write your debug messages and so forth to a console window that runs along with your program (or is your program in some cases) and you review it as you interact with the GUI/etc. on the other screen. If I could find something that does the trick quickly and easily (super GML newbie here) that would be fantastic. Anyone know of any such extensions/libraries?

P.S. Windows API stuff to generate a real console window would be just fine, as long as it's easy to work. It doesn't have to be internal to GML.