Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do "you" organize your .hps files?
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#1
How do "you" organize your .hps files?

I was curious as to the different ways you all organize your .hps files. Mine are rather sporadic and scripts all over the place in order I had created them in. I've seen others use things like \\\\\Note\\\\\, \\\\\Voice\\\\\ and such, I'm sure you know what I'm saying, different categories for all their files. I'm personally looking for a setup that is simply easy to locate certain scripts and allow it to be clearer as to where things are. Does anyone have a customized template they'd like to share or suggest? I can find everything because I know where I put it but I know in the long run it would be more beneficial for me as well as others who will eventually obtain my mod.

-Grind to the Gore-
08-08-2013, 02:29 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#2
RE: How do "you" organize your .hps files?

Besides the basics of not typing your code all over the place, most of the time I personally just find using the stuff you mentioned like \\\\\Note\\\\\, \\\\\Voice\\\\\ to be enough to keep myself organized. .hps files can get quite large, but very rarely do I ever run into a situation where such a way of organizing is unfeasible.


If your .hps does get ridiculous for whatever reason though, I guess you could add a table of contents at the start, and ctrl+f to where you want easier. Like this:


/////////////////
1a Hit
2a Scary
3a OogyBoogy
////////////////////////

//////////////1a Hit
void blahblah
{
}

//////////////2a Scary
void blahblah2
{
}

///////////////////3a OogyBoogy
void blahblah3
{
}

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 08-08-2013, 03:07 AM by Kreekakon.)
08-08-2013, 03:06 AM
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#3
RE: How do "you" organize your .hps files?

(08-08-2013, 03:06 AM)Kreekakon Wrote: Besides the basics of not typing your code all over the place, most of the time I personally just find using the stuff you mentioned like \\\\\Note\\\\\, \\\\\Voice\\\\\ to be enough to keep myself organized. .hps files can get quite large, but very rarely do I ever run into a situation where such a way of organizing is unfeasible.


If your .hps does get ridiculous for whatever reason though, I guess you could add a table of contents at the start, and ctrl+f to where you want easier. Like this:


/////////////////
1a Hit
2a Scary
3a OogyBoogy
////////////////////////

//////////////1a Hit
void blahblah
{
}

//////////////2a Scary
void blahblah2
{
}

///////////////////3a OogyBoogy
void blahblah3
{
}

Ahh, a table, good idea. I was thinking maybe one for every category in the Engine scripts wiki page or something.

-Grind to the Gore-
08-08-2013, 03:20 AM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#4
RE: How do "you" organize your .hps files?

(1) When you are assigning names us a naming convention that is easily recognizable and re-usable.

(2) I prefer to order my .hps in the way the player might interact with them. So top is things they might hit into early on, bottom for later stuff.

(3) Line things up, if you have a bunch of...
AddPlayerBodyForce(   2,    2,    2, true);
AddPlayerBodyForce(   4,    4,    4, true);
AddPlayerBodyForce(   8,    8,    8, true);
AddPlayerBodyForce(  16,   16,   16, true);
AddPlayerBodyForce(  32,   32,   32, true);
AddPlayerBodyForce(  64,   64,   64, true);
AddPlayerBodyForce( 128,  128,  128, true);
AddPlayerBodyForce(2048, 2048, 2048, true);
line them up, it makes reading and figuring out minor errors so much easier!
08-08-2013, 04:45 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#5
RE: How do "you" organize your .hps files?

Well for me it's like Kreekakon's format.
Example.
NOT TO BE USED SINCE JUST EXAMPLE.
void OnStart()
{
AddUseItemCallback("", "FirstDoor", "KeyOne", "UnlockDoor", true); ///---01---///
AddEntityCollideCallback("Player", "Area", "ScriptOne", true, 1); ///---02---///
}

///---Unlock Door Script---///---01---///
void UnlockDoor(callback syntax)
{
}
///---Unlock Door Script---///---01---///
///---Entity Collide Script---///---02---///
void ScriptOne(callback syntax)
{
}
///---Entity Collide Script---///---02---///

But, each script has a code respective to their callback parameter so I know what callback calls what function.

EDIT: Err, Kreekakon not Rapture.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 08-08-2013, 04:59 AM by PutraenusAlivius.)
08-08-2013, 04:59 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#6
RE: How do "you" organize your .hps files?

@JAP: Actually I think you don't need to use that method as you can really just search the function name itself as they don't usually repeat lol

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 08-08-2013, 05:08 AM by Kreekakon.)
08-08-2013, 05:08 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: How do "you" organize your .hps files?

(08-08-2013, 05:08 AM)Kreekakon Wrote: @JAP: Actually I think you don't need to use that method as you can really just search the function name itself as they don't usually repeat lol

Yeah, but I used a lot of functions so tracking it will be hard since there could be some parameters that share the same function.

"Veni, vidi, vici."
"I came, I saw, I conquered."
08-08-2013, 05:10 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#8
RE: How do "you" organize your .hps files?

I like to group things up by events like this. Makes it easier to find things when I know what event it's associated with.

///////////////////////
// FLASHBACK
////////////////////////

stuff

///////////////////////
// CHARGE ORB
////////////////////////

stuff

//////////////////////
////////////////////////////
// Run first time starting map
void OnStart()
{
}

(This post was last modified: 08-08-2013, 06:10 AM by Damascus.)
08-08-2013, 06:09 AM
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#9
RE: How do "you" organize your .hps files?

Thanks for the input! I'll get to it tomorrow and see what happens, work in a few hours. -_- lol

-Grind to the Gore-
08-08-2013, 07:29 AM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#10
RE: How do "you" organize your .hps files?

Pretty much like the others said, but in my case, I prefer to organize myself with complicated events:

For example:

void OnStart()
{
//Bunch of things
}

///MONSTER SCARE EVENT///
void bla (bla)
{
//blablabla
}


///EVENT TIMER CHALLENGE///
void bla (bla)
{

}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
08-08-2013, 09:57 AM
Find




Users browsing this thread: 3 Guest(s)