Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Recruiting] GML Programmer, Spriter  (Read 2752 times)

0 Members and 1 Guest are viewing this topic.
[Recruiting] GML Programmer, Spriter
« on: July 31, 2009, 05:44:37 pm »
  • *
  • Reputation: +16/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1633
We are looking for a GML Programmer and a spriter to help with our project located here:
http://www.zfgc.com/forum/index.php?topic=33701.0

Everybody is free to work on there own sections at there own pace. As long as you have attendion for detail.

The story and dungeon design are coming along nicely, but you'll have to send me a message if you want details like that beforehand. I don't want to spoil any surprises. The focus right now is to finish the first dungeon. Don't be fooled if you think that's not very ambitous because it includes every bit of needed engine as well as the required storyline. We are looking to make something solid (play the demo and you'll probably understand what I mean). Feel like you want to help then let me know.
« Last Edit: July 31, 2009, 05:56:12 pm by Martijn dh »
Logged
Re: [Recruiting] GML Programmer, Spriter
« Reply #1 on: August 01, 2009, 07:53:02 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
What coding conventions do you use? And is your code commented?
Logged
Re: [Recruiting] GML Programmer, Spriter
« Reply #2 on: August 01, 2009, 09:02:30 am »
  • *
  • Reputation: +16/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1633
Conventions? I don't understand this word in this context. What's the dutch equivalent?

I code mostly like this:
Code: [Select]
switch ()
{
     case 0: // clarification if needed
          do something;
          break;
};

I use = instead of == but ! instead of <>. Those are not the bigger issues, as long as it work (well).
Every single variable I use (except argument) gets documented.
Resources are named script_ , sprite_ , bg_ , obj_ , parent_ etc. Little to no shortened names are used to keep the code somewhat simpler to get back into later on.
Older resources (mostly sprites) are still referenced by number but I'm gradually converting those.
I have a strong tendency to use as little objects or variables as possible.

I comment where needed but that of course is a relative term. Whatever is unclear I'll explain. I don't mind thinking up the solutions either. It's a team effort anyway.
Logged

Mamoruanime

@Mamoruanime
Re: [Recruiting] GML Programmer, Spriter
« Reply #3 on: August 01, 2009, 09:15:58 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Well, there's a distinct difference between = and ==...

Also, your coding conventions are your specific traits for your style of coding... There are universally used coding conventions, and that's what Niek is looking for :P It doesn't really help to post a small blurb of a function and generic syntax and usage. It'd be more helpful to show him one of your source files from a project. Once he sees how you code, he can better assist you.

For example, when I code, I do something along these lines (pseudocode. Language or even syntax are irrelevant, since it's just meant to show general nuances):

Code: [Select]
''''''''''''''''''''''''''''''''''''''''''''
'Mamoruanime 2009'
'src1.sourcefile      '
'Used for main loop '
''''''''''''''''''''''''''''''''''''''''''''

'Includes'''''''''''''''''''''''''
Include "file.sourcefile"       'Handles something
''''''''''''''''''''''''''''''''''''''''''''
'Main Loop''''''''''''''''''''''
while not var = true
function()                         'Handles your mom
function2(x,y,variables)       'do stuff with your character!

for char eachin list
 update()                          'update my peoples!
next


wend
'''''''''''''''''''''''''''''''''''''''''''''


EDIT: Shitty formatting >_<! I'm particular about making my tabbed comments line up
« Last Edit: August 01, 2009, 09:22:16 am by Mamoruanime »
Logged
Re: [Recruiting] GML Programmer, Spriter
« Reply #4 on: August 01, 2009, 09:53:12 am »
  • *
  • Reputation: +16/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1633
Well, there's a distinct difference between = and ==...

I know. I just don't use it because I don't see a point to change it right now. Maybe I'll do it later when there is nothing else to improve on.

I am unaware of the universally used conventions simply because I know jack about programming except for one class of VB what I tought myself after that. I have zero interest to follow suit, simply because, either. I'm also not using sourcefiles, but that mainly because I haven't learned about them yet.

I get the point though. I'll posts some recent scripting. Since I'm learning as I go along the scripting gets better and more consistent when it's more recent.

Part of the movement routines that turns vector into an x and y component.
Code: [Select]
// Input:
// argument[0] = Walking_Direction
// argument[1] = Partial_Distance

if (argument[0] = 360) {Final_xspeed = argument[1]; Final_yspeed = 0} // move right
else {if (argument[0] = 270) {Final_xspeed = 0; Final_yspeed = argument[1]} // move down
else {if (argument[0] = 180) {Final_xspeed = -1 * argument[1]; Final_yspeed = 0} // move left
else {if (argument[0] = 90) {Final_xspeed = 0; Final_yspeed = -1 * argument[1]} // move up
    
else {if (argument[0] < 90) // upper right kwadrant
{
    Final_xspeed = cos(degtorad(argument[0])) * argument[1];
    Final_yspeed = -1 * sin(degtorad(argument[0])) * argument[1];
}

else {if (argument[0] < 180) // upper left kwadrant
{
    Final_xspeed = -1 * cos(degtorad(180-argument[0])) * argument[1];
    Final_yspeed = -1 * sin(degtorad(180-argument[0])) * argument[1];
}

else {if (argument[0] < 270) // lower left kwadrant
{
    Final_xspeed = -1 * cos(degtorad(argument[0]-180)) * argument[1];
    Final_yspeed = sin(degtorad(argument[0]-180)) * argument[1];
}

else // lower right kwadrant
{
    Final_xspeed = cos(degtorad(360-argument[0])) * argument[1];
    Final_yspeed = sin(degtorad(360-argument[0])) * argument[1];
}

;};};};};};};

Creation of a cannonball
Code: [Select]
// Input:
// argument[0] = required timeline

// Creation bubble
argument[1] = instance_create(x,y,obj_Cannonball);
argument[1].depth_scale = depth_scale;
if (depth_scale = 0) {argument[1].depth = 1003} else {argument[1].depth = 3};
argument[1].sprite_index = cannonball_sprite;
argument[1].damage = damage;
argument[1].magic_damage = magic_damage;
argument[1].damage_type = damage_type;
argument[1].origin_id = id;

// Start timeline
argument[1].timeline_index = argument[0];
argument[1].timeline_position = 0;
argument[1].timeline_speed = 1;

A script for creating an item through an container (or enemy).
Code: [Select]
// With (container)
// Input:
// Argument[0] = origin ; 0 = regular (origin top left corner); 1 = enemy (origin centered)
// set argument[4] = item created
// set argument[3] = shadow instance_id
// set argument[2] = check for heart

argument[3] = 0;
switch(item_index)
{
    case 0: exit; // no item
    case 1: argument[4] = instance_create(x,y,obj_Magic_Bottle_Small); break;
    case 2: argument[4] = instance_create(x,y,obj_Magic_Bottle_Large); break;
    case 3: argument[4] = instance_create(x,y,obj_Small_Heart); argument[2] = 1; break;
    case 4: argument[4] = instance_create(x,y,obj_Bombs_Single); break;
    case 5: argument[4] = instance_create(x,y,obj_Arrows_Five); break;
    case 6: argument[4] = instance_create(x,y,obj_Rupee_Green); break;
    case 7: argument[4] = instance_create(x,y,obj_Rupee_Blue); break;
    case 8: argument[4] = instance_create(x,y,obj_Rupee_Red); break;
    case 9: argument[4] = instance_create(x,y,obj_Small_Key); break;
};

argument[4].image_speed = 4/30;
argument[4].transparancy = 0;

// Position created item based on creating object
switch (argument[0])
{
    case 0:
        argument[4].x += abs(argument[4].sprite_width-sprite_width)/2;
        argument[4].y += abs(argument[4].sprite_height-sprite_height)/3 - 2;
        break;
    case 1:
        argument[4].x -= argument[4].sprite_width/2;
        argument[4].y -= argument[4].sprite_height/2;
        break;
};

argument[4].depth_scale = depth_scale;
switch (depth_scale)
{
    case c_Lower: argument[4].depth = 1025; break;
    case c_Upper: argument[4].depth = 25; break;
};
argument[3] = instance_create(argument[4].x+argument[4].sprite_width/2,argument[4].y-1+argument[4].sprite_height,obj_Item_Shade);
argument[3].transparancy = 0;
argument[4].shade_id = argument[3].id;
switch (depth_scale)
{
    case c_Lower: argument[3].depth = 1100; break;
    case c_Upper: argument[3].depth = 100; break;
};

argument[4].active = 0;
argument[4].alarm[0] = 5;

if (argument[2] = 1)
{
    with(argument[4]) {timeline_index = tl_Dwindeling_Heart; timeline_position = 0; timeline_speed = 1;};
}
else
{
    with (argument[4]) {path_start(path_Common_Item_Appearing,3,0,false)};
};

// Item dissapears with time (except for the key)
if (item_index <> 9)
{
    argument[4].counter = 20;
    argument[4].alarm[1] = 210;
};
    
// Make it so keys are one time items (all item are one-time in case of the containers)
if (object_name(object_index) = 'obj_Enemy_Regular_Death')
{
    if (creator_id <> 0 and item_index = 9)
    {
        creator_id.item_index = -1;
        argument[4].key_index = creator_id.key_index;
    };
}
else
{    
    if (creator_id <> 0)
    {
        with (creator_id) {item_index = 0};
    };
};
« Last Edit: August 01, 2009, 09:57:33 am by Martijn dh »
Logged
Re: [Recruiting] GML Programmer, Spriter
« Reply #5 on: August 01, 2009, 03:03:02 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Conventions? I don't understand this word in this context. What's the dutch equivalent?

The dutch word is this, and than it is the second meaning:
Quote from: VanDale_Online link=http://www.vandale.nl/vandale/opzoeken/woordenboek/?zoekwoord=conventies
U hebt gezocht op het woord: conventies.
RESULTAAT
 con·ven·tie de; v -s 1 overeenkomst, verdrag 2 het geheel van als passend aanvaarde vormen, gebruiken 3 samenkomst, vergadering


I code mostly like this:
Code: [Select]
switch ()
{
     case 0: // clarification if needed
          do something;
          break;
};

I use = instead of == but ! instead of <>. Those are not the bigger issues, as long as it work (well).

This is probably my mistake. Well I wasn't looking for code, but more like how you would use GM. For example: In the CP 4Sword has all the game logic coded in the Step event, but ahmio has the game logic separated over many events, like key presses/releases and collisions.

Other things: Are you trying to get the most of the code in scripts, or is the code mostly in the objects. Do you use external libraries or just Gamemaker code.

Every single variable I use (except argument) gets documented.
Resources are named script_ , sprite_ , bg_ , obj_ , parent_ etc. Little to no shortened names are used to keep the code somewhat simpler to get back into later on.
Older resources (mostly sprites) are still referenced by number but I'm gradually converting those.
I have a strong tendency to use as little objects or variables as possible.

I comment where needed but that of course is a relative term. Whatever is unclear I'll explain. I don't mind thinking up the solutions either. It's a team effort anyway.

This is some info I am looking for. Can you clarify a bit about what you mean with "as little objects or variables as possible"?
Logged
Re: [Recruiting] GML Programmer, Spriter
« Reply #6 on: August 01, 2009, 05:48:23 pm »
  • *
  • Reputation: +16/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1633
This is probably my mistake. Well I wasn't looking for code, but more like how you would use GM. For example: In the CP 4Sword has all the game logic coded in the Step event, but ahmio has the game logic separated over many events, like key presses/releases and collisions.

I'm using multiple events per object. If I had to start from scratch maybe I might do it differently but that's not an option anymore. I do take the time to clean up when I feel it will help with the overview. For instance: keycommand are now handled through the general key press/release/hold events. There they are routed to the corresponding user_events (one per action (=left/right/run/menu/esc). So you have one event for actions, one for items etc.

I'm guessing this is what you want to hear: After the game select screen you there is one master_control_object and a character_control_object. These are the bases for the game. Beyond that you have a control object per area (which are also persistent), a control for the hud and some for the menu's (when those become needed).

The obj_Master_Control_Tile holds all the global game data. In other words, all the variables you would need the save in order to be able to restart later on. This includes a variable called Game_Mode which indicates normal play or wether menu's etc are active.

The Character_Control_Tile holds all the variables for actual gameplay. Like the variables needed in the movement engine (speed, direction, character facing etc), wether the character is hurt, falling, running, slashing or the id of the container he has above his head. Stuff like that. The most interesting variable is probably Link_Status that indicates his current activity (0=default walking/ standing, 1 = pulling/pushing, 2 = running etc)

The dungeon control tiles hold stuff like the sprites needed for the map menu. Wether rooms have already been visited, doors are still open or closed, wether cutscenes have occurred etc. I have not build these for the overworld yet because I feared I had to do them again anyway when I'd have arrived at programming the overworld. The objects for the overworld will essentially have the same function, just slightly different.

Other things: Are you trying to get the most of the code in scripts, or is the code mostly in the objects. Do you use external libraries or just Gamemaker code.

I start out by coding everything in the objects. Whatever I feel could be recycled for other objects or functions gets it's own script. When something needs temporary variables I also use scripts. So in the end most thing end up in a script one way or the other. I don't use external libraries because I simple don't know how. I should also mention that I only just got the pro edition (just a couple of weeks). I haven't really done much with it yet aside from play with transparency and use some blending. So much to do, so little time XD

This is some info I am looking for. Can you clarify a bit about what you mean with "as little objects or variables as possible"?

The variable Link_Status (mentioned earlier) is a good example. It has a value per state, since none of the states can occur together. I don't like using a separate value per state, just like I don't like using constants or global GML variables. They clutter the code and waste space (maybe just a little but it's the idea that matters). What I meant to say was that I like to be efficient with the variables I use. I'm in no way perfect, but I try to be XD
Logged
Re: [Recruiting] GML Programmer, Spriter
« Reply #7 on: August 07, 2009, 03:35:58 pm »
  • *
  • Reputation: +16/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1633
Anybody interested in joining as a spriter?
All this talk of programming while I'm really looking for a spriter over a programmer.
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.033 seconds with 53 queries.

anything