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

Lettique

speed

8 posts in this topic

hello everybody, finally I''ve started using AngelCode and I''m quite pleased of it. However there''s another thing I''d like to clarify: how fast AngelCode is? I mean how many times (more or less) is it slower (faster ) than C code, its execution time to be specific, let''s say I have the context ready and just call ->Execute(). Mostly I use calling C-function from real C code (host app), no big expressions etc. Thanks, Ltq
0

Share this post


Link to post
Share on other sites
I really can''t say. I''ve never done any tests to compare the speed of AngelScript with C code. A guesstimate is between 20 to a 50 times slower.

Should you do any measurements I would be very interested in knowing the results.

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

Share this post


Link to post
Share on other sites
I wouldn't call this a scientific measurement, but I was calling an angelscript function every frame that simply returned a value, and getting ~120fps. The context was already made, and calling the function by name or id didn't seem to make much of a difference (although I would expect this to change if I registered a heap more functions). Calling the function twice yeilded ~60fps, 3x = ~45fps.

Replacing the script call with a compiled function that did exactly the same thing saw about ~1600fps.

I was pushing 3 arguments to the function (they will be used later) and grabbing the returned value. I also had a little bit of rendering and physics code in there, but not enough to have much of an effect.

I'm running on an Athlon 2600+.

EDIT: The post makes sense now.

- Xavier

[edited by - meink on May 10, 2004 8:46:13 PM]
0

Share this post


Link to post
Share on other sites
There is quite a bit of overhead when calling a script function, so it is reasonable to think that the difference would be huge in this case. Also you have to be careful when measuring the speed of C++ functions, because they might have been optimized, for example a simple function that only returns a value is usually inlined by the compiler giving a completely different situation.

I'm surprised to see that you get 45 fps just by calling executing 3 scripts per frame. It doesn't seem comparable to what others have experienced. Of course if you are using the debug version, this might be true because it saves some statistics to a file for each execution. Which would make it quite slow.

Some examples:

BeatHarness is a WinAmp plugin that uses AngelScript to do the visualizations. It calls executes a script at least 768 times per frame (once per scanline), with very good frame rates. Sorry, there is still not a public release that you can test.

Xtreeme Forces by Raptor Entertainment is using AngelScript for lots of different tasks, i.e AI, event scripting, GUI, etc. I doubt they would have been able to do that if they were getting 45fps with only 3 scripts executed per frame.

My own texture generator executes millions of byte code instructions per second. Don't remember how many at the moment.

To measure the speed of AngelScript it might be a good idea to do a loop that calculates the sum of all values between 1 and 1000000 (as an example). Perhaps 1000000 isn't enough to measure the speed of C++, if so increase the size. In this case you'll have to remember that the C++ compiler probably unrolls the loop somewhat, probably doing 8 adds per iteration.

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

[edited by - WitchLord on May 11, 2004 9:41:36 AM]
0

Share this post


Link to post
Share on other sites
I''ve made some tests and more or less they gave me the result that AngelScript is about 20 times slower than real C calling. Surely it depends on the script, usage etc. I dont treat this as a precise result. In one month time we''ll move some of our AI and physics to scripts then I will be able to make the tests again in real app situation, not as a synthetic test. So I''ll post my results here.

thanks,
Ltq
0

Share this post


Link to post
Share on other sites
Cool, then my guesstimate was pretty accurate after all :D

What game are you working on? Is it publically announced? Are you a professional game developer or an independent game developer?

I'm really interesting in knowing where AngelScript is being used. I understand that you are probably still in the evaluation phase with AngelScript, but if you could tell me what you might be using it for I would be thankful. Perhaps an e-mail if it is not supposed to be told publically. I'm very good at keeping confidentiality.

I saw on your site that you've joined the team of NahKolor. Do they have a website that we can take a look at?

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

[edited by - WitchLord on May 11, 2004 6:25:30 PM]
0

Share this post


Link to post
Share on other sites
Good point, I''m using a debug build. I''ll try it with the release version. I''m glad I was wrong actually, I was hoping to be able to use script calls every frame.

I''m making a game by myself for my own enjoyment. 2D vehicles that kill. Oh yeah I''m trying to make as much of the game logic scripted as possible.

- Xavier
0

Share this post


Link to post
Share on other sites
quote:
Original post by WitchLord
Some examples:

BeatHarness is a WinAmp plugin that uses AngelScript to do the visualizations. It calls executes a script at least 768 times per frame (once per scanline), with very good frame rates. Sorry, there is still not a public release that you can test.



Sorry, it'll be out Any-Day-Now*

BeatHarness can in 'bad' situations (when mixing 2 effect-scripts using 1 transition-script) call per-vertex-functions 768 times per script per frame,
which would amount to uhm... 3x768 I guess

The function being called does quite a bit more than just return a value,
and then there are still other parts of the scripts thet get called too

Still on my Athlon 2500, my framerate in these cases is mostly >40fps if I remember correctly.

Hey, it's just a matter of tweaking your compiler-options I guess ;-)

Edit:
And ALWAYS test speed in release-mode !
(I've seen AS-versions that opened, wrote and closed a debug-textfile each frame )

---
* 'Any-Day-Now' (c) 2004 by L.e.Denninger




[edited by - LDenninger on May 12, 2004 7:05:11 PM]

[edited by - LDenninger on May 17, 2004 6:54:33 PM]
0

Share this post


Link to post
Share on other sites
Andreas is right here. we do have about a thousand AS function calls per frame and the game is a polycruncher as well. the game runs at about 50 fps now and it isnt very well optimized as yet. we are extremely pleased with angelscript but i am still using 1.6.1 now.

My suggesstion is to use scripting as little as possible in the main loop. our basic usage of the script is for object initialization and AI descisions ,testing ,GUI handling etc. we would eventually move it to C++ code and leave an option for the game modders to override certain functions with AS code. this would help extending the app (as one of the goals for a scripting language).



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

Share this post


Link to post
Share on other sites