• 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.
Sign in to follow this  
Followers 0
WitchLord

AngelScript 1.8.0c (2004/07/19)

31 posts in this topic

I've finally decided to release version 1.8.0. Lot's of things have been done for this version. Let's see if I can give a summary of them here: There is no longer a built in bstr type. Instead the application needs to register its own type. This change was made to add flexibility in how strings are passed between script and application and vice versa. For those who have come acustomed to the bstr type I've made a small library for registering that type with complete compatibility. It is now possible to overload compound assignment operators as well. Scripts can now be compiled into separate modules, each with their own namespace. This is especially useful if you have two scripts with the same interface but different implementations, e.g. AI routines for different types of entities. The STDCALL calling convention is now supported as well, which means that Win32 API functions can be registered directly with the library. It is now possible to enumerate and access global variables declared in the scripts. This could for example be used for saving script states. The interface for registering functions and methods have changed slightly in preparation of improvements coming in version 1.8.1. Other changes you'll find in the change log as usual. I'll spend the following days updating the articles to conform to the new version. PS. I decided to postpone the switch-case implementation for the next version. [Edited by - WitchLord on July 19, 2004 8:30:40 PM]
0

Share this post


Link to post
Share on other sites
Great job WitchLord!!!!!!!!!!!

can acces to global vars, i love you :-D.

when a struct or class implementaion :-?

Thanks for all!!!

Gunder.
0

Share this post


Link to post
Share on other sites
Still running on 1.7.1a will update ASAP. need to put out some time on this.

Is there any way in which i can get VS.NET to decide to enable syntax highlighting on AS script files? will help a lot!!!
0

Share this post


Link to post
Share on other sites
Quote:
Original post by EddHead
Is there any way in which i can get VS.NET to decide to enable syntax highlighting on AS script files? will help a lot!!!

There was a thread on syntax highlighting in VS .NET a while ago. Though if you decide to use the registry hack and you're using 7.0, you'd use the 7.0 key instead of the 7.1 key.
0

Share this post


Link to post
Share on other sites
Thanks a lot, but i found something on the net already. kinda helpful too since AS code is very much C++-ish!
0

Share this post


Link to post
Share on other sites
Gunder:

Thanks, I'm happy you liked the new features. I don't know when support for structs or classes will be added. I haven't planned that far ahead. It will most likely be at least 3 or 4 months before I add that support.

EddHead:

You will that most of the work will be with the way you register functions and objects with AS. It's shouldn't be too hard to upgrade to 1.8.0. Hopefully you will also find the new features useful, though perhaps you've already come too far in your project to really take advantage of them.

Could you post a link to what you found about syntax highlighting in VS.NET? Either here or in the thread that SiCrane mentioned would be ok. Thanks.
0

Share this post


Link to post
Share on other sites
Hi

I get an access violation error in my String assignment behaviour, this is very strange because it worked with WIP5.
Any suggestions what might have changed?

0

Share this post


Link to post
Share on other sites
sorry,
I just realized that it didn't work with WIP5 so, the question is not what has changed, but what do I have to change :))

I do the following for assign behaviour:


#define asFUNCTION4(c,r,f,p) asFunctionPtr((asFUNCTION_t)( (r(*)p)c::f) )

r = engine->RegisterTypeBehaviour("String", asBEHAVE_ASSIGNMENT, "String& f(const String&)", asFUNCTION4(StringBinding,String&,StringCopy,(const String&,String&)), asCALL_CDECL_OBJLAST); assert( r >= 0 );

String& StringBinding::StringCopy(const String& src, String& dst)
{
dst=src; // Error occures here when memcpy is called
return dst;
}

String is an extension of std::string.
src is assigned a value but dst points to some weard place.

The funny thing is that the add assign operation works. The following script code does not bail out.


String s;
s+="Hello World";


Any hints?
Tom
0

Share this post


Link to post
Share on other sites
I have this code

String s="hello";


How many time must the string factory be called?
Two Times?
1 anonymous string _anon:"hello";
2 string s:"";
and then assign the string _anon to s.

Or one time for string s init with char array "hello" ?

However I' expect that the factory is called for the string s at least one time. But when I trace the calls only the anonymous string gets a factory call. S is held uninitialized.
Do I understand that right, is this behaviour intentional?

Regards
Tom

0

Share this post


Link to post
Share on other sites
**sigh**
ok, next time I swear I'll take a closer look at my source first.
I forgot the constructors.... shame on me...





0

Share this post


Link to post
Share on other sites
Just to clarify: The string factory function is only called for string constants. It is used for converting the string constants to whatever type the application has registered for handling strings.

0

Share this post


Link to post
Share on other sites
I can't imagine the next lines are intended this way ?

(as_scriptengine.h @ Line 960...)

if( systemFunctions[n]->returnType.GetSizeOnStackDWords() > 2 )
systemFunctions[n]->hostReturnMethod = asCALL_RETURNBYREF;
else
systemFunctions[n]->hostReturnMethod = asCALL_RETURNBYREF;


Since this if-statement is useless, the code for 'complex' objects compiles to the exact same code as the code for 'non-complex' objects...
0

Share this post


Link to post
Share on other sites
Quite useless indeed. ;)

I'll look into it as soon as possible. I guess my tests didn't cover that part of the code.

Thanks for letting me know, Lennart.

Regards,
Andreas

0

Share this post


Link to post
Share on other sites
I've just uploaded version 1.8.0a that has a couple of bug fixes. One of them is very important for those that intend to use modules as only first module did compile correctly. The second (and any other modules) wasn't able to compile any function calls as the function ID got out of range. The other bug is the one Lennart mentioned above. In fact, both of the bugs were discovered by Lennart.

I think I need to improve my release program and have three library versions available for download at any one time: The current stable one, a feature complete beta version, and the work in progress. I'll probably start with this for the next release.

Regards,
Andreas
0

Share this post


Link to post
Share on other sites
i dont remember the link but heres the .reg file code. name it as a reg file and change the extention to use as required
----------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\Languages\File Extensions\.as]
@="{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}"
-----------------------------------------

maybe i will use the features in 1.8.0 but i am looking for a decent C++ syntax but thats it. i havent yet thought of what and how i will use the rest of the features. but will keep everyone
0

Share this post


Link to post
Share on other sites
Hi
Still working with Strings ;) which seem to work from time to time. I have the following script


void dir(String path, String filter)
{
CDirectory* dir=getDirectory();
dir->setFilter(filter);
dir->changeWorkingDirectory(path)
}

void main()
{
dir(".", "*");
}


This script doesn't work. it bails out when i call 'dir'.
But if I make the parameters call by ref 'void dir(String& path, String& filter)' everything works just fine.

I don't think this has something to do with the way I registered the string class, does it?

Btw: the error occures at line 69 in ac_array.h / access violation
this signatur works too void dir(String path, String& filter)
maybe something with the parameter passing for the registered string class doesn't work since passing multiple Integers etc. is working too...


[Edited by - zola on July 13, 2004 10:05:53 AM]
0

Share this post


Link to post
Share on other sites
It could have something to do with how you registered the assignment behaviour function. This function is used to effectively assign a copy of your string to the parameter when sending it by value.

I'm not sure how the access violation for ac_array.h comes into the picture, I'll have to do some debugging.

Would it be possible for you to write a small test case in the test framework that reproduces the error and send it to me? That would help me find the problem. You'll find the test framework on the download page.

Regards,
Andreas
0

Share this post


Link to post
Share on other sites
Hi Andreas

I send You the testcase as email.
BTW. I linked against the debug version of angelscript I hope this doesn't matter.
0

Share this post


Link to post
Share on other sites
I have tracked the runtime error with vc7.1 to this location
file as_context.cpp

void asCContext::CleanStack()
{
// TODO: Increase the numActiveContexts when cleaning the stack

// Run the clean up code for each of the functions called
CleanStackFrame();

while( callStack.GetLength() > 0 )
{
PopCallState();

asCScriptFunction *func=engine->GetScriptFunction(functionID);
byteCode = func->byteCode.AddressOf();

CleanStackFrame();
}
}


'func' appears to be a null pointer at some time which causes the access violation call to ac_array.

0

Share this post


Link to post
Share on other sites
OK, thanks.

I'll add an assert to the method and run the tests again. If func is null at any time for MSVC6 as well I should be able to find the bug. If it is indeed null for MSVC6 as well, it is very strange that I don't get an access violation though.

I will give the VC++ .NET 2003 Toolkit another try tonight. I hope that the debug output is compatible with MSVC6 so that I can debug the library, otherwise it will be a lot tougher for me to find any error.


0

Share this post


Link to post
Share on other sites
I heard there is an open-source IDE which uses the VC++ Toolkit 2003 as a compiler, but i remember someone talking about it, its called iSeeSharp or something like that, its supposeed to be very much similar to .NET 2003 in functionality. if anyone can get a link or tell me what the real name is it would help!!!
0

Share this post


Link to post
Share on other sites
Do You meen SharpDevelop?

http://www.icsharpcode.net/OpenSource/SD/

I think this is only for C#.
0

Share this post


Link to post
Share on other sites
yup, this is what the guy was talking about, i am taking a look at it. it seems to be gret, i dont know if we can use it for C++ though.
0

Share this post


Link to post
Share on other sites
Hi

I thought I just mention this here too to have a complete history.

To get rid of the erros I had with my string class I did the following:

1) apply the bug fix http://www.gamedev.net/community/forums/topic.asp?topic_id=257373

2) make sure the stack size for execution is big enough! That was my own fault and I just didn't think about this while searching for the bug.

Regards,

Tom
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0