Jump to content
Rocketrolf

What is faster? .hpp or sqf

Recommended Posts

While creating some configuration files i was confused if i should use .hpp files or .sqf. What is the main difference in terms of performance? Whats different with the coding style (exept the syntax)?

  • Like 1

Share this post


Link to post
Share on other sites

there is no comparison to be made. One is a format for configs (C++), the other for scripts. Good luck executing/calling a .hpp file from the editor

  • Like 1

Share this post


Link to post
Share on other sites

I dont want to execute a .hpp file. But i thought its better for the performance if you use .hpp files as configuration instead of a long list of arrays in a sqf file. Thats what i was meaning. I dont want to use .hpp as a script ;D its more what is faster in terms of set up variables etc.

Share this post


Link to post
Share on other sites

Ahh, the ol' "Let's make Tanoa Life as our first mission!" plan?

  • Like 6

Share this post


Link to post
Share on other sites

I dont want to execute a .hpp file. But i thought its better for the performance if you use .hpp files as configuration instead of a long list of arrays in a sqf file. Thats what i was meaning. I dont want to use .hpp as a script ;D its more what is faster in terms of set up variables etc.

configuration files are loaded first, in case of addons these are loaded together with the game. That said, you won't be able to use them the same way, because each is meant for a different purpose (so you won't be able to "set up variables etc" in a .hpp file)

  • Like 1

Share this post


Link to post
Share on other sites

Ahh, the ol' "Let's make Tanoa Life as our first mission!" plan?

yeap lets make a boring mod for wannabe police, so that children (the majority of players) can play this m rated game and kill people with no consequence isnt life the best also then go all over the interwebz and complain about arma and its "outdated engine" because our cheap 10 dollar a month server cant offer 120 fps with 1000 AI and mods with horrible configed scripts. LIFE FTW 

  • Like 5

Share this post


Link to post
Share on other sites

.hpp is the better choice because it's C++ and C++ is faster than SQF.

I'm not lying.

 

:868:

 

leedleleedleleedle

  • Like 4

Share this post


Link to post
Share on other sites

I dont know where the thread is going but thank you PuFu for you answer. I just was confused because i want some configfiles for my gui (like different text etc) and i didnt know which i should use for that.

Share this post


Link to post
Share on other sites

hammers are usually better than screwdrivers

But badgers are better than hammers and screwdrivers.

  • Like 1

Share this post


Link to post
Share on other sites

This thread...  amazing. I love the disdain for Life from the rest of the community. I can't really add any more useful stuff than what has already been said so I guess  :31:

Share this post


Link to post
Share on other sites

Honey badgers are the tools of the trade. I keep one beside me for good luck as I write my SQF code in Photoshop.

  • Like 1

Share this post


Link to post
Share on other sites

But badgers are better than hammers and screwdrivers.

nothing is better than hammers, especially when these are red :)

  • Like 1

Share this post


Link to post
Share on other sites

Make sure to write your SQF code in GLSL so it runs on the graphics card. As you know, graphics cards are extremely fast and achieve parallel processing with ease. Use Photoshop to compile your script into a texture which can be used by a shader program on the GPU.

Oh, and as Pufu states, you're going to need a red hammer for this.

  • Like 2

Share this post


Link to post
Share on other sites

I always write my mission scripts in assembler. So why youre complaining?

Share this post


Link to post
Share on other sites

Don't forget ; at the end of the script, or better a couple, just to be sure. Some claim it gives your script 2x speed boost.

  • Like 2

Share this post


Link to post
Share on other sites

Don't forget ; at the end of the script, or better a couple, just to be sure. Some claim it gives your script 2x speed boost.

 

some_function = {
 a = 1;
 a
};
call some_function;  //  0.01
some_otherfunction = {
  b = 1;
  b;
};
call some_otherfunction;  // 0.001
  • Like 1

Share this post


Link to post
Share on other sites

Don't forget ; at the end of the script, or better a couple, just to be sure. Some claim it gives your script 2x speed boost.

 

Wait what? I thought it makes it 2 times slower.... (Updating all my scripts I've every wrote)

Share this post


Link to post
Share on other sites

I'm so sick of seeing ignorant people bash life game modes. And PuFu, get off your high horse. Your sarcasm is not needed when someone is wanting help.

 

And to answer your question, stick to the conventional way of defining variables and use SQF.

  • Like 3

Share this post


Link to post
Share on other sites

I'm so sick of seeing ignorant people bash life game modes. And PuFu, get off your high horse. Your sarcasm is not needed when someone is wanting help.

 

And to answer your question, stick to the conventional way of defining variables and use SQF.

I don't use a horse, horses are for plebs...

In any case, i answered the question twice...

 

and yes, there is actually nothing as cancerous to arma as life game modes.

  • Like 5

Share this post


Link to post
Share on other sites

He was kind of funny. A funny thing is also that i dont developing an altis life server. Iam working on a groupmenu with gui an different text communication. But the answers are sometimes very funny so i dont care what they answer.

But i agree with you that bashing gamemodes or missions (no matter which) is a little bit ignorant.

MrCopyright Thanks for you answer btw!

  • Like 1

Share this post


Link to post
Share on other sites

Oh aren't you funny.

He was hilarious and spot on!

Anywho, SQF is your best bet for scripting. If you're feeling edgy, you can try out Noubernou's Intercept and do everything in C++...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×