Pages: [1]
  Print  
Author Topic: The Life of a Games Progammer (GM dev blog)  (Read 1290 times)
Offline (Unknown gender) TheExDeus
Posted on: November 15, 2010, 04:34:25 PM

Developer
Joined: Apr 2008
Posts: 1919

View Profile
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/. 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.
« Last Edit: November 16, 2010, 03:09:05 AM by HaRRiKiRi » Logged
Offline (Male) RetroX
Reply #1 Posted on: November 15, 2010, 05:43:11 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
ENIGMA has structs.

Also, double newlines are very good for helping readability.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: November 15, 2010, 09:51:54 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2949

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) TheExDeus
Reply #3 Posted on: November 16, 2010, 03:13:46 AM

Developer
Joined: Apr 2008
Posts: 1919

View Profile
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.
Logged
Offline (Male) Josh @ Dreamland
Reply #4 Posted on: November 16, 2010, 07:49:31 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2949

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Rusky
Reply #5 Posted on: November 16, 2010, 09:06:04 PM

Resident Troll
Joined: Feb 2008
Posts: 961
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
That post has some of the least useful potential modifications to GML. Congratulations on having them all.
Logged
Offline (Male) Josh @ Dreamland
Reply #6 Posted on: November 17, 2010, 12:01:12 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2949

View Profile Email
:trollspray:
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Post made November 17, 2010, 02:52:52 AM was deleted at the author's request.
Pages: [1]
  Print