Author Topic: Devlog update (2013-06-02) New script core  (Read 8922 times)

0 Members and 1 Guest are viewing this topic.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Devlog update (2013-06-02) New script core
« on: June 02, 2013, 05:36:29 pm »
Hi,

First info for those of you who aren't really into scripting: Release is, as you can see, delayed again. Not sure what stopped Shoozza this time, i swear it's not me. New deadline is set for Friday.

For the scripters, i have other, hopefuly good news.

You might've noticed that i was mentioning something about "working on scriptcore" in my previous devlogs. What i was really doing, was rewriting it pretty much from scratch. The only part that didn't change is it's engine, pascal script.
What did i change then?

  • Preprocessor. Good old preprocessor, known from enesce's version is back. you can use {$Defines}, {$Ifdefs} and {$include}. However instead of {$Include} i'd suggest to use...
  • Units. If you know pascal already, you probably know what am i talking about. If not, i'll quickly describe that units are some kind of "modules", some example tutorial here.
  • Config file. Say goodbye to -safe switch, in new scriptcore each feature that script can access is defined by it's own config file which is visible and readable for server owner and can be also constrained by global server config file. It's now you who decide what your script can do or not (for instance whenever it can access entire harddrive, use dlls and so on)
  • Precached bytecode. New script core caches the bytecode produced from your source file. It makes compilation process faster, especially if you have many scripts or your scripts are noticably big
  • Object-oriented API. That one took me longest to implement and is still incomplete. Basically, things like GetPlayerStat() were pissing me off, so i decided to change them. So now instead of GetPlayerStat(1, 'Alive') you'll do Players[1].Alive. Or Players[1].Kick(). Instead of ugly ReadIni() you'll create your own INI file handle and do things like MyIniFile.ReadInteger() or MyIniFile.WriteInteger(). It has a downside though, because some memory management is on you. So once you created ini handle, you also have to free it with MyIniFile.Free() or you'll get memory leak. I'll try to resolve that issue in the future.
    As i mentioned, it's incomplete. Entire adminport management is missing (OnAdminMessage/Connected/Disconnected) + there's no CreateBullet as that belongs to bullet management which i didn't code yet either. But, they'll all finally arrive
  • Event properites. By default, when you launch your script, only main block ("activate server") will be called, and nothing else. Wut? All events are now handled by event properties. You want AppOnIdle (now called OnClockTick btw)? You have to register for it, by doing Game.OnClockTick := @MyOnClockTickHandlerFunction. Then it'll be called untill you unregister, or script is shutdown. There are some special event properties, for instance there's one for exception handler which is called when unhandled exception happens in your code. Then it's up to you to decide whenever exception was critical enough to shutdown your script or not by returning True or False.
    Event properties were possible to make only because of Mr. Thanks man! And yes, that means i've successfully dragged him away from anticheat code :P
  • But, what about backward compatibility? First of all, old scriptcore stays. All the scripts that were written will be launched using deprecated now ScriptCore2. ScriptCore3 (cause that's the codename) can be launched in so called "Legacy mode", in which all ScriptCore2's API will be also available. So in theory, every ScriptCore2 valid script should launch in ScriptCore3 with legacy mode on. That might be not always the case though, because you might have variable name collisions (You might for instance declare Players variable, which is now reserved by scriptcore itself).
That's all about changes, if you ask about what changed in actual functionality (in API) - not much, i've tried to make it as funcional as the old one for now. I'll be constantly improving it over time. Howver since this is a rather fresh thing, there's one thing you have to remember:
In new script core i guarantee NO BACKWARD COMPATIBILITY. The API is too young to maintain it backward compatible, especially if it turns out to be buggy (i didn't test it too well due to lack of time). So if you decide to jump in and code using new API, be aware that your script might not be functional in the future if you won't maintain them. That doesn't count for ScriptCore2 scripts, as i'm now leaving ScriptCore2 in peace, there'll be no more changes there.

Documentation for all that stuff does not exist yet either, as again, i had no time to write it. I'll start doing so once i'm done with coding, and that is when finall release happen.

In case of any questions, either ask them here, or you know where to find me.
In case of bugs, our bug tracker is waiting for you.
« Last Edit: June 02, 2013, 05:56:00 pm by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Shoozza

  • Moderator
  • Veteran
  • *****
  • Posts: 1632
  • Soldat's Babysitter
    • Website
Re: Devlog update (2013-06-02) New script core
« Reply #1 on: June 02, 2013, 05:44:40 pm »
Yeah it's my fault somehow the humble indie bundle ate my time (and i only played one game so far).

Well I have just compiled the rc2. The updater setup is not ready yet (duplicate chinese translation files after install, additional ini changes need to be checked).
I'll let the beta team test the rc2 in the next few days so we don't rush a broken rc again ;)
Rules
Tools: ARSSE - SARS - SRB - chatMod

DarkCrusade

  • Guest
Re: Devlog update (2013-06-02) New script core
« Reply #2 on: June 02, 2013, 05:59:49 pm »
This. Is. Awesome.

We get units? I'd wait another month if I'd have to.

Quality over quantity!

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: Devlog update (2013-06-02) New script core
« Reply #3 on: June 02, 2013, 06:55:04 pm »
Truly awesome!
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline L[0ne]R

  • Soldat Beta Team
  • Rainbow Warrior
  • ******
  • Posts: 2079
  • need a life. looking for donors.
Re: Devlog update (2013-06-02) New script core
« Reply #4 on: June 02, 2013, 07:16:27 pm »
Yeah it's my fault somehow the humble indie bundle ate my time (and i only played one game so far).
Well guess what, there's a new weekly sale too: http://www.humblebundle.com/weekly
:P

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Devlog update (2013-06-02) New script core
« Reply #5 on: June 02, 2013, 07:42:58 pm »
There is a bright future for Soldat scripters. And also the humble indie bundle is awesome too <3

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Devlog update (2013-06-02) New script core
« Reply #6 on: June 02, 2013, 08:09:13 pm »
Is it normal to be having orgasms?
www.soldatx.com.br - The brazilian Soldat community.

Offline NightKing

  • Major(1)
  • Posts: 13
  • Boom chicka wah wah
    • NightKing Videos!
Re: Devlog update (2013-06-02) New script core
« Reply #7 on: June 02, 2013, 08:31:26 pm »
Best of luck guys, I truly enjoy the game your work to improve. :D

Offline Nedi

  • Major(1)
  • Posts: 47
Re: Devlog update (2013-06-02) New script core
« Reply #8 on: June 02, 2013, 10:46:57 pm »
Lool Nice!

Offline DutchFlame

  • Camper
  • ***
  • Posts: 363
Re: Devlog update (2013-06-02) New script core
« Reply #9 on: June 03, 2013, 10:58:14 am »
wadafaq, im not good with scripts so i guess good job

shoozza on the other hand :@ YOU ADDICTED GAMING NOOB

Offline Tehbugerz0r

  • Soldier
  • **
  • Posts: 158
Re: Devlog update (2013-06-02) New script core
« Reply #10 on: June 04, 2013, 07:42:24 pm »
Damn, looks like I'm not quitting Soldat after all, if this version ever gets released.
I'm guessing it's possible to run separate SC3 and SC2 scripts at the same time, right?

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Devlog update (2013-06-02) New script core
« Reply #11 on: June 05, 2013, 04:58:24 am »
yes, otherwise it wouldn't have much sense
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline chox

  • Major(1)
  • Posts: 43
Re: Devlog update (2013-06-02) New script core
« Reply #12 on: June 05, 2013, 03:59:27 pm »

plx fix hat

Offline Adam

  • Camper
  • ***
  • Posts: 322
  • When someone you argue with has a good point.
Re: Devlog update (2013-06-02) New script core
« Reply #13 on: June 05, 2013, 04:34:05 pm »

plx fix hat
dem pixels need dem vectoring

Arguing with your girlfriend and you don't get a response for a few minutes

Offline DutchFlame

  • Camper
  • ***
  • Posts: 363
Re: Devlog update (2013-06-02) New script core
« Reply #14 on: June 05, 2013, 04:37:38 pm »
you are able to edit the hat size right? Might be a cheator!

Offline chox

  • Major(1)
  • Posts: 43
Re: Devlog update (2013-06-02) New script core
« Reply #15 on: June 05, 2013, 04:38:42 pm »
you are able to edit the hat size right? Might be a cheator!
nope i want devs to fix it, it's missing like 1 pixel when you face left and its longer when you face right

Offline TheOne

  • Soldier
  • **
  • Posts: 208
Re: Devlog update (2013-06-02) New script core
« Reply #16 on: June 06, 2013, 07:04:27 am »
Finally we found the reason why in our gathers bravo team (which is right-side located) has a better ratio.

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: Devlog update (2013-06-02) New script core
« Reply #17 on: June 06, 2013, 10:49:46 am »
Uuuuh! Awesome changes to the scriptcore which I'm not able to enjoy ;(
Keep up for the great, people appreciate it! :)

Offline Adam

  • Camper
  • ***
  • Posts: 322
  • When someone you argue with has a good point.
Re: Devlog update (2013-06-02) New script core
« Reply #18 on: June 08, 2013, 12:27:32 pm »
lol if it takes this long to post RC then I quess the new version won't be out till another year

Arguing with your girlfriend and you don't get a response for a few minutes

Offline chox

  • Major(1)
  • Posts: 43
Re: Devlog update (2013-06-02) New script core
« Reply #19 on: June 09, 2013, 10:50:23 am »
lol if it takes this long to post RC then I quess the new version won't be out till another year
yeah.. soldat is half-dead right now (waiting few hours to get proper cw)
and
1.6.2 to 1.6.3 took 7 months
1.6.3 to 1.6.4 is 13 months already and full release seems nowhere close, this is just sad what happens here

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Devlog update (2013-06-02) New script core
« Reply #20 on: June 09, 2013, 01:54:28 pm »
As i stated before without working anticheat and auto update system next version seems kinda pointless.

Im chill like that

Offline Shoozza

  • Moderator
  • Veteran
  • *****
  • Posts: 1632
  • Soldat's Babysitter
    • Website
Re: Devlog update (2013-06-02) New script core
« Reply #21 on: June 09, 2013, 02:01:21 pm »
As i stated before without working anticheat and auto update system next version seems kinda pointless.
sure it would be great if they made it into soldat. sadly they didn't but im certain people want to see the next version even if these things are missing.
Remember we ported soldatserver to another compiler it's not really anything that will make people cry happy tears but it's a step in the right direction.


