• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

WitchLord

AngelScript 1.6.1b released

12 posts in this topic

Finally managed to release the next version of AngelScript. This is the list of changes made since version 1.6.0:
  • bug fix: There was a memory leak in the tokenizer (thanks Philip Love)
  • bug fix: An exception occured when compiling method calls with objects as parameters (thanks Bartosz "Hans" Czuba)
  • More code cleaned up
  • BCONSTR and BDESTR are no longer used, instead BC_CALL is used
  • BCONSTR, BDESTR, STRDEL, STRCPY, STRMOV, and STRWRT has been removed
  • bug fix: break, continue, and return sometimes caused GenerateExceptionHandler() to fail since objects were destroyed more than once
  • Added support for the for-loop (thanks Erik J Baran)
  • Return values are now returned in a special register instead of on the stack
  • Added bytecodes SRET4, SRET8, RRET4, RRET8 for managing the return register
  • Added the calling convention asCALL_CDECL_OBJLAST for object methods. This calls the method as a normal C function with the object reference as the last parameter
  • The asMETHOD and asFUNCTION types are now defined macros instead
  • Removed the byte codes BCOPY, CALL is used instead
  • Type behaviours must be registered as either asCALL_THISCALL or asCDECL_OBJLAST
  • Pointers can now be compared with other pointers of the same type and level, or with 0 for null pointer tests
  • It is now possible to register overloaded operators for all dual operators, except assignment operators
  • Removed the byte codes STRCAT and STRCMP
  • bstr is now handled with operator overloads
  • bug fix: booleans are now 1 byte large, just as for C++ (thanks Josh "nihlist" Passenger for spotting the bug).
  • Cleaned up the code that compiles overloaded operators and function calls
  • Changed all the JMP instructions to use a 4 byte offset
  • Function overloading for registered functions and object methods is now supported
  • bug fix: When converting a constant to another type the value would become 0
I'll be updating the resources on the AngelScript page the next couple of days. Any questions, suggestions, or bug reports on version 1.6.1 may be posted here. Or directly to my e-mail. For the next version I've decided to include evaluation of simple lines of script without compilation. This has been requested by a couple of people as it would be extremely useful in for example quake style consoles. I'll also improve the ExecuteStep() function to support various types, like step into, step over, and step out of. Regards, Andreas __________________________________________________________ www.AngelCode.com - game development and more... AngelScript - free scripting library [edited by - WitchLord on March 23, 2004 1:41:23 PM] [edited by - WitchLord on March 30, 2004 7:59:30 PM]
0

Share this post


Link to post
Share on other sites
i''ve tried to compile angelscript with mingw using the DevCPP makefile.
He builds the Dll with no error, but when i link the libangelscript.a the linker tells me that there is an undefined reference to CreateScriptEngine ...

0

Share this post


Link to post
Share on other sites
I was told that DevC++/MinGW exports the functions without the prefixed underscore, i.e where MSVC exports CreateScriptEngine as "_CreateScriptEngine@4" DevC++/MinGW exports it as "CreateScriptEngine@4". It could be that this is why you get an undefined reference.



__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library
0

Share this post


Link to post
Share on other sites
HEEEEEEEEEEELLLLLLLPPPP

I dont seem to have any luck with the new versions, i am still using 1.5.2 but i dont know why it doesnt work. The context is never created.

i seem to get these errors a lot

Error :
(1, 1) Name conflict. '' is a function.

what has this go to do with the new version?

I had to change GetFunctionID to GetFunctionIDByName in the new version. what is the difference here?

int funcID = engine->GetFunctionIDByName((const char *)funcname);
int r = ctx->Prepare(funcID, 512);

because of this ctx is never prepared, i would like to know how i could best link AS statically to determine what went wrong, what would be the right info you would like to know which would help you debug it ( if necessary ).

Thanks in advance

Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com

[edited by - EddHead on March 28, 2004 3:55:16 AM]
0

Share this post


Link to post
Share on other sites
You get the name conflict error if the name is already declared, either by the application in one of the Register functions or by another script statement.

You''ll need to take a look at your function names, global variables, etc. Some of them are using the same name.

There is no difference between GetFunctionID() and GetFunctionIDByName(), except the name of the method. The reason I changed the name of GetFunctionID() is because I declared another function GetFunctionIDByDecl() that was going to be implemented in version 1.6.x to support function overloading by script functions.

If your script doesn''t compile for any reason, i.e Build() returns a negative value you will not be able to get a function id nor prepare a context. First you need to find out why the build doesn''t work.

If you aren''t linking statically with AngelScript already I suggest you compile the library in debug mode and link with that dll instead. That way you will be able to go into the AngelScript functions to see where the error really is.

If you wish to set break points in the dll, you can add the dll for your debug session in the project settings->debug tab->category: additional dlls. Assuming you are using MSVC of course.

If you need more specific help than that you need to show me the exact error message that you get, and what the script that gives the error looks like. Also I might need to take a look at what functions, object, and properties you have registered with the engine.

__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library
0

Share this post


Link to post
Share on other sites
Oops!

The Error i seem to get is

Error :
(1, 1) Name conflict. ''' is a function.

( a null quote as a function at 1,1 is quite suspicious i guess ) cos i have checked all the routines. and i am using the same procedures to load the script as that of your sample program. and i havent changed a single thing except getfunctionID since 1.5.2 and 1.5.2 seems to be working fine.

I will try to statically link all the AS code to the program and get back.

Thanks
Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com


[edited by - EddHead on March 29, 2004 2:45:22 AM]
0

Share this post


Link to post
Share on other sites
It looks like you''ve stumbled upon a bug in AngelScript.

What does the first lines of your script look like? Is it possible for you to post them here? Or send them to me by e-mail?



__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library
0

Share this post


Link to post
Share on other sites
// cinematic function
// mission.as


// modes
const int DEAD = 0;
const int SLEEPING = 1;
const int UNARMED = 2;
const int WHITEALERT = 3;
const int YELLOWALERT = 4;
const int ORANGEALERT = 5;
const int REDALERT = 6;

// moods
const int AGGRESSIVE = 0;
const int DEFENSIVE = 1;
const int IDLE = 2;
const int STEALTH = 3;
const int FORAGE = 4;
const int CIVILIAN = 5;
const int VIP = 6;
const int CUSTOM1 = 7;
const int CUSTOM2 = 8;
const int CUSTOM3 = 9;

// trigger numbers
const int CHARREACHDEST = 0;
const int VEHREACHDEST = 1;
const int CHARACTERDEAD = 2;
const int CHARACTERHURT = 3;
const int VEHICLEDESTROYED = 4;
const int INSTANCEDESTROYED = 5;
const int CHARENEMYINRANGE = 6;
const int ANOTHERCHARINRANGE = 7;




Starts that way...........these things work fine in 1.5.2, i can send you the script in mail if u require. but i have declared about 200 functions for the scripting engine.



Thanks again


Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com
0

Share this post


Link to post
Share on other sites
I''m pretty sure this is a bug in AngelScript.

I''ve sent you an e-mail so that we can try to figure out where it is.

__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library
0

Share this post


Link to post
Share on other sites
The bug has been successfully fixed, and version 1.6.1b has been released. Changes that have been made are the following:

  • bug fix: Declaring multiple global variables in the same statement resulted in compiler error (thanks Jayanth)
  • Added the tokens &&, ||, and ! as aliases to ''and'', ''or'', and ''not''



__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library
0

Share this post


Link to post
Share on other sites
Hi
Used the new version. It seems to be working fine........

Thanks Andreas

Jayanth.K
Raptor Entertainment Pvt. Ltd.
http://www.raptorentertainment.com
0

Share this post


Link to post
Share on other sites