ENIGMA Forums

General fluff => General ENIGMA => Topic started by: TheExDeus on November 15, 2010, 04:34:25 pm

Title: The Life of a Games Progammer (GM dev blog)
Post by: TheExDeus on November 15, 2010, 04:34:25 pm
I don't know how many of you are aware of this blog, but I have been following it for quite a while now. Link is http://dailly.blogspot.com/ (http://dailly.blogspot.com/). Its the blog for GM's programmer that YYG hired to write runner in C++ and port GM to other platforms. There is some interesting technical details, even thou they are not that complicated (as they are meant for the layman I suppose). And there he writes about many aspect GM and in turn Enigma has either implemented, it is going to implement, or should implement.

1) First things first - Texture packing. I am aware that Josh is using some rectangle packing algorithm (or he is developing his own) for fonts. What Enigma should also do would be packing as many sprites/backgrounds inside one texture as well. Mike (that's the name of that guy) posted on how GM now uses that to launch on devices with limited GPU speed and memory. Pluses for this are quite obvious - there would be a lot less texture switching, and the amount of memory used would also decrease substantially. Enigma already uses spr2d->texbordx and spr2d->texbordy to get the point where sprite has its width and height and so the rest of the texture is not needed. With texture packing there wouldn't be that much things to add, except spr2d->texbord_left and spr2d->texbord_top or something similar. Then the drawing functions could be changed easily to accommodate that. Like setting every texture size to 512x512 (something every GPU, even mobile device should support), and then packing as many images in that 512x512 as possible.

2) Next he speaks about many aspect of GM and how it could be improved by using types (Enigma already supports thous), structs (Enigma doesn't supports them for now, or ever or I am wrong) and some other stuff. From previous posts I get that he would want to implement them, but they don't plan to do that for now (because Mark wants his tool to still be very easy). Thou he showed that it wouldn't change anything in GML (just like in Enigma), so if you don't want to use types, then don't and it automatically uses doubles, but if you really know what you are doing then you can easily declare an int.

Anyway, there are more things. I don't think that we should denigrate (is that the word?) that guy because he works in the Evil YYG. There are many things we can learn about GM future development, and in turn, it could affect our development as well.
Title: Re: The Life of a Games Progammer (GM dev blog)
Post by: RetroX on November 15, 2010, 05:43:11 pm
ENIGMA has structs.

Also, double newlines are very good for helping readability.
Title: Re: The Life of a Games Progammer (GM dev blog)
Post by: Josh @ Dreamland on November 15, 2010, 09:51:54 pm
1) Yes, I was thinking about how it could be applied, but then I realized that doing so would completely alienate a useful function: GL_WRAP based tiling. Honestly, I'm not entirely positive how to justify a check for texbordx and y (As you mentioned) against 1 just to determine if tiling is possible... I've been giving it some thought, but I'm not yet confident enough to just go through with it.

2) All of the wet dreams he mentioned for GM are already implemented in ENIGMA. I'm presently working to allow correct member access in templated structures. Regular (and multiple-inherited) structures work fine in ENIGMA in all contexts.

Code: [Select]
RECT a; a.left = instance_nearest(x,y,0); a.left.speed = 5;
Honestly, the hardest part about implementing that has been trying to get Ism to highlight them. As you can plainly see, she has access to the list.


And no, we should not denigrate Dailly just because he works for Yoyo. He's the most intelligent person they have on staff. I can't afford to pay people like him or I'd find one for us.
Title: Re: The Life of a Games Progammer (GM dev blog)
Post by: TheExDeus on November 16, 2010, 03:13:46 am
Ok. I knew that Sturcts could be possible, but as I never used them I didn't know.

Quote
1) Yes, I was thinking about how it could be applied, but then I realized that doing so would completely alienate a useful function: GL_WRAP based tiling. Honestly, I'm not entirely positive how to justify a check for texbordx and y (As you mentioned) against 1 just to determine if tiling is possible... I've been giving it some thought, but I'm not yet confident enough to just go through with it.
And where exactly we use GL_WRAP? That worked only with power of two textures anyways, and that's the reason why our tiling functions use for loops and quads. The pluses for this I think are many. In Mikes example they could reduce texture size from 28 512x512 to 17 512x512. For bigger games that would be a much larger gain. If we want to launch Enigma games on mobile devices, then this, sadly, is a must.
Title: Re: The Life of a Games Progammer (GM dev blog)
Post by: Josh @ Dreamland on November 16, 2010, 07:49:31 am
Yes, I'm aware of that, but the question is of how many ifs we want to be executed each run. Mind you we need to know not only how much area we can fit, but how large our textures can be. There -is- a cutoff for that on mobile devices, for which I can query, but that means a further increase on load time for something that should be done at compile time. It'd probably be frugal to add an option for that and offer our "best guess" as a default.
Title: Re: The Life of a Games Progammer (GM dev blog)
Post by: Rusky on November 16, 2010, 09:06:04 pm
That post has some of the least useful potential modifications to GML. Congratulations on having them all.
Title: Re: The Life of a Games Progammer (GM dev blog)
Post by: Josh @ Dreamland on November 17, 2010, 12:01:12 am
:trollspray:
Title: Re: The Life of a Games Progammer (GM dev blog)
Post by: Fede-lasse on November 17, 2010, 02:52:52 am
TROLL WINS!

FLAWLESS VICTORY