lol if it takes this long to post RC then I quess the new version won't be out till another year
yeah.. soldat is half-dead right now (waiting few hours to get proper cw)
and
1.6.2 to 1.6.3 took 7 months
1.6.3 to 1.6.4 is 13 months already and full release seems nowhere close, this is just sad what happens here
Yeah if we continue like that the next release after 1.6.4 will take 28 months :/ not good. We should do smaller releases (srsly large releases are so much pain).
Rules
Tools: ARSSE - SARS - SRB - chatMod

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Devlog update (2013-06-02) New script core
« Reply #22 on: June 09, 2013, 02:22:12 pm »
YES, shoozza, you had complete possession of reason when you said that.
www.soldatx.com.br - The brazilian Soldat community.

Offline chox

  • Major(1)
  • Posts: 43
Re: Devlog update (2013-06-02) New script core
« Reply #23 on: June 09, 2013, 04:47:24 pm »
As i stated before without working anticheat and auto update system next version seems kinda pointless.
i can't believe the shit you wrote here
i understand you'd like anticheat and autoupadte but for me as a player they're not as important as the fixes to the game itself
like fixing the eats and generally improving the game hit reg's etc is what's important to me, and anticheat seems to be huge thing to do and it's of course needed but well if it's not possible then nevermind, just concentrate on game and maybe someday cheaters will see that they're destroying game and start playing clean

Offline Adam

  • Camper
  • ***
  • Posts: 322
  • When someone you argue with has a good point.
Re: Devlog update (2013-06-02) New script core
« Reply #24 on: June 09, 2013, 05:28:05 pm »
i'd rather have a major graphic enchancement and a lot improvements then taking 3 years for antihack and autoupdater cause that's what people look at specifically when they first see the game

Arguing with your girlfriend and you don't get a response for a few minutes

Offline Dusty

  • Veteran
  • *****
  • Posts: 1015
Re: Devlog update (2013-06-02) New script core
« Reply #25 on: June 09, 2013, 05:32:18 pm »
I kind of understood the auto updater has been one of the main causes for the delays.

Well done not setting another deadline in the newest dev log cause that hasn't really worked like on the last n times.

Offline Bistoufly

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 782
Re: Devlog update (2013-06-02) New script core
« Reply #26 on: June 09, 2013, 05:49:27 pm »
As i stated before without working anticheat and auto update system next version seems kinda pointless.
There is a huge number of gameplay tweaks and bug fixes.
The new scriptcore will give new tools and means for the scripters to enhance their current scripts or develop new ones.


These are tangible improvements that we as players will enjoy in the next release.


Are you saying all this work was pointless?


Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Devlog update (2013-06-02) New script core
« Reply #27 on: June 09, 2013, 06:07:42 pm »
Hey guys, what do you say moving this discussion to the latest devlog?

All jokes apart, even if 1.6.4 would be released without the auto-update and anti-cheat, it would still be a major accomplishment. As Bistoufly said, MANY annoying bugs were fixed (I believe I saw the behind-polygon-warping bug fixed somewhere), aside from the new script core.

