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

zexee

Members
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

118 Neutral

About zexee

  • Rank
    Member
  1. That's great! Then I found a bug that GetVarDecl and GetTypeDeclaration does not work on template specializations. 
  2. Hi, I want to get the full declaration (something like: const namespace::array<object> a;) of a local variable in context.   I tried function->GetVarDecl(), but it does not full (no namespace, no <object>). I know namespace can be found in engine->GetObjectTypeById()->GetNamespace(), and const can be found in function->GetVarDecl() but how to get the template subtype?   Since the template subtype can also be a template and have const and reference/handle, it seems to be a iterative process to get the full declaration. Is there a simple way to do that?   Thanks in advance!
  3. I see, thank you very much!
  4. I am a bit confused about how to use object handle. Here is the code example I was trying to compile with the add-on array: class Obj {   int x; }; void main() {   array<Obj@> a(3);   Obj o;   o.x = 10;   a[0] = @o; } The compile error is "Can't implicitly convert from 'Obj@const&' to 'const Obj&'." for the assign line. What is the correct way of doing that?  
  5. Hi, here is the problem I want to find a solution. I want to dynamically edit a script file A, so I need to compile it again and again and see the running result. A requires some common functions and global variables that are stable and no need to change, more importantly, it always needs some data that need some time to calculate. Say these dependent function and variables are stored in script B. So it's better to load B first and let it do the calculation to prepare data and then load A to run it. In this way A can be changed and run without recalculate data in B. However I found that if there is some errors in A which makes the module fail to build, the modules will be "damaged" and those function/variables in B will also be destroyed and that will be contradicted to my initial purpose of doing so. Since all script entities are in modules, I cannot make them global. And right now importing global variable from another module is not supported. So is there any good solution to this? Thank you very much!
  6. Sorry, it was my mistake. I was actually calling opCmp so equal is 0. Thank you for your answering!
  7. I am just met trouble of use c++ to access bool value in angelscript. There is no SetArgBool or GetReturnBool, and it said bool is 8bit in the document. So I used *(bool*)GetAddressOfReturnValue() but it turned out wrong.   I looked at the memory, it seemed that true is 0 and false is 255 in byte. If so, that is different from c++ tradition (as far as I can remember, in c++ 0 is false and all others are true), and it should be documented or provide set and get function.
  8. I found my bug! I tried to use inherited reference_count class and put AddRef and Release in the base class. Therefore the function address is for the base class and when call them with the address of the derived class as object using this_call, the function will consider it as the address of the base class and it cannot find the correct reference counter variable.   So I cannot register any function of the base class if the inheritance is not trivial.
  9. It is not easy to create a simple example, so I am trying to debug myself. I found it only happens on template object and the reason is that the template object is never released. No one calls ->Release() for the local variable so it is never deleted. I am not sure where it should be called, after function release or after context release? I am guessing that every function call is related to a context and when context releases all its local variable releases. According to the function name I think CleanStack is doing that but it is never called for successfully executed function. I am lost. Would you point me out the way where to look at?   Plus, I didn't use funcdefs, I just compile a script into a module and run one function of it. I only explicitly create one context for running function and get one function from the module. I am sure this two things are correctly released.
  10. When engine is destructed, I got a error message saying "type string is still used by function erase". It seems that a the function is holding a reference to a type. It's true that the input parameter of function erase is string, but it never addref it.   What could be the problem?
  11. For example, I want to have a template<int N> class Vector; I want some specific method for specific Vector<N>, for example CrossProduct are only for Vector<3>. But also, all Vector can have some common method like operator+(). So here is what I implemented template<int N> class VectorBase{ /* common methods */} template<int N> class Vector : public VectorBase; template<> class Vector<3> : public VectorBase<3> { /* specific methods */ } The operator+ can only return a VectorBase, so many functions only need to accept VectorBase& as arguments. So I want Vector& be implicit cast to VectorBase&.
  12. Thank you very much for the detailed answer! It prevents the passed in arguments being destroyed inside the current function. If it is a reference object, the argument always holds a reference, so &inout is allowed.    I tried asEP_ALLOW_UNSAFE_REFERENCES, and it works very well, except for it still disallow register a reference cast behavior to a value type. Since it is already unsafe, this cast should be no more unsafe than passing value type by ref right?
  13. HI,   First of all, I am looking for such (c++ style) script for a long time and very happy that angelscript exists.   I am working on design even simpler interface to register c++ objects / functions so that I can easily register many good c++ libraries and make it a general purpose language.   I met some problem when dealing with arguments passing to functions. The const T&in type will always cause a copy constructing for the object passed in and the object will be destroyed after the function ends, and const T&out will create a new object to pass into the function and copy it back to the original object after the function ends. These two behaviors happen no matter for value object type or reference object type. These behaviors are different from c++ and will cause some problem.   Since for reference object type, neither const T &inout or T &inout do the copy and I think const T&in should be the same as const T &inout, so that is not a implementation problem.   I am wondering what's the original thought of &in and &out? Since the caller will always hold a reference or the value so the object will not be destroyed during the call, and const will control whether the function can modify it or not, so why do we need &in and &out?