Jump to content


Member Since 20 Oct 2003
Offline Last Active Private

Topics I've Started

Error message on GM:S start up.

10 November 2015 - 01:23 PM

This has been appearing everytime I open GM:S ever since I downloaded a couple of thingies from the Marketplace.


How do I get rid of it permanently?



Help me fix this mess please - jumping code

09 November 2015 - 06:33 PM

I've been at this for a couple of days now and still can't get it right so now am pasting the latest broken code of it in an effort to reduce the amount of times I am to headbutt my desk in frustration at my own stupidity (possible connection between head impacts and increasing idiocy is noted)


This is supposed to be code for variable jumping with also one jump per press of jump (so if you're still holding down the jump button when he returns to the ground he doesn't launch off again unitl you release it then press again) and also falling if the jump has reached max height or if no ground or thru (jump through platforms) are beneath.   The one jump per press works.  The simulated button release for variable jumping works.  The actual jump not so much.


pU is the jump key (or joypad button)

yspd is the vertical movement speed added to y at the end. I would ideally like this to gradually change at the top of the jump so it slows down and then speeds up the other way beginning the fall.

ceiling checks if a solid is above

ground checks if a solid is below

thru checks if jumpthrough platform is below

jumping is state of jumping

falling is state of falling

jumpheight is the maxiimum height of the jump (48)

jumpvel is how far the jump has travelled before hitting the max

cantjump deals with not being able to activate jump until touching ground


Also I want the absolute minimum height the jump performs to be 8 pixels but I couldn't seem to even figure that bit out without breaking things even more. 

// Falling
if(!ground && !jumping && !thru) 
{yspd = 2; falling = 1;} else {falling = 0; jumpvel = 0;}
if (ground || thru) && yspd > 0 {yspd = 0;}

if pU && yspd = 0 && !ceiling && !jumping && !cantjump
    {jumpvel = 0; yspd = -2; jumping = 1; cantjump = 1; scr_sound(sfx_jump);}
// Carry out Jumping
if jumping == 1 && pU  
    {jumpvel += jumpspeed;
    if !ceiling {y -= jumpspeed;} else {jumping = 0;}}

if (!pU || jumpvel >= jumpheight)  {yspd/=2}//{jumping = 0;}

if jumping = 1 && yspd = 0 {jumping = 0; yspd = 0;}

if cantjump {if !pU && (ground || thru) {cantjump = 0;}}

if falling || jumping {y += yspd;}

How to tell if a number is odd or even?

06 November 2015 - 01:13 PM

Pretty much what the title says.  I'm sure it's something stupidly simple and my brain's just gone kaput.


02 November 2015 - 01:18 PM

Am loving this new froggy platformer Frogalot.  Which was made for a recent contest at CPCRetroDev where folks had to make new games for the 1984 Amstrad CPC 464 computer.  It's a great lil game inspired by 1987 classic Nebulus in using a graphical trick to make it seem like there's a three-dimensional rotating tower.


Lovely graphics, good music, controls smoothly and is fun and challenging and full of charm.  Sort of thing I strive to make in Game Maker and yet this runs on a computer with only 64k. 

Is odd cos I've been developing a froggy platformer too but for mobile and not even half as cool as this one.




Definitely up there with Rocket League as one of my fave games of all the year on any format. :)

Screen scaling from Tech Blog

10 October 2015 - 01:10 PM

Ok so I'm trying to use the code shown at https://yoyogames.com/tech_blog/80


This code here:

var base_w = 1024;
var base_h = 768;
var max_w = display_get_width();
var max_h = display_get_height();
var aspect = display_get_width() / display_get_height();
if (max_w < max_h)
    // portait
    var VIEW_WIDTH = min(base_w, max_w);
    var VIEW_HEIGHT = VIEW_WIDTH / aspect;
    // landscape
    var VIEW_HEIGHT = min(base_h, max_h);
    var VIEW_WIDTH = VIEW_HEIGHT * aspect;

view_wview[0] = floor(VIEW_WIDTH);
view_hview[0] = floor(VIEW_HEIGHT);
view_wport[0] = max_w;
view_hport[0] = max_h;

surface_resize(application_surface, view_wview[0], view_hview[0]);

Now I'm using base_w = 160 and base_h = 100 cos my game is low resolution scaled up.   And I've made that code into a script that is called in my overall system controller object's room start event.   But it's not working properly.   Instead I get the entire room all squished into the screen and yet somehow unusually pixelated (much more so than intended) when run on both of my Android phones (Xperia L and Xperia M3 Aqua which each have different resolutions which is why I'm trying to get this code working). 


Here is a screenshot of the M3 Aqua phone displaying the game wrongly.





I need some help with this.  My old Xperia L phone has been sold on eBay and will be sent off on Monday so I have it for just this weekend to try and make sure the game looks correct on both phones.