I just think the dev team doesn't need to be pressed more than it already is, so let's all chill a little bit and watch Breaking Bad. It's awesome!
www.soldatx.com.br - The brazilian Soldat community.

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Devlog update (2013-06-02) New script core
« Reply #28 on: June 10, 2013, 09:05:11 am »
Quote
like fixing the eats and generally improving the game hit reg's etc
this wont happen unless someone dedicates to rewrite netcode
Quote
then taking 3 years for antihack and autoupdater
It already took over 2 years... for small bugfixes, nothing game changing was introduced.
Quote
There is a huge number of gameplay tweaks and bug fixes.
I salute that but soldat will always be buggy no matter how many bugs are fixed
Quote
The new scriptcore will give new tools and means for the scripters to enhance their current scripts or develop new ones.
There are like max 300 players on publics in peak hours and they mostly play on lightly scripted servers so that doesnt make a good point. Apart from that admins on my servers ban few hackers daily and they get a ban on all of the servers I host [and others as well] so they most likely wont come back which decreases soldat player base even more, this wouldnt take place if we had proper anticheat.

« Last Edit: June 10, 2013, 09:06:51 am by Bonecrusher »

Im chill like that

DarkCrusade

  • Guest
Re: Devlog update (2013-06-02) New script core
« Reply #29 on: June 22, 2013, 06:18:18 pm »
I am trying to use the new scriptcore's features and started to write a unit that should make a lot of coding easier for me. However, I am running into the same error over and over again. Where do I have to place the unit? Too little information is given, so I am not sure.

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 338
Re: Devlog update (2013-06-02) New script core
« Reply #30 on: June 23, 2013, 05:22:43 am »
Here is a test script package (that Falcon gave me when I tested new ScriptCore features in 1.6.4 RC2 server) with my little editing.
Note that after compilation server creates precached bytecode files (*.psb & *.psd). It will skip compilation and will load bytecode from previous successful compilation. So, you need to delete those files to apply your changes in the script.

(I hope there is a way to force recompilation)

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Devlog update (2013-06-02) New script core
« Reply #31 on: June 23, 2013, 05:31:41 am »
It should be recompiling each time you change the script, there's no need to delete those files. If it doesn't, report it on bugtracker.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 338
Re: Devlog update (2013-06-02) New script core
« Reply #32 on: June 23, 2013, 06:51:38 am »
Reported: #324

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Devlog update (2013-06-02) New script core
« Reply #33 on: June 23, 2013, 04:24:56 pm »
Fixed. PM me on IRC if you'd like to test it.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Bune

  • Major(1)
  • Posts: 1
Re: Devlog update (2013-06-02) New script core
« Reply #34 on: July 01, 2013, 08:53:06 am »
As i stated before without working anticheat and auto update system next version seems kinda pointless.
i can't believe the shit you wrote here
i understand you'd like anticheat and autoupadte but for me as a player they're not as important as the fixes to the game itself
like fixing the eats and generally improving the game hit reg's etc is what's important to me, and anticheat seems to be huge thing to do and it's of course needed but well if it's not possible then nevermind, just concentrate on game and maybe someday cheaters will see that they're destroying game and start playing clean

Actually eats and hits doesn't destroying the game that much as plague of cheaters. Many players quit the game not couse of hits, they quit couse they can't stand the fact that there is no anticheat, and many noob hackers can do anything they want.

Quote
maybe someday cheaters will see that they're destroying game and start playing clean

Bitch please. 'i can't believe the shit you wrote here'

Offline DutchFlame

  • Camper
  • ***
  • Posts: 363
Re: Devlog update (2013-06-02) New script core
« Reply #35 on: July 01, 2013, 09:53:45 am »
As i stated before without working anticheat and auto update system next version seems kinda pointless.
i can't believe the shit you wrote here
i understand you'd like anticheat and autoupadte but for me as a player they're not as important as the fixes to the game itself
like fixing the eats and generally improving the game hit reg's etc is what's important to me, and anticheat seems to be huge thing to do and it's of course needed but well if it's not possible then nevermind, just concentrate on game and maybe someday cheaters will see that they're destroying game and start playing clean

Actually eats and hits doesn't destroying the game that much as plague of cheaters. Many players quit the game not couse of hits, they quit couse they can't stand the fact that there is no anticheat, and many noob hackers can do anything they want.

Quote
maybe someday cheaters will see that they're destroying game and start playing clean

Bitch please. 'i can't believe the shit you wrote here'

Soldat needs an Launcher, one which starts the game and also auto patches it.
And yes an anticheat is a must these days.
Point is the API needs to be rewritten which takes alot of time.
and yeah cheaters will not quit, because they will destroy the game that is just bullshit