Game Maker for Mac – Beta Key Revoked… long live the Beta Key

27 Jul, 2010

As part of our testing of Game Maker for Mac I have revoked the previous licence key – but do not despair here is a new one so you can continue testing.

Just select the “Enter Licence Key” button at the initial screen and cut and paste the following information.

Licence Key: 987bef80-5f7b-012d-e0ad-001e4f347ee6
Email Address: beta@yoyogames.com

Do not worry if the licence does not revoke immediately it will take a couple of days before everyone is notified.

If you have any problems with Game Maker for Mac (with the license process or the actual code) then please file bugs at http://gm4mac.yoyogames.com

Bugs will be fixed faster if you include a GMK that illustrates any problems you find, preferably not a game but the minimal GMK needed to illustrate the problem.

14 Comments »

Posted by Russell.Kay

PSP floating point optimisation.

22 Jul, 2010

Some time ago when we reformatted the glog, we said we would be posting some more technical stuff for your enjoyment. So I thought I’d describe some of the work I’ve been doing to speed up the PSP version of Game Maker.

As some of you may know, Game Maker uses doubles internally for all it’s numbers. This allows a very simple end-user experience as when you’re learning you don’t want to bother with knowing about integers or floating point numbers; you just want a number. And while the PC can handle these very quickly, the PSP doesn’t have hardware support for them, meaning they are processed by the CPU in software and are incredibly slow. In the early days of the PSP port, we spent a long time converting internal code to use INTs and FLOATs rather than doubles, but we still have to use doubles when dealing with GML as that’s what the end user uses. This means using library functions to convert from a DOUBLE format into a FLOAT or an INT. These are slow… really slow. In our latest profile they came out about 3rd top of the function time list, with only the kernel and audio mixing beating it. So before we change these, we have to understand the double number format.


IEEE 754 Double format

IEEE 754 Double format


So this is how doubles are stored in memory and we have to try and extract the integer part of it quicker than the library function. First, what does each part do? The sign bit simply tells us if it’s a positive or negative number, and the fraction is the actual numerical data. The interesting part is the exponent. This tells us where the decimal point goes. Now, we don’t have a decimal, we have a binary one so we have a binary point. So in normal binary %11 would give us 3. But what if there was a binary point inthe middle? (%1.1) Well this would give us 1.5 while %11.1 would give us 3.5 etc. Now this takes a little thinking to get your head around, and I’m not going to go into it too much, but suffice to say that the exponent tells us where this point goes, and if we’re casting to an INT, how much data we can ditch. Since we’re only interested in whole numbers, we can remove anything after the point. The exponent is also offset by 1023, which allows for large numbers, and small fractions meaning 1.0 is actually 1, with an exponent of 1023 (i.e. the decimal point hasn’t moved at all). Or rather… it WOULD be 1, except floating point numbers use a little trick to get more accuracy; they don’t store the leading bit!

Now, it all gets (even more) technical here, but suffice to say that when you store a number in the fraction part, you have to shift the number all the way to the left. so %000000001001001101 would actually be shifted up to %1001001101000…with enough zeros to make 52bits. This is called normalising the number. Now, I also said the FPU removes the leading bit, as can assume it’s there, so our number actually becomes %001101000..(to 52bits). Yes, this is odd… but it’s what the FPU wants, so that’s what we do.

Now,thats the basic idea… if you look at a HEX dump of a double storing 1.0, it’ll actually be 0x3ff0000000000000. This is an exponent of 1023 (0x3ff), and a fraction of 0 (as the 1 is removed). yes… very odd.

Still, with all this knowledge, we can now try and speed up the casting of DOUBLE to an INT. The first thing to do would be to write it in C so that it’s easy to follow and debug. So here we go… a simple C function to convert a DOUBLE, to an INT.

int Double2Int( double _d )
{
	uint32*	pD = (uint32*)&_d;

	uint32	s = pD[1]&0x80000000;
	int	exp = ((pD[1]>>20)&0x7ff)-1023;		// get exponent

	if( exp<0 ) return 0;				// ONLY a fraction

	int64 t0 = *((int64*)pD)&0x000fffffffffffffL;
	t0|=0x0010000000000000L;
	int shift = 52-exp;
	t0 = t0>>shift;
	if( s!=0 ) t0=-t0;
	return (int)t0;
}

We access the double as 2 integers for ease of use by taking the base address of the double, and then extract the sign. Next we grab the exponent and work out if it’s a positive exponent and therefore has an integer part, or negate exponent and is all fraction. If its negative, then we have a fraction only (like 0.001234) and casting it to an INT would return 0, so that’s what we do.

Next we get the 52bits of the fraction and OR in the leading bit (remember the FPU drops the leading bit for better accuracy). Since the exponent is the shift of the decimal point, we do a 52-exponent to get a real shift value, and after this, it’s just a matter of shifting down the bits to remove the fractional component and getting the whole number part. As we now have a whole number all that’s left to do is check the sign and negate it if need be; and that’s it!

