Make O Lib

Learn to use DS Game Maker by Example.

Make O Lib

Postby colt05 » August 8th, 2014, 10:30 pm

Is there a way to make a library? Looked on google and got this:
:lol: :lol: :lol: :lol: and me, I was :cry: :cry: :cry: :cry:
Where's my signature?

Spoiler: show
In Pokémon X and Y, while the ultimate weapon is present in Geosenge Town, a Team Flare Grunt in front of a house in the west of the town comments "Only Team Flare's stayin' alive, stayin' alive.", referencing the Bee Gees song Stayin' Alive.
http://bulbapedia.bulbagarden.net/wiki/ ... k%C3%A9mon

Spoiler: show
Try to be insane to out sane the sane.
Or try to make games for an hour.
colt05
 
Posts: 122
Joined: July 16th, 2014, 4:39 pm
Location: In the computer

Re: Make O Lib

Postby Buck_7 » August 8th, 2014, 10:43 pm

What do you need a library for?

Just create a text file and rename the .txt to .h
User avatar
Buck_7
 
Posts: 1459
Joined: February 19th, 2011, 1:44 am

Re: Make O Lib

Postby colt05 » August 8th, 2014, 10:46 pm

And put what in the text file?
Where's my signature?

Spoiler: show
In Pokémon X and Y, while the ultimate weapon is present in Geosenge Town, a Team Flare Grunt in front of a house in the west of the town comments "Only Team Flare's stayin' alive, stayin' alive.", referencing the Bee Gees song Stayin' Alive.
http://bulbapedia.bulbagarden.net/wiki/ ... k%C3%A9mon

Spoiler: show
Try to be insane to out sane the sane.
Or try to make games for an hour.
colt05
 
Posts: 122
Joined: July 16th, 2014, 4:39 pm
Location: In the computer

Re: Make O Lib

Postby Buck_7 » August 8th, 2014, 10:49 pm

You can put defines, structs variables, functions. In DSGM 5 you are already coding in a library(called "Gameworks.h" I think. You can go to options and open compile temp and look into the include folder. There are some .h files tere). And each object is a function in itself.
Last edited by Buck_7 on August 8th, 2014, 10:50 pm, edited 1 time in total.
User avatar
Buck_7
 
Posts: 1459
Joined: February 19th, 2011, 1:44 am

Re: Make O Lib

Postby colt05 » August 8th, 2014, 10:50 pm

Do you have a list of the defines, structs, variables, and FUNCTIONS? Functions is probably my main concern.
And the .action files? What are they?
Where's my signature?

Spoiler: show
In Pokémon X and Y, while the ultimate weapon is present in Geosenge Town, a Team Flare Grunt in front of a house in the west of the town comments "Only Team Flare's stayin' alive, stayin' alive.", referencing the Bee Gees song Stayin' Alive.
http://bulbapedia.bulbagarden.net/wiki/ ... k%C3%A9mon

Spoiler: show
Try to be insane to out sane the sane.
Or try to make games for an hour.
colt05
 
Posts: 122
Joined: July 16th, 2014, 4:39 pm
Location: In the computer

Re: Make O Lib

Postby Buck_7 » August 8th, 2014, 11:06 pm

Actions are like code you drag and drop intead of typing the whole code out. It simplifies the process of coding. For example:
    Without an action for loading a background would be:

    PA_LoadBackground(screen,Layer,&Background) //This is a function. Screen, layer and Background are the arguments.

    But using an action would be like:

    Load Background Action
    Screen: TOP_SCREEN
    Layer: 2
    Background: DSGM_Background_1

    Defines - An example of this would be like:

    #Define TOP_SCREEN 1

    You may type this word in an argument like how I did with the "action" example above and it would represent the 1
Variables
    Would be like:

    Code: Select all
    int x = 1;  //"int x" is an integer and the value I gave the integer "x" is set to 1. There are many different types of variables. Research on them if you want to know more.

Structs
    Are a little more hard to explain. I reccomend you look this up on the internet also.
    DSGM uses structs for the sprites. Take a look at the (actionworks.h?) file in the include folder after opening up the compile temp. There's an option to do so.
    The struct should look something like this:
    Code: Select all
    typedef struct {
      u8 EName;
      s16 OriginalX;
      s16 OriginalY;
      s16 X;
      s16 Y;
      s8 VX;
      s8 VY;
      bool Screen;
      bool InUse;
      u8 Width;
      u8 Height;
      s8 SpriteID;
      bool SpriteChanged;
      bool HasSprite;
      u8 Frame;
    } Instance;
    Instance Instances[128];


    Notice the Instances[128]? It has all the attributes of the variables above that are enclosed inside the brackets.

    Sprites are sort of linked to this struct.
    The move sprite function looks like:
    Code: Select all
    void Set_X(u8 AppliesTo, s16 X) {
      Instances[AppliesTo].X = X;
    }


User avatar
Buck_7
 
Posts: 1459
Joined: February 19th, 2011, 1:44 am

Re: Make O Lib

Postby Nobody » August 9th, 2014, 3:25 am

colt05 wrote:Do you have a list of the defines, structs, variables, and FUNCTIONS? Functions is probably my main concern.
And the .action files? What are they?

like buck said, open the compile temp folder and you'll be able to see all the built in DSGM definitions, variables, functions, ect. Also, to add your own custom data all you have to do is create your own header file and then include it. Also, to figure out the rest of the PAlib definitions just search them up online
Feel free to ask me for help. I'm on the forum a lot.

Recent Projects:
Retro Ducks: viewtopic.php?f=13&t=3533 (latest)
The Living Dead 2: viewtopic.php?f=13&t=3483
Crafters DS (Minecraft 2D Clone!) viewtopic.php?f=13&t=3082
User avatar
Nobody
 
Posts: 2323
Joined: February 14th, 2011, 12:08 am
Location: United States of America

Re: Make O Lib

Postby colt05 » August 9th, 2014, 5:19 pm

Ok. So what are the action files?
Where's my signature?

Spoiler: show
In Pokémon X and Y, while the ultimate weapon is present in Geosenge Town, a Team Flare Grunt in front of a house in the west of the town comments "Only Team Flare's stayin' alive, stayin' alive.", referencing the Bee Gees song Stayin' Alive.
http://bulbapedia.bulbagarden.net/wiki/ ... k%C3%A9mon

Spoiler: show
Try to be insane to out sane the sane.
Or try to make games for an hour.
colt05
 
Posts: 122
Joined: July 16th, 2014, 4:39 pm
Location: In the computer

Re: Make O Lib

Postby Buck_7 » August 9th, 2014, 10:42 pm

The .action files can also be opened in notepad. Whenever you create a new action using the action editor in DSGM, it creates one of those action in the action folder. There used to be an action topic where you can download actions other people made.

By the way I should also mention that the DBAS scripts and Objects themselves are functions too.
User avatar
Buck_7
 
Posts: 1459
Joined: February 19th, 2011, 1:44 am

Re: Make O Lib

Postby Nobody » August 10th, 2014, 4:13 am

colt05 wrote:Ok. So what are the action files?

action files are the files that define what dsgm actions do and ect. DSGM actions are the drag and drop buttons in DSGM that execute code. There is a built in action editor inside DSGM so you can make your own custom actions or edit the current ones
Feel free to ask me for help. I'm on the forum a lot.

Recent Projects:
Retro Ducks: viewtopic.php?f=13&t=3533 (latest)
The Living Dead 2: viewtopic.php?f=13&t=3483
Crafters DS (Minecraft 2D Clone!) viewtopic.php?f=13&t=3082
User avatar
Nobody
 
Posts: 2323
Joined: February 14th, 2011, 12:08 am
Location: United States of America

Re: Make O Lib

Postby BLsquared » August 11th, 2014, 4:02 pm

Leave here alone for TWO DAYS and ninja'd all over the place.
Dang.
You may call me BLsquared, Commodore, or TexasBatman. Preferably BLsquared.
My avatar was made by this guy: http://christianmanga.com/smf/index.php ... bum;in=374

"Every puzzle has an answer." - Professor Layton
"In war, there is indeed no substitute for victory." - Douglas MacArthur
"Love and Peace!" - Vash the Stampede
"It's High Noon!" - McCree
Member of Memefefe's Squad
User avatar
BLsquared
 
Posts: 997
Joined: August 10th, 2011, 4:39 pm
Location: United States of America

Re: Make O Lib

Postby Buck_7 » August 11th, 2014, 5:31 pm

But we're not ninjas lol.
User avatar
Buck_7
 
Posts: 1459
Joined: February 19th, 2011, 1:44 am

Re: Make O Lib

Postby LordMayhem » August 11th, 2014, 6:21 pm

Sure you are.

And colt, not that I have any knowledge. But don't you think going to a programming learning site is a better way to start getting grasp of this. There are tons of them.

Here for example: --please don't judge the site by it's name, it's actually pretty good.
http://programming-motherfucker.com/

Hope it helps
"Just because certain phrases are used a lot and sounds cliche, does not make them any less true." ~LordMayhem (me....)
“No amount of belief makes something a fact” ~James Randi.
User avatar
LordMayhem
 
Posts: 11
Joined: July 4th, 2014, 6:37 pm
Location: Norway

Re: Make O Lib

Postby jadaradix » August 12th, 2014, 9:54 am

Buck_7, your post was great; thanks for the detailed information and guidance.

Do you have a list of the defines, structs, variables, and FUNCTIONS? Functions is probably my main concern.
And the .action files? What are they?


You are best to ask these in independent topics - they are big areas. I've closed the topic for this reason.
jadaradix
Site Admin
 
Posts: 895
Joined: December 30th, 2010, 3:23 am
Location: United Kingdom


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron