• 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

Pointers in AngelScript: Really necessary?

33 posts in this topic

Thanks everyone for giving your opinions. I've made my decisions:

1. AngelScript 1.10.0 will be released with full support for arrays and still keep pointers around.

2. After that I will start working on AngelScript 2.0.0 that will take lot of inspiration from Java and get rid of pointers and make all objects be passed around by references. This will make the treatment of objects more uniform, which will make it much easier for me to introduce script declared classes and context state serialization, etc.

3. Further development of features will go under the 2.x.x versions, but I will keep supporting version 1.x.x with bug fixes and perhaps a few minor changes to make it easier to use (mainly an improved interface for calling script functions).

It's not possible to please everyone, but I try to do my best. I'm pleased to know that the majority agree with my decision. I know that Abrken may be a bit sad to see the pointers go, but I hope that he will in the future move over to AngelScript 2.x.x as well.

I didn't see any word from EddHead (Raptor Entertainment) but he is still using version 1.7.1 so I'm sure whatever I decide the work to upgrade would be quite big anyway.

Once more: Thanks everyone.

Regards,
Andreas
0

Share this post


Link to post
Share on other sites
I've been following AngelScript for awhile now, and have been taking some Java classes recently. While I hate Java as a language, I think it would be awesome to see the way they handle Objects in AngelScript. And anything that can speed up the library is always a plus.
0

Share this post


Link to post
Share on other sites
Would it be possible to integrate smart pointers into this? It would remove the need to have raw pointers, what I'd like to have is the possibillity to just use it like Class->Method when Class is actually a smart pointer.
I am not sure if this would still allow you to simplify AS as a whole, but if it was, this would be nice. Shouldn't be too hard either, basically there'd just need to be some way to register a function for the script engine that would allow it to retrieve the actual class on which it would then execute the method.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Wuntvor
Would it be possible to integrate smart pointers into this? It would remove the need to have raw pointers, what I'd like to have is the possibillity to just use it like Class->Method when Class is actually a smart pointer.


Personally, I think if you're going to remove pointers from the script, you should also remove the operator->. This would simplify the the syntax of the language, as it can only be used with pointers (since I belive AS doen't allow you to overload operator-> in your classes.)

Just my thoughts on the matter though.
0

Share this post


Link to post
Share on other sites
Mortal:

AngelScript 2 will work with object basically the same way as Java does. There will be a slight performance hit because of this, but it should be negligable in the context of a scripting language. The language syntax will be simpler though, and much more consistent. And of course it will be easier for me to develop further features.

Wuntvor:

AngelScript 2's object variables will basically be smart pointers. The . operator will access the objects methods directly. I'm not sure if the -> will be implemented, probably not.

I may implement the possibility to overload -> for AngelScript 1.x.x though. That should allow you to implement smart pointers.

desertcube:

I agree.

0

Share this post


Link to post
Share on other sites
I'm using handle classes exstensivly. Though I don't technically need an operator->, it would simplify a lot of things in my scripts. The handles manage pointers. They are essentially reference counted smart pointers that make calls directly into the engine to manage game resources. Right now, I pass them to global functions. It is, unfortunatly, quite possible to pass a texture to a function that expects a sound. With operator->, I could register the texture class, and all the functions that use it as methods, and continue using my handles - except with type safety! (Assuming, of course, polymorphism works in some future release.)
0

Share this post


Link to post
Share on other sites
I would also like the -> operator to remain, but only as an overloaded operator. I don't really need it, but it provides a nicer syntax.
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