• 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.

doneval

Saving byte code

13 posts in this topic

Hello all, It''s possible to save all byte code generated in a file and then execute it directly? thanks, ricard (great to hace an angelscript forum !!!) Tor Nec Donavam!
0

Share this post


Link to post
Share on other sites
Work is in progress on this feature.
Right now, no you cannot save the bytecode and execute it directly.

admit nothing, deny everything and make counter accusations.
0

Share this post


Link to post
Share on other sites
And is possible to contribute to the project with code ?

I'm thinking to add some features myself. Is the author accepting contributions?



[edited by - doneval on March 10, 2004 7:41:23 AM]
0

Share this post


Link to post
Share on other sites
Yes, I accept and welcome contributions. The contributions pass my avaliation of course. Contributions that follow my goals are generally accepted. If the contribution is sufficiently good it might even change my goals with AngelScript

So far I've accepted two contributions, the port to DJGPP (which is what made AngelScript available for Linux developers), and support for the for-loop statement (sent by echo, in fact ).

If you're planning some new features it might be a good idea if you tell me about them first so that I can tell you what I would like, or perhaps if it is already in development, or something like that.

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

[edited by - WitchLord on March 10, 2004 8:46:15 AM]
0

Share this post


Link to post
Share on other sites
Great!

Have you any "TODO.txt" avaliable where we can check in a glance what is in development and what is planned for the future ?

--

Tor Nec Donavam!
0

Share this post


Link to post
Share on other sites
Hey!

Since when was the for loop available, Anyway......I dont think i was reading the documentation. i would like to know if anyone has made a small compiler which can be plugged to VC for error checking a script before the actual Host App actually begins to run.

Cheers

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

Share this post


Link to post
Share on other sites
Hi Andreas
I would like to know how you can map a function like in AngelScript ( to a string or variable like the registersystemfunction method) that can be used in a dynamic situation just like a scripting language. the application for this would be making some sort of a AS-to-DLL/AS-to-C++ converter once to lock/hard code the script code to get a speedy version (or simply get the C++ compiler to compile AS code). this would also require us to make sure most of our code will remain very very simlar to C++ code.

Regards

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

Share this post


Link to post
Share on other sites
The for-loop is available since 1.6.1 beta 1 (2004/02/27). You missed out on a lot of updates during the latest 1.6.1. Coollist failed to deliver e-mails and it took a while for people to migrate to the new freelists.org mailing list.

Jayanth, it is a small chance that anybody has written such a compiler, because the compiler needs to know about the system functions that you register in your application in order to appropriately verify if the script is without syntax errors. I suggest you yourself write this compiler. When registering the system functions use a null pointer, that way you don''t have to link with the entire application.

I''m not sure what you mean by mapping an AngelScript function to be used in a dynamic situation. Do you want to have some kind of function like GetProcAddress() to get a C++ function pointer to call the script function? I remember you asking for this before, and I still have it in mind but it is very far down on my to-do list. What you can do is write some proxy function for calling the script function, e.g:

float DoSomething(int a)
{
float retVal;
engine->CreateContext();
int id engine->GetFunctionIDByName("DoSomething");
context->PrepareContext(id);
context->SetArguments(0, &a, 1);
context->Execute();
context->GetReturnValue(&retVal, 1);
context->Release();
return retVal;
}


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

Share this post


Link to post
Share on other sites
Hi
What i wanted was a way to bypass Angelscript and create a C++ file for the script( get the compiler to compile ). one of the main reasons for me using angelscript right now is the ability to call functions dynamically ( eg: strChacaterFrameMove = "char1framemovefunc" )

Now i want to be able to do a similar thing once i have finished work with a similar script. (to make it hard coded to increase performance until i decide to change it later) we could make a AS to C++. my question was to know how i could store a functions address instead of the way i use strings and functionIDs from angelscript.

i''ll check out some info on GetProcAddress() and get back. i still have''nt implemented 1.6.1 cos i have''nt found time.

Thanks

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

Share this post


Link to post
Share on other sites
OK I think I understand what you want.

You want to use AngelScript to develop the system, and then when everything is working ok, you want to transparently exchange the scripts for a C++ DLL, or perhaps a statically linked library.

Well, what you would need is to hide AngelScript from the main application in a wrapper class. This wrapper class will do all the compilation of script code, and supply function pointers for the main application to call. When you decide to switch to C++ code you continue to use the same interface, but instead of compiling scripts it loads a DLL and take the function pointers from that one instead.

Example:


class IDynamicCode
{
public:
virtual int Initialize() = 0;
virtual int Uninitialize() = 0;

virtual void *GetProcAddress(const char *name) = 0;
};


In the Initialize() function you create an AngelScript engine, load the scripts, and compile them. In GetProcAddress() you map the name to a function that calls the script function like in the example I showed earlier.

When you switch to DLL, the Initialize() function would load the DLL instead, and GetProcAddress() would call the global GetProcAddress() for the DLL.


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

Share this post


Link to post
Share on other sites
Thanks a lot,

I''ll try it out once i get to work on these things. I would also like to know which is the best available method for file packaging. I want to package ".X" files along with their textures into packed composite files so that other people dont get to mess around with them ( say encryption with TEA maybe ).

Regards

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

Share this post


Link to post
Share on other sites
File packages are kind of off-topic in this thread, don''t you think? The question is fine in my forum, but try to keep each thread on topic. Please start another thread with your question, that way you will get much more answers.

What I''m thinking about doing is to use a simple zip file, and then encrypt it, but I haven''t started with that yet so I may change my mind before I come that far in my game.

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

Share this post


Link to post
Share on other sites
Oops.

I had gotten used to the mailing system i used to follow with you earlier. It certain ly is off topic, but i thought we could bring up some info out about your TEA implementation.

Regards

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

Share this post


Link to post
Share on other sites