Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

AngelScript 2.27.1 is here (so soon? yes)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 Andreas Jonsson   Moderators   -  Reputation: 3239

Like
6Likes
Like

Posted 16 August 2013 - 04:51 PM

This release of AngelScript is quite small as I wanted to get started on the next big update. Still, this version has a few bug fixes, a reduced memory footprint (especially for applications with a lot of registered functions), a new 'void' expression that can be used to skip output parameters in function calls, and finally the support for anonymous parameters with default arguments.

 

Regards,

Andreas

 


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Sponsor:

#2 3DModelerMan   Members   -  Reputation: 941

Like
1Likes
Like

Posted 16 August 2013 - 05:16 PM

I'm actually really excited to hear anything about a reduced memory footprint. AngelScript is already so small and optimized that it's amazing you can squeeze any more performance out for the features we get.



#3 Andreas Jonsson   Moderators   -  Reputation: 3239

Like
0Likes
Like

Posted 16 August 2013 - 06:47 PM

biggrin.png

 

There is still room for more improvements. 


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#4 Jake Albano   Members   -  Reputation: 597

Like
0Likes
Like

Posted 17 August 2013 - 12:21 PM

The void expression sounds interesting. Would that be something like this?

bool GetInventoryItem(string name, out Item@ item)
{
    // if item exists, pass it out and return true
    // else return false
}

// ...

if (GetInventoryItem("map", void))
{
    //  we have the map but don't care about using it at the moment
}

I can't find any mention of it in the documentation, although that's probably since it's such a new feature that you haven't updated it yet.



#5 Andreas Jonsson   Moderators   -  Reputation: 3239

Like
0Likes
Like

Posted 18 August 2013 - 03:49 AM

Yes, that's how the 'void' expression would be used.

 

It is documented in the manual, but I didn't make any individual entry for this special case. You can read about it here:

 

- Function calls

- Default arguments


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#6 Jake Albano   Members   -  Reputation: 597

Like
0Likes
Like

Posted 18 August 2013 - 09:39 AM

Nice! I like it a lot. I'm stuck in C# for my current language so I've had to use Lua (ugh), but I'm looking forward to getting back to C++ and playing around with the features you've added since I've been gone.



#7 zerochen   Members   -  Reputation: 492

Like
0Likes
Like

Posted 22 August 2013 - 10:52 AM

Hi,

 

This release of AngelScript is quite small as I wanted to get started on the next big update. ...

what are the next big features / addons / updates that you will add?



#8 Andreas Jonsson   Moderators   -  Reputation: 3239

Like
2Likes
Like

Posted 22 August 2013 - 04:56 PM

I'm working on improving the initialization lists. Not only will they be more efficient, but they will also be more versatile, and should allow AngelScript to be viable option for those looking for a script language to do a lot of data configuration.

 

Currently the initialization lists are very limited as the compiler is only able to use them via the index operator. It will then invoke the index operator for each element provided in the initialization list. This works well for ordinary arrays, but when you want something a little more complex, like a dictionary or grid of data, then the current solution doesn't work well at all.

 

With the new solution that I'm working on, the application will be able to define the pattern that the initialization list for a type must follow. The compiler will do the validation of this pattern at compile time, and will then provide a single buffer with all the data to the object constructor/factory. The object constructor can then parse this buffer to initialize the entire object before leaving.

 

The way the application will register the desired pattern will be something like this:

 

RegisterObjectBehaviour("array<T>", asBEHAVE_LIST_FACTORY, "array<T> @f() = {T repeat}", ...);

RegisterObjectBehaviour("dictionary", asBEHAVE_LIST_FACTORY, "dictionary @f() = {{string ?} repeat", ...);

RegisterObjectBehaviour("grid<T>", asBEHAVE_LIST_FACTORY, "grid<T> @f() = {{T repeat(x)} repeat}", ...);

 

For the array, the list will then be a list of values of the type T, e.g. {1, 2, 3, 4}

For the dictionary the list will be an array of key-value pairs, e.g. {{"car", @Car}, {"health", 23}}  

For the grid the list will be an array of arrays, where the compiler will guarantee that each row has the same amount of elements as the first one, e.g. {{0,1,2},{3,4,5},{6,7,8}}

 

I will take a while to have this implemented, and I may not be able to finish it all for version 2.28.0. For now I'm focusing on just implementing the way the buffer is initialized and then passed to the constructor. This may seem simple but I need to make sure the exception handler is capable of handling errors in the middle of the execution and also to have the offsets within the buffer adjusted properly when saving the bytecode to keep it platform independent.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#9 Jake Albano   Members   -  Reputation: 597

Like
0Likes
Like

Posted 23 August 2013 - 05:42 PM

Is there any chance that the same syntax could eventually be used to register variadic function definitions?


Edited by Jake Albano, 23 August 2013 - 05:43 PM.


#10 Andreas Jonsson   Moderators   -  Reputation: 3239

Like
1Likes
Like

Posted 23 August 2013 - 10:02 PM

Maybe not the same syntax, but I definitely have plans to add support for variadic functions in the future.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS