• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

113 Neutral

About eezstreet

  • Rank
  1. Hello there, I'm eezstreet. For the past 8 months, I have been working on my own isometric ARPG from scratch. Currently there's nothing more to show than concepts and programmer art, but you can chalk this up to a lack of artists - I've been going it alone for the moment. ;) Haven't found much in the way of artists using the classified section, but I'm remaining hopeful that I'll find someone soon.   My game is titled Rapture. My main source of inspiration is Diablo II. Although there are new games like Path of Exile, Diablo III, and Torchlight, I never felt like there was a true spiritual successor to the game. I've decided to go back to the game's roots and focus more on RPG elements instead of a loot-n-grind experience. In the game, you'll travel across a nightmarish, post-biblical-apocalyptic Earth, which is now being ravaged by demons. Your goal is to either ascend to heaven or defend mankind as it forges a new beginning.   For right now, there is no lighting, sound, or multiplayer, but they are all planned. Currently I am working on learning some OpenGL so I can simulate 3D lighting and optimize the renderer even further. I really want to focus on having an engrossing and engaging world, as I feel that's where many of the "Diablo-clones" fail. I aspire to inspire horror, fear, and disgust in those who are brave enough to complete the game.   Here is a few gameplay screenshots, from a debug build of the game: https://dl.dropboxusercontent.com/u/46626270/Rapture/update1_quests2.png https://dl.dropboxusercontent.com/u/46626270/Rapture/update1_quests0.png   Here is a concept of an area which was drawn up for me: http://i.imgur.com/o2mGSGt.png   The engine was built in C++ and is using SDL. I've open-sourced the game under the GPL (currently have to apply the license though!). If anyone wants to help out with the art, feel free to shoot me an email (eezstreet at live dot com). Anyone can clone/fork my repo here: http://github.com/eezstreet/Rapture   Engine stats- - SDL-based rendering - C++ powered engine, uses JSON data files which can integrate into UI - Priority-based error logging and message dispatch system - Multiple file searchpaths - Codebase split between engine and gamecode, can run "programs" (games/editors) from DLL files using import/export system - Uses render-to-texture exclusively; capable of displaying hundreds of objects onscreen without cracking 100 FPS - UI is done in HTML/CSS/Javascript - Modular renderer - Designed from the ground-up with mods in mind - (Able to be rather easily ported to) Linux and Mac - Ingame console with cvars and commands a la Quake 3 or Unreal Engine. Supports Unix-style copy/paste (select to copy, right click to paste)   Feel free to use it as a framework for your own iso 2D projects or anything, as long as you adhere to the GPL I don't really care.
  2. Don't think I'm handling objects properly...

    When you say I wouldn't have to implement wrappers, are you referring to changing the type of vec3_t to a struct? (not really feasible, it's used literally everywhere) I can probably handle it being passed by reference and treated as a struct as far as AS is concerned.
  3. Don't think I'm handling objects properly...

    Hmm. Wrappers might work.
  4. Don't think I'm handling objects properly...

    MSVC 2010 and latest angelscript.
  5. Don't think I'm handling objects properly...

    vec3_t is just a typedef float[3].   playerState_t is defined here: https://github.com/eezstreet/OpenJK/blob/jk2hd/code/qcommon/q_shared.h#L1911-2212 (__NO_JK2 preprocessor is disabled)
  6. Don't think I'm handling objects properly...

    Works without a hitch. However, the other arguments being passed into CalcMuzzlePoint (vec3_t global variables) are null pointers. :<     Also, the accuracy_shots property seems to be connected to the wrong property (connected to stats[STAT_HEALTH] instead of persistant[PERS_ACCURACY_SHOTS])
  7. Don't think I'm handling objects properly...

    https://github.com/eezstreet/OpenJK/blob/jk2hd/codeJK2/game/g_angelscript.cpp#L26-#L41 ^ AS_SetArgBasedOnType, as well as the other code. CalcMuzzlePoint is called from the script, and the first arg (a pointer to a gentity_t*, which SHOULD be the same pointer as to what gets passed into the script) is an invalid pointer -- as I recall from debugging it was pointing to 0xcccccccc (Windows magic number for unallocated heap memory I believe) and therefore crashes inside of CalcMuzzlePoint. (CalcMuzzlePoint is in g_weapon.cpp)   Yeah, the string processing is a little slow, I will admit that. I mainly did it that way so I can insert a large batch of functions without having to customize the calls too much. And yeah, thanks for pointing that out.
  8. So here's the rub. I'm working on a json/angelscript combo system as part of weapon design. The JSON defining the script block and function to call, which uses the signature "void call(gentity_t@)". The problem is, I'm not sure if I'm handling the object correctly. gentity_t is just a simple struct (but it isn't asOBJ_POD as it contains pointers to some other things within). The script will modify certain aspects of the gentity_t, which is meant to be passed in as a pointer, as well as execute several global functions which take the gentity_t as an argument.   Right, so here's how I'm registering my object: scrpEngine->RegisterObjectType("gentity_t", sizeof(gentity_t), asOBJ_REF | asOBJ_NOCOUNT); and here's how I'm calling the script: bool TryNewDempRoutine(gentity_t *ent) {     if(ent->s.weapon != WP_DEMP2) {         return false;     }     G_ExecuteASVoid("void DEMP2Test(gentity_t@ ent)", 1, ent);     return true; } (here's G_ExecuteASVoid: ) void G_ExecuteASVoid(const char* funcDeclaration, int numArgs, ...) {     string s = funcDeclaration;     auto paramStart = s.find_first_of('(')+1;     auto paramEnd = s.find_last_of(')')-paramStart;     string params = s.substr(paramStart, paramEnd);     vector<string> arguments;     asIScriptFunction *func = scrpEngine->GetModule(0)->GetFunctionByDecl(funcDeclaration);     scrpContext->Prepare(func);     auto argSplitter = params.find_first_of(',');     while(argSplitter != params.npos) {         string thisArgument = params.substr(0, argSplitter-1);         arguments.push_back(thisArgument);         params+=argSplitter;         argSplitter = params.find_first_of(',')+1;     }     arguments.push_back(params);     va_list        argptr;     va_start(argptr, numArgs);     void* arg;     for(int i = 2; i < numArgs+2; i++) {         arg = va_arg(argptr, void*);         AS_SetArgBasedOnType(&arg, arguments.at(i-2), i-2);     }     scrpContext->Execute(); } Here's my angelscript file: void FireDemp2(gentity_t@ ent) {     vec3_t start;     int damage = GetWeaponDamage(WP_DEMP2);     Com_Print("test4\n");     VectorCopy(wpMuzzle, start);    // Copy value of wpMuzzle to start     Com_Print("test5\n");     WP_TraceSetStart(ent, start, vec3_origin, vec3_origin);     Com_Print("test6\n");     gentity_t@ missile = CreateMissile(start, wpFwd, 1800, 10000, ent);     Com_Print("test7\n");     missile.s.weapon = WP_DEMP2;     Com_Print("test8\n");     VectorSet( missile.maxs, 2.0, 2.0, 2.0 );     Com_Print("test9\n");     VectorScale( missile.maxs, -1, missile.mins );     Com_Print("test10\n");          missile.damage = damage;     Com_Print("test11\n");     missile.dflags = 128; // Lazy, don't feel like creating an enum for this right now     Com_Print("test12\n");     missile.methodOfDeath = 12; // Also lazy and don't feel like creating an enum for this right now either     Com_Print("test13\n");     missile.clipmask = 263041; // BLARGH SO MUCH TO DO OMG     Com_Print("test14\n"); } void DEMP2Test(gentity_t@ ent) {     // Increase number of shots fired (for loading screen statistics     ent.client.ps.accuracy_shots++;          // From our viewangles, generate three vectors -> wpFwd, wpVright, wpUp (all are global)     Com_Print("test\n");     AngleVectors(ent.client.ps.viewangles, wpFwd, wpVright, wpUp);     Com_Print("test2\n");     // Given the three vectors, calculate our muzzle point and stuff it into wpMuzzle (also global)     CalcMuzzlePoint(ent, wpFwd, wpVright, wpUp, wpMuzzle, 0);     Com_Print("test3\n");     // Call our funtion which fires the DEMP2     FireDemp2(ent); } The script only gets as far as "test2" before it fails on CalcMuzzlePoint, that function being a global function: void CalcMuzzlePoint( gentity_t *const ent, vec3_t wpFwd, vec3_t right, vec3_t wpUp, vec3_t muzzlePoint, float lead_in ) .... scrpEngine->RegisterGlobalFunction("void CalcMuzzlePoint(gentity_t@ ent, vec3_t fwd, vec3_t right, vec3_t up, vec3_t muzzle, float lead_in)", asFUNCTION(CalculateMuzzlePoint_AS), asCALL_CDECL); I suspect that I'm doing this completely wrong and that maybe I should be using something like CScriptHandle, but I'm not too sure where to go with this.
  9. So I have a bit of a problem... I'm reverse engineering a game (a Quake 3 derivitve, if that helps) to allow an SWF to be used in place of a texture and I need to use gameswf as a renderer which binds a texture, and then uses glTexSubImage2D to draw the rendered swf as a subimage. Unfortunately, I know only very little about OpenGL, and how gameswf interacts with it. I believe that gameswf doesn't store the bitmap data needed for glTexSubImage2D when rendering using the OpenGL renderer.   If anyone could help, that would be great!
  • Advertisement