Now while this is okay, it still uses 64bit numbers to make it simple to debug, but as we want to make it as fast as possible on the PSP, we’ll write it directly in MIPS assembler. Don’t worry if you can’t follow this, but it’s here to show the lengths we’ll go to in order to make the PSP version as fast as possible.

asm inline int32 Double2Int( double _d )
{
	// Get exponent
	sra	t0,a1,20
	andi	t0,t0,0x7ff
	addi	t0,t0,-1023		// rebase exponent
	bltz	t0, Exit		// if ONLY a fraction, then return 0 (in v0)
	or	v0,zero,zero

	// get upper 20 bits (20_32 format, 2 registers)
	lui	t1,0xf
	ori	t1,t1,0xffff
	and	v0,a1,t1		// Get rid of sign and exponent

	lui	t1,0x0010		// add in 'explicit' 1
	or	v0,v0,t1

	// Get 32bits of data - that theres ANY chance of keeping.
	sll	v0,v0,11
	srl	t1,a0,21
	or	v0,v0,t1

	ori	t2,zero,52		// 52 - exp to get shift 'right' value
	sub	t0,t2,t0
	addi	t0,t0,-21		// take off 20 bits from the lower 32bits we've killed already.
	srl	v0,v0,t0		// + 1 for 'implicit' 1 at the top.

	srl	a1,a1,31		// Get 'sign' into bit 0 (while nuking the rest of the bits)
	beq	a1, zero, Exit		// if NO sign, then return number, otherwise, we have to negate it.
	lui	t0,0x8000		// Little fudge to allow -2147483648 (cant do 0- -2147483648)
	beq	v0,t0,Exit
	nop
	jr	ra
	sub	v0,zero,v0		// negate...

Exit:
	jr	ra
	nop
}

Now this MIPS assembler version does the same as the C version, but only uses 32bit registers and has no memory accesses. We also have a little fudge in this version to allow for -2147483648. This is because you can’t have +2147483648 inside an INT (not enough bits), but you CAN have -2147483648. So we simply check for this number and force that as the return value.

This speeds up the whole process massively, to the point that the DOUBLE to INT cast no longer even appears inside the profile. Now there are several other functions to convert. DOUBLE to UNSIGNED INT, INT to DOUBLE, UNSIGNED INT to DOUBLE, FLOAT to DOUBLE and DOUBLE to FLOAT. Once we’ve converted these over we get a pretty sizable boost in performance, so it’s well worth doing.

Hope you followed all this… and enjoyed it. If you did, we’ll try to post more of this stuff down the line.

Category :

Uncategorized
67 Comments »

Posted by Mike Dailly

Instant play for Fire Fox fixed!

16 Jul, 2010

Good news everybody! Thanks to Chris Krier, instant play on Fire Fox has now been fixed!! So many Many MANY thanks to Chris for this help, we simply haven’t had the time to delve into the problem so were overjoyed to see a solution magically appear.

This solves the dreaded “install script not found – 204″ error, which Fire Fox has been throwing up. It turns out that the plug-in was fine! But the ZIP program we use to automatically create the archive was adding a new YoYo “root” folder, which meant that the file install.rdf and the folders META-INF and plugins were not in the root directory. And because of this, Fire Fox couldn’t find the install script, and so refused to install it.

So anyone who has manually copied the instant play DLL into their C:\Program Files\Mozilla Firefox\plugins or C:\Program Files (x86)\Mozilla Firefox\plugins (for x64) directory, should now be able to delete it, and then install the plug-in as normal. Lastly though, be sure to clear your internet CACHE before trying this again, as it’ll keep picking up the old one. I had the same problem, and this fix has worked great for me.

Again, many thanks to Chris for his help.

37 Comments »

Posted by Mike Dailly

YoYo Games welcomes Nal to the office!!

15 Jul, 2010

Yes, we’ve taken on our first dedicated Game Maker programmer! While Russell and Mike are very experienced in many languages, we’ve hardly touched Game Maker itself, so we’re very proud to announce NAL (aka Andrew McCluskey) has been brought in to give us some much needed expertise. So not only will Andrew be helping us understand Game Maker better, but he’ll also help developers with game optimisations and focus future Game Maker features to where they are really needed.So, welcome aboard Andrew!!

NAL joins YoYo Games.

NAL is overjoyed to join YoYo Games.

50 Comments »

Posted by Kirsty

New YoYo Office

07 Jul, 2010

We’ve just moved into our brand, spanking, new office this Monday. It’s got walls and windows and everything! We’re right bang in the centre of Dundee based in the prestigious University of Abertay, within the heart of the gaming community.

So, it seems like a good opportunity to introduce myself; I’m Kirsty and I’m now the Community Manager (double whoop)  adding to the expanding YoYo team :) I’ve been working in and around the games industry as far back as 2001 and have worked with both Mike and Russell before in different games companies. I’m absolutely jazzed to be joining such a colossal community!  I’m going to be holding the helm on the YoYo Games helpdesk here so be gentle with me ;) If you have any problems then go through the helpdesk in the usual way. Other than that, watch this space and hello everybody!


The Gang

YoYo Games gang

From L-R we have Russell, Sandy, myself and Mike, all looking rather smug in the new YoYo Games Penthouse. Here’s a few other pictures from moving day…

Category :

Uncategorized
44 Comments »

Posted by Kirsty

Game Maker community…

28 Jun, 2010

So now that the dust has settled a little on our last podcast, it’s become obvious that it’d be nice to get a little closer to you guys – not that we want to move in or anything, but that a better dialogue with what you as users and developers would help us to get a feel for what you’d like to see. And this got us wondering, are any local Game Maker users out there? Some guys in Dundee, or even Scotland who would be interested in having some face to face time so we can get feedback.

We’re still thinking about how this would work, but think every couple of months it would be nice to get a load of you together and just talk about the issues and wishes of real users. It obviously depends on how many are local to us, and who can make the (unpaid!) trip to where ever we decide to hold the meeting, but we are open to holding it in a more central location so more can attend.

It would also give us an opportunity to talk over (and perhaps show) what we’re doing and where we’re aiming to go, and see if real users agree with us. To this end we’ve added a new POLL feature (which you can see in the sidebar). So, if you could let us know where you are based, it’ll give us an idea of where we should arrange various meetings. We may well do England sometime, at which point we’ll do a similar poll and see where’s best then. But for now Scotland is by far the easiest and quickest so we’ll start with that. This of course doesn’t stop you from attending if you live somewhere else, but as you’ll have to pay your own way there and back, that’s really up to you.

53 Comments »

Posted by Mike Dailly

Game Maker for Mac – Final Release Candidate

21 Jun, 2010

We are delighted to announce that we have the latest Release Candidate for the Apple Macintosh available for download here.

This will be the final release candidate, we believe that the Game Maker code itself is final but we want to do one last testing round of the distribution mechanism and how the license system will work in the field. To this end we are releasing this version to as wide an audience as possible, to get as much feedback as possible (all bugs and feedback at http://gm4mac.yoyogames.com)

In this version we now have a “Trial” version that allows the user 10 hours of accumulated use (so you can use Game Maker for Mac as many time as you like, over as long a period you like for a total accumulated time of 10 hours) before you have to buy the Full version.

Throughout this final trial phase (which will be for 2 weeks) we will be testing the update mechanism and the YoYo Games license key system so please helps us and participate at http://gm4mac.yoyogames.com. These keys will be available from the Announcements section at http://gm4mac.yoyogames.com

The license keys will be live for the period of the trial, then deactivated once the trial is complete.

We have added

  1. Update mechanism keeping Game Maker for Mac up to date.
  2. YoYo Games proprietary distribution technology.
  3. Now packaged as a DMG
  4. Trial version with 10 hours of accumulated use to try before you buy.
  5. Removed the Beta time out period.
  6. Removed all the Beta dialogs.
  7. Fixed lots of bugs…
  8. Improved compatibility with PC and Mac

We will follow up with pricing information when we are ready to launch in a week or so (assuming there are no new, critical bugs and the distribution system works as elegantly as we expect).  Initially we will not have an Academic version (i.e. Site License) and, since this is a new product there will be no upgrade eligibility.

92 Comments »

Posted by Russell Kay

Podcast IV – now online

16 Jun, 2010

GMIndie has put Podcast IV online so if you want to hear Mike and I discussing some future ideas and direction for Game Maker then head on over to GMIndie.

Category :

Game Maker
47 Comments »

Posted by Russell Kay

GMC upgrade complete – now open

15 Jun, 2010

Apologies for the delay but the GMC forums are now back up and running.

When we put together the test site so we could look at any issues generated by the upgrade we did not have to process and rebuild the posts themselves, just the private messages – this time the upgrade wanted us to rebuild and process all the message posts – hence the delay (we have a lot of messages in there).

Anyway the upgrade is complete and the doors are open, however we have not finished the whole process yet as we still have a few setting and changes that will be made while the forums are live

  1. The skin needs to be finished, this will take time, not sure how long exactly – Mike will update as he is in charge of that.
  2. Facebook connect
  3. Twitter connect
  4. Admin settings

Again, apologies for the delay, thank you all for bearing with us.

Category :

Uncategorized
47 Comments »

Posted by Russell Kay

GMC Update happening now!

11 Jun, 2010

The GMC Forums have been under attack this week, and as our hand has been forced we have decided to upgrade the GMC forums today. Apologies to all affected but we really had no choice due to the large amount of hacker attention it was receiving.

The upgrade will take 2-3days as the Database format is completely different so it takes time to update it.

If you want to see what the new forums will look like, you can see them on our test server (although they are read only).

Apologies to all affected… blame the hackers.

Category :

Uncategorized
174 Comments »

Posted by Russell.Kay