Unity_ BMFont

Welcome to AngelCode.com. Here you'll find resources for game development and more.

The most popular visits here are to the following pages: AngelScript - a powerful and free scripting library, BMFont - a free bitmap font generator, or RefDB - a database of useful developer resources. But feel free to browse the site for more resources.

AngelCode.com is maintained by Andreas Jönsson since 2001. Please help the continued maintainance and further development of the resources here with a donation. 

欢迎访问AngelCode.com。在这里,您将找到用于游戏开发的资源。
这里最受欢迎的访问是以下页面:AngelScript-一个功能强大的免费脚本库,BMFont-一个免费的位图字体生成器,或者RefDB-一个有用的开发者资源数据库。但是你可以随意浏览网站获取更多的资源。
自2001年以来,AngelCode.com一直由Andreas Jönsson维护。请在此帮助我们继续维持和进一步发展资源。

Latest updates
2017-12-16   AngelScript 2.32.0

A new version is out. The most significant changes in this version are:

    The string factory has changed to an interface. This is done so that the application can create the string constants at compile time rather than at runtime. This also reduces memory consumption as the script engine doesn't have to keep a copy of the string constants.
    Improved support for registering types that rely on composition. Now registered class methods and properties can directly refer to member components without the need for wrappers.
    Introduction of the 'external' keyword to explicitly tell the compiler that a script entity is external and must have been compiled and shared by an existing module.
    Compiler can now determine the type of initialization lists based on the use, so when there is no ambiguity it is no longer necessary to explicitly inform the type. 

Of course this release includes a long list of other smaller changes too. Please refer to the change list for the details.

最新的更新
2017-12-16 AngelScript 2.32.0
新版本推出了。这个版本中最重要的变化是:
字符串工厂已经更改为一个接口。这样做是为了让应用程序能够在编译时创建字符串常量,而不是在运行时。这也减少了内存消耗,因为脚本引擎不需要保留字符串常量的副本。
改进对依赖于组合的注册类型的支持。现在注册的类方法和属性可以直接引用成员组件,而不需要包装器。
引入“外部”关键字,明确地告诉编译器,一个脚本实体是外部的,并且必须由一个现有的模块编译和共享。
编译器现在可以根据使用情况确定初始化列表的类型,因此当没有歧义时,不再需要显式地通知类型。
当然,这一版本也包含了一长串其他较小的变化。请参阅更改列表以了解详细信息。

2017-11-15   AngelScript WIP

I've changed how string literals are handled in the script engine. Now the compiler evaluates them at compile time and stores a pointer to the application native string type in the byte code. This avoids the need to create new instances of strings every time a script uses a string literal, which in turn translates to a performance improvement.

A new asIStringFactory interface is used to perform the compile time evaluation. This also allows the application to keep track of the used string literals, and store them in a common pool to reduce memory consumption for duplicate string literals. With the factory interface there is also no need for the script engine to keep an internal copy of the string literals thus reducing memory consumption even further.

Since the byte code now stores the pointer to the actual string object, the byte code instruction asBC_STR has no use anymore, and with that the restriction of a 2^16 maximum amount of string literals is eliminated.

Besides the above benefits I should also be able to take this a step further as the compiler now knows that the life time of a string literal is guaranteed, so it should take advantage of that and avoid making unnecessary copies when passing string literals to functions, etc. Though this improvement has not yet been implemented.

For existing scripts there shouldn't be any changes, except if the application currently registers the string factory to return a non-const string object instance. As the string literals are now evaluated at compile time it is no longer possible to have them treated as non-const, still I've made it so that the compiler can when needed implicitly convert to a non-const instance by making a local copy of the string literal at run-time.

As the changes have been quite extensive, I decided to make it possible to temporarily turn off these changes until all bugs have been rooted out. To turn off the changes look for the #define AS_NEWSTRING in angelscript.h and comment out that line. Before I make the official release (hopefully before the end of the year) I'll remove this option completely.

Let me know if you encounter any problems with this, so I can have it corrected before the official release.
New developer references

2017-08-06   Yobi3D

2017-11-15 AngelScript在制品
我改变了在脚本引擎中处理字符串文字的方式。现在编译器在编译时对它们进行评估,并在字节码中存储一个指向应用程序原生字符串类型的指针。这避免了每次脚本使用字符串文字时都需要创建新的字符串实例,而这又反过来转化为性能改进。
一个新的asIStringFactory接口用于执行编译时评估。这还允许应用程序跟踪使用的字符串字面量,并将它们存储在一个公共池中,以减少重复字符串的内存消耗。使用工厂接口,脚本引擎也不需要保留字符串的内部拷贝,这样就可以进一步减少内存消耗。
由于字节码现在将指针存储到实际的字符串对象中,所以字节码指令asbcstr已经不再使用了,并且消除了最多2 16个字符串常量的限制。
除了上述好处我也应该能够借此进一步现在编译器知道字符串文字的生活时间是保证,所以应该利用,避免不必要的副本将字符串传递给函数时,等。虽然这改进尚未实现。
对于现有的脚本,不应该有任何更改,除非应用程序当前注册了字符串工厂以返回一个非const字符串对象实例。由于字符串在编译时已被求值,因此不再可能将它们视为非const,但我还是这样做了,这样编译器可以在需要时隐式地转换为非const实例时,在运行时将字符串的本地副本复制到非const实例中。
由于这些变化非常广泛,所以我决定在所有的bug都被根除之前,暂时关闭这些更改。要关闭这些更改,可以在angelscript中寻找定义的asnewstring。然后把这条线注释掉。在正式发布之前(希望在年底之前),我将彻底删除这个选项。
如果你遇到任何问题,请告诉我,我可以在正式发布前更正。
新开发人员参考
2017-08-06 Yobi3D

2017-06-21   AngelScript WIP

I've added support for type less anonymous initialization lists. Previously anonymous initialization lists could be used in expressions, but only by explicitly informing the type of the object that should be instantiated.

Now the compiler will determine the type based on what the initialization list is used for, e.g. if it is assigned to an array the compiler will initialize an array, if it is used as argument to a function expecting a dictionary the compiler will initialize a dictionary, etc.

Of course, if the compiler cannot determine the type, either because there are multiple possible options, or the destination is variable, then it is still necessary to explicitly inform the type.

void main()
{
  doSomethingWithADictionary({{'banana', 1}, {'apple', 2}, {'orange', 3}});
}

2017-05-09   AngelScript WIP

Development on AngelScript has not stopped, despite the long delay since last release. It is true that the amount of time that I have at my disposal to work on AngelScript has decreased a lot the last few years, but I am still continuing the work, just at a slower pace.

I'm not yet ready to release the next version, but I've just completed a new feature for the upcoming release: external shared entities.

External shared entities was a natural evolution of the existing feature. Before it was already possible to take advantage of previously build shared entities to avoid declaring the full entity again, but only by taking advantage of the knowledge that the compiler didn't actually validate the difference in the declaration.

With the new keyword 'external' a script that wants to use a shared entity that is known to have been built in another module, can now do this by simply adding the keyword 'external' before the declaration and skip the actual implementation of the entity.

This not only shortens the size of the script, but also reduces the compile time slightly. The saved bytecode is also reduced since it also takes advantage of the known existence of the shared entity.

Example syntax of external shared entities:

external shared class SomeClass;
external shared interface SomeInterface;
external shared enum SomeEnum;
external shared void SomeFunction();
external shared funcdef void SomeFuncdef();

I hope you like the update. I'll provide more updates as more features are completed. I'll abstain from telling what I'll work on next though, since I have a habit of changing my priorities based on user feedback.

2017-06-21 AngelScript在制品
我增加了对类型更少的匿名初始化列表的支持。以前的匿名初始化列表可以在表达式中使用,但只能通过显式地通知应该实例化的对象的类型。
现在编译器将根据初始化列表的用途来决定类型,例如,如果它被分配给一个数组,编译器将初始化一个数组,如果它被用作一个期望字典的函数的参数,编译器将初始化一个字典等等。
当然,如果编译器不能确定类型,或者因为有多个可能的选项,或者目标是可变的,那么仍然需要显式地通知类型。
void main()
{
doSomethingWithADictionary({ {“香蕉”,1 },{‘苹果’,2 },{“橙色”,3 } });
}
2017-05-09 AngelScript在制品
尽管自上个版本发布以来,AngelScript的开发一直没有停止,但它的开发并没有停止。确实,我在过去的几年里处理天使脚本的时间已经减少了很多,但是我仍然在继续工作,只是速度变慢了。
我还没有准备好发布下一个版本,但是我刚刚为即将发布的版本完成了一个新特性:外部共享实体。
外部共享实体是现有特性的自然演进。在此之前,我们可以利用以前构建的共享实体来避免再次声明完整的实体,但这只是利用了编译器并没有实际验证声明中的差异的知识。
有了新的关键字“外部”脚本,它希望使用在另一个模块中构建的共享实体,现在只需在声明前添加关键字“外部”,并跳过实体的实际实现,就可以做到这一点。
这不仅缩短了脚本的大小,还缩短了编译时间。保存的字节码也减少了,因为它还利用了共享实体的已知存在。
外部共享实体的示例语法:
外部共享类SomeClass;
外部共享接口SomeInterface;
外部共享enum SomeEnum;
外部共享空SomeFunction();
外共享函数的虚函数();
我希望你喜欢这次更新。随着更多特性的完成,我将提供更多的更新。我将不告诉我接下来要做什么,因为我习惯于根据用户的反馈来改变我的优先级。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值