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

brightening-eyes

Members
  • Content count

    113
  • Joined

  • Last visited

Community Reputation

290 Neutral

About brightening-eyes

  • Rank
    Member

Personal Information

  1. try it with clang, or without any optimizations like -o2 to see that works or not, maybe there is a bug in GCC (as said that kDevelop and qt and chromium have problem with it) and, was this segfault exist in previous versions? if yes, this is a bug in gcc
  2. hi again, i have a question: in (for example asBC_JMP), do the code in ExecuteNext will be executed or not? i mean, this code which AngelScript has in asBC_JMP:         l_bc += 2 + asBC_INTARG(l_bc); do this executed or not? if yes, i don't need to execute it in asm level and just jump in that part of the code
  3. so, instead of writing a.mov(a.zax(), dword_ptr(a.zax(), 2)); i have to write a.mov(a.zax(), word_ptr(a.zax(), 2));
  4. okay, instead of using for example asBC_SWORDARG0, can i use +1 to retrieve parameters? because in assembly, everything is offset based and, what about jumps? i want to use jmp, what do you recommend? i think it should be like this: a.push(a.zax()); a.mov(a.zax(), ptr(regs, ASMJIT_OFFSET_OF(asSVMRegisters, programPointer))); a.mov(a.zax(), dword_ptr(a.zax(), 2)); a.add(dword_ptr(a.zax()), 1); //asBC_INTARG a.jmp(a.zax()); a.mov(ptr(regs, ASMJIT_OFFSET_OF(asSVMRegisters, programPointer)), dword_ptr(a.zax()); a.pop(a.zax()); unfortunately, the compiler's generated asm will not help because everything is turned into constance, and dirring the execution everything will be loaded into memory and i have to change the memory with asmjit
  5. hello, as the topic title says, i want to generate asm code using AngelScript's Jit capability feature using AsmJit now, for example, i want to decrement a variable, i should do this:         case asBC_DecVi:             a.dec(ptr(par1, ASMJIT_OFFSET_OF(asSVMRegisters, stackFramePointer)- asBC_SWORDARG0(bc)));             break; par1 is the asSVMRegisters struct which is passed as the first parameter and, ASMJIT_OFFSET_OF is like offsetof macro, but defined in asmjit as far as i know, i must retrieve the asSVMRegisters as the first parameter (which i get on the AllocArgs function of the assembler) now, i have this assembly code which is not correct: dec [ebx+3] par1 is on the ebx and ASMJIT_OFFSET_OF() return's 4, if decremented by 1 with asBC_SWORDARG0(), return's 3 ok, what am i doing wrong? this is my JitEntry:         case asBC_JitEntry:             a.mov(dword_ptr(par2), a.getOffset()- firstEntry);             break; a is the assembler, getOffset return's the position of the asm code and firstEntry is the position of the function when it was started to execute
  6. I get a 1750kB file for a no-debug static lib (whereas Squirrel, which I happen to have compiled for another project, is a mere 431 kB).   A program that looks like this: int main() { auto scriptengine = asCreateScriptEngine(ANGELSCRIPT_VERSION); return 0; } ...gives me a 1MB executable (stripped).   But don't get me wrong, I didn't mean to say Angelscript was bad. When saying "the only bad thing I can say about Angelscript", that was rather meant to indicate that I'm actually pretty happy with it, in particular with its speed (which was the "issue" in this thread) but also with the ease of use.   Somewhat bigger executable than I would ideally like, well OK, ... but you know, look at the size of some executables, and how much rubbish they load on top of that in DLLs! In that light, what's a megabyte.   Some office program from a well-known mainstream manufacturer which doesn't do anything but... text... (and doesn't even do it well) is so darn huge it wouldn't even run on a computer that is slightly older than 5-6 years. :)   @samoth, you can do some optimization checks with your compiler to reduce the size for example, -o3 optimizes your code a little for you and, something intresting: i've compiled AngelScript without jit compiler and only with jit instructions and with bytecode optimization into the app, it executed the scripts faster, (i didn't attach a jit compiler into it) this script: void main() { InitTimer(); for(auto i=-100000;i<=100000;i++) { cout<<i; } cout<<"\nexecution success\n"; cout<<"the execution took "+GetTime()+" seconds\n"; } it took 38.2324 seconds which is grate
  7. and a suggestion for byte-code optimization: in my idea, it would be good to be able to add callbacks for byte-code optimization for example like this: void asIScriptEngine::addByteCodeOptimizationCallback(asByteCodeLoadOptimizeCallback*, asByteCodeSaveOptimizeCallback*); and the loading and saving can be like this: void (asByteCodeLoadOptimizeCallback*) (asEBCInstr instruction, asDWORD* byteCode); void (asByteCodeSaveOptimizeCallback*) (asEBCInstr instruction, asDWORD* byteCode); although that was something like a simple theory, and that was a suggestion
  8. hi, AngelScript is easy to add to an application, and it has a syntax similar to C++, which i love and i'll use it i've only showed my tests that i've done and the result, nothing else at least when i've tryed the AngelScript with that JIT Compiler, it crashed the application anyway, AngelScript is my favorite scripting language, although lua is faster (i appriciate your grate work that you are doing on AngelScript) anyway, sorry
  9. ok, i don't know why lua is so fast, with a simple syntax and 100 kb of interpreter, which is only in ansi C (luajit as far as i know, turn's the code into asm which make's it so fast) but anyway, for fibonacci, the AngelScript is a little bit slow (i don't want to compair it with c because c work's completely different from AngelScript and it is compiled to native code, not byteCode) i think, AngelScript's byteCode must be optimized more
  10. no, i not mean that, i mean AngelScript is slower than it should be
  11. ok, this is fibonacci test which i got from codeplea.com and modified that on the sandbox, which is executed on 261.941 seconds int fibR(int n) {     if (n < 2) return n;     return (fibR(n-2) + fibR(n-1)); } int fibI(int n) {     int last = 0;     int cur = 1;     --n;     while(n > 0)     {         --n;         int tmp = cur;         cur = last + cur;         last = tmp;     }     return cur; } void main() { InitTimer();     const int N = 43;     cout<<"fib: "+fibR(N);     cout<<" = "+fibI(N);     cout<<"\n"; cout<<"the execution took "+GetTime()+" seconds\n"; } also, i've forgot to say my computer information that i've tested these: windows 7 32 bit ultimate, 2 gb ram, intel (r) 2.90 GHZ cpu some applications running on background such as my screen reader, skype, etc
  12. hello, i wanted to test AngelScript execution speed, so, i've executed a loop from -100000 to 100000, in C++, the execution took about 37.7 seconds, but in AngelScript, it took about 96.3 seconds i don't know, the AngelScript is eaven slower than lua (from other tests that i've read) this is the script which is executed on the AngelScript: void main() { InitTimer(); for(auto i=-100000;i<=100000;i++) { cout<<i<<"\n"; } cout<<"\nexecution success\n"; cout<<"the execution took "+GetTime()+" seconds\n"; } note that C++ streams must be registered with AngelScript also note that, systimer in basic compression library is used and, this is the C++ code #include <iostream> #include <bcl/systimer.h> using namespace std; int main() { InitTimer(); for(auto i=-100000;i<=100000;i++) { cout<<i<<"\n"; } cout<<"\nexecution success\n"; cout<<"the execution took "<<GetTime()<<" seconds\n"; }
  13. hello, why for example cResourceManager i write my classes and functions like this: class resource_manager { private: std::vector<resource> resources; public: resource get_resource(int id); }; in my idea (just in my idea itself), it's the best style for coding
  14. hi, it has been fixed by changing ss<<data; to ss<<*data; i don't know why it fixe's the crash, although data somehow refer's to nullptr and, trace_handler() doesn't do anything with data pointer, it just retrieve's it's contents and put's it into the log file thank you all again
  15. hi again, this is a sample test app that i've written, but it doesn't crash //a test app that allow's me to test my gamedata struct with stringstream in order to serialize it #include <iostream> #include <string> #include <sstream> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/serialization/string.hpp> #include <boost/serialization/serialization.hpp> #include "gamedata.hpp" //uses using namespace std; using namespace boost; using namespace boost::archive; using namespace boost::serialization; int main(int argc, char** argv) { gamedata gd; //i want to serialize this gd.username="test"; gd.password="test"; gd.rank=3; gd.userpass_incorrect=false; gd.account_not_exist=true; gd.mac_address="00:00:00:00"; gd.hdd_serial="0x8FE00"; gd.ip_address="127.0.0.1"; gd.x=500; gd.y=800; gd.z=0; gd.health=100; gd.is_banned=false; gd.kicked=false; gd.notify=true; gd.pm_user="test_pm"; gd.chat_user="test_chat"; gd.message="this is a test message"; gd.came_online=false; gd.went_offline=false; gd.server_message="server\'s message"; gd.motd="message of the day"; stringstream st; //this is needed for serializing the struct text_oarchive oa(st); oa<<gd; cout<<"serialized data: "<<st.str()<<std::endl; system("pause"); return 0; } i don't know what make's my app to crash i've initialized all the variables in my gamedata structure