1. Post #281
    Gold Member
    HiredK's Avatar
    November 2006
    419 Posts


    That's how I like my phong.
    The only thing needed so far is the main texture, but I'll probably add support for using a phong map.
    Are a phong map and a specular map the same thing? Also I'm still working very hard on my engine, I recently updated the normal shader to work with OpenSceneGraph, I had to do the tangent calculation shit all over again since my old technique doesn't work with osg, here's the result

    Reply With Quote Edit / Delete Windows 7 Canada Show Events Artistic Artistic x 24 (list)

  2. Post #282
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    Got custom user level uploading working

    Goes into a pending_levels/ folder on my web server, then every day I'm going to have to dedicate some time to review all of the uploaded levels and move the worthy ones into the public levels directory.

    Now I have to do all of this with replays, and store the world record, and my game will be near completion :D
    Reply With Quote Edit / Delete Windows XP United States Show Events Winner Winner x 3 (list)

  3. Post #283

    August 2011
    196 Posts
    Fixed my specularity, I was doing a couple calculations in the wrong places.
    Reply With Quote Edit / Delete Mac Canada Show Events Programming King Programming King x 7Artistic Artistic x 2 (list)

  4. Post #284
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
      std::basic_string<char32_t> utf32(U"This is a very wide string!");
      std::basic_string<char16_t> utf16 =
        switchEncoding<char16_t>("UTF-32", "UTF-16", utf32);
      std::basic_string<char> utf8 = switchEncoding<char>("UTF-16", "UTF-8", utf16);

    I'm going a little overboard with my codeset conversion wrapper.
    Reply With Quote Edit / Delete Linux Australia Show Events

  5. Post #285
    Gold Member
    TheBoff's Avatar
    September 2006
    660 Posts
    Making it up as I go along. Sort of.
    Wow, good luck! Compiler creation is pretty compilcated: the Dragon book is an excellent reference if you feel like you're struggling at any point. It's pretty dense, but still very good.
    Reply With Quote Edit / Delete Windows 7 Russian Federation Show Events Friendly Friendly x 1 (list)

  6. Post #286
    Gold Member
    Dr Magnusson's Avatar
    July 2008
    2,694 Posts
    Wow, good luck! Compiler creation is pretty compilcated: the Dragon book is an excellent reference if you feel like you're struggling at any point. It's pretty dense, but still very good.
    I'm alt+tabbing between it and Visual Studio

    It is pretty confusing right now, but I feel that if I can just get a proper syntax tree set up, translating it to assembly should be doable.
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events

  7. Post #287
    Team Hamster
    jalb's Avatar
    December 2009
    559 Posts
    Learning DirectX 9. Got a tweening menu gui going!

    Warning: Programmer graphics.


    Just need to add a few more controls. Going to add a slider for volume and maybe a whole second screen for the options that flies in from the side or something.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 14Artistic Artistic x 2Useful Useful x 1 (list)

  8. Post #288
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    Learning DirectX 9. Got a tweening menu gui going!

    Warning: Programmer graphics.


    Just need to add a few more controls. Going to add a slider for volume and maybe a whole second screen for the options that flies in from the side or something.
    That's fucking ill

    Wish I could do shit like that
    Reply With Quote Edit / Delete Windows XP United States Show Events Funny Funny x 14Agree Agree x 4Friendly Friendly x 1 (list)

  9. Post #289
    Gold Member
    thomasfn's Avatar
    July 2008
    2,959 Posts
    Learning DirectX 9. Got a tweening menu gui going!

    Warning: Programmer graphics.


    Just need to add a few more controls. Going to add a slider for volume and maybe a whole second screen for the options that flies in from the side or something.
    I'm sure it's just because I'm watching someone else click buttons rather than clicking them myself, but it's a bit confusing seeing buttons fly around everywhere.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Disagree Disagree x 8Agree Agree x 4Funny Funny x 3 (list)

  10. Post #290
    Gold Member
    Bambo.'s Avatar
    April 2011
    486 Posts
    I've been poking around with SFML and C++, and i've created a little 2d array thingybob which i hope i can turn into a Game of Life at some point.



    It would be awesome if someone could take a peek through my source code and tell me if i can improve on anything? since i'm new to this i'm not sure whether i'm doing something totally stupid and wrong haha. Thanks!

    http://www.pastie.org/2520048

    Edited:

    Thanks overv for the gif tutorial :D
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  11. Post #291
    Gold Member

    March 2005
    3,028 Posts
    Fixed the texture coordinates:


    There's a lot of rendering stuff I still want to do (subpixel reconstruction anti-aliasing, parallel-split shadow maps, possibly subsurface scattering, etc.), but I think I'm going to force myself to work on scripting (maybe networking) next. After all, I can't really call it an 'engine' if all it does is make pretty pictures.

    Anyone have any suggestions? I'm looking at LuaJIT at the moment.
    Reply With Quote Edit / Delete Linux Show Events Artistic Artistic x 6 (list)

  12. Post #292
    Gold Member
    danharibo's Avatar
    July 2006
    4,471 Posts
    Fixed the texture coordinates:
    There's a lot of rendering stuff I still want to do (subpixel reconstruction anti-aliasing, parallel-split shadow maps, possibly subsurface scattering, etc.), but I think I'm going to force myself to work on scripting (maybe networking) next. After all, I can't really call it an 'engine' if all it does is make pretty pictures.

    Anyone have any suggestions? I'm looking at LuaJIT at the moment.
    I would suggest V8, ECMAScript is much nicer to work with syntax wise, and V8's C++ interface is really nice.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Useful Useful x 2 (list)

  13. Post #293
    Gold Member
    esalaka's Avatar
    July 2007
    10,130 Posts
    Do parallax mapping and AO

    Edited:

    ECMAScript is much nicer to work with syntax wise
    Matter of preference, although I agree that Lua isn't the easiest language to bind to C++
    Reply With Quote Edit / Delete Linux Finland Show Events Disagree Disagree x 2 (list)

  14. Post #294
    Team Hamster
    jalb's Avatar
    December 2009
    559 Posts
    Sliders!


    Also showing off some code: http://pastebin.com/arVvLgdr

    edit: lambdas rule
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 9 (list)

  15. Post #295
    Gold Member
    Jawalt's Avatar
    August 2007
    3,478 Posts
    I would suggest V8, ECMAScript is much nicer to work with syntax wise, and V8's C++ interface is really nice.
    ECMAScript honestly is a really weird language with a lot of bad parts. Lua executes a protype based OO scheme much better than it does from what I can tell, and Lua doesn't inherite any of C/C++'s syntactical baggage.

    Lua in general is a language you have to tiptoe around a lot less, from my limited experience with Javascript, for instance a lot of people tell you to never use the == operator! That's insane, the == in JS does type coersion so things like 1 == "1" are true.

    For a game scripting language Lua is well documented, used by many, and is tried and proven to be great for that purpose. V8 is kind of a beast compared to Lua's footprint too.
    Reply With Quote Edit / Delete Linux United States Show Events Informative Informative x 3 (list)

  16. Post #296
    Gold Member

    March 2005
    3,028 Posts
    V8 does look really nice. And the benchmarks for LuaJIT are just incredible.
    I wish I had the problem more often of having too many good options.
    Do parallax mapping and AO
    I already have AO, and I'm not sure I want to do parallax mapping when tessellation is taking over.
    Reply With Quote Edit / Delete Linux Show Events

  17. Post #297
    Gold Member
    Jawalt's Avatar
    August 2007
    3,478 Posts
    Also for some background, this is coming from someone who writes in Lua and C. Perhaps I'm treating Javascript unfairly because I don't have a very broad view of things.

    Edited:

    My automerge!
    Reply With Quote Edit / Delete Linux United States Show Events

  18. Post #298
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Matter of preference, although I agree that Lua isn't the easiest language to bind to C++
    Snippets from Half-Life 2: Sandbox's Source Engine Lua SDK implementation:

    static int g_pClientShadowMgr_SetShadowDirection (lua_State *L) {
    	  g_pClientShadowMgr->SetShadowDirection(*(Vector *)luaL_checkvector(L, 1));
    	  return 0;
    }
    
    ...
    
     {"SetShadowDirection",   g_pClientShadowMgr_SetShadowDirection},
    

    void CHL2MPRules::PlayerThink( CBasePlayer *pPlayer )
    {
            BEGIN_LUA_CALL_HOOK( "PlayerThink" );
                    lua_pushplayer( L, pPlayer );
            END_LUA_CALL_HOOK( 1, 0 );
    
            BaseClass::PlayerThink( pPlayer );
    }
    

    Difficult shit.
    Reply With Quote Edit / Delete Windows Vista United States Show Events

  19. Post #299
    Gold Member
    esalaka's Avatar
    July 2007
    10,130 Posts
    What I mean is that you generally have to use some sort of a wrapper to conveniently wrap classes to userdata if you don't want to resort to writing everything by hand.

    Edited:

    I'm not sure I want to do parallax mapping when tessellation is taking over.
    Can't you do both
    Reply With Quote Edit / Delete Linux Finland Show Events

  20. Post #300
    Paid for a title.
    Maurice's Avatar
    June 2005
    6,175 Posts
    @Maurice: How do you detect and resolve collisions in your game?
    I tried AABBs, Pixel-Perfect and Sensors at the 4 corners of a AABB but none of the solutions work perfect in every situation.
    AABB.
    It used to be sensors but it was difficult to expand upon.
    And then half my game broke when I changed it.

    Reply With Quote Edit / Delete Windows 7 Germany Show Events Informative Informative x 9 (list)

  21. Post #301
    Gold Member
    esalaka's Avatar
    July 2007
    10,130 Posts
    Also, isn't parallax mapping lighter?

    IMO, it's a nice material effect to have. Gives your surfaces a little more definition. And doesn't need the generation of additional geometry.

    Edited:

    s/additional geometry/more vertices, therefore lessening render tiem/
    Reply With Quote Edit / Delete Linux Finland Show Events

  22. Post #302
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    What I mean is that you generally have to use some sort of a wrapper to conveniently wrap classes to userdata if you don't want to resort to writing everything by hand.

    Edited:



    Can't you do both
    That's a lazy way to go about it anyway. I originally wanted to do that with LuaBind, but If you roll your own class extensions, you can create clean, standardized Lua C API extensions to your currently existing Lua implementation.
    Reply With Quote Edit / Delete Windows Vista United States Show Events

  23. Post #303
    Dotmister's Avatar
    May 2008
    898 Posts
    Fixed the texture coordinates:


    There's a lot of rendering stuff I still want to do (subpixel reconstruction anti-aliasing, parallel-split shadow maps, possibly subsurface scattering, etc.), but I think I'm going to force myself to work on scripting (maybe networking) next. After all, I can't really call it an 'engine' if all it does is make pretty pictures.

    Anyone have any suggestions? I'm looking at LuaJIT at the moment.
    Looks really impressive. I think you should add shadows before moving on though, take a look at dual parabolic shadow mapping for point lights.

    http://graphicsrunner.blogspot.com/2...w-mapping.html
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Useful Useful x 1 (list)

  24. Post #304
    Gold Member

    March 2005
    3,028 Posts
    Also, isn't parallax mapping lighter?

    IMO, it's a nice material effect to have. Gives your surfaces a little more definition. And doesn't need the generation of additional geometry.

    Edited:

    s/additional geometry/more vertices, therefore lessening render tiem/
    I dunno, it's still a boatload of texture lookups, which is why it's used sparingly even in 'tech-demo' type games like Epic or Crytek make, and it still often ends up looking funky.
    Reply With Quote Edit / Delete Linux Show Events

  25. Post #305
    Gold Member
    esalaka's Avatar
    July 2007
    10,130 Posts
    <snip because too many posts>
    Reply With Quote Edit / Delete Linux Finland Show Events

  26. Post #306

    August 2011
    196 Posts
    Anyone have any suggestions? I'm looking at LuaJIT at the moment.
    LuaJIT is great, especially with its FFI. Pure LuaJIT is basically as fast as Java, AFAIK.
    Reply With Quote Edit / Delete Mac Canada Show Events Agree Agree x 1 (list)

  27. Post #307
    Gold Member
    Ortzinator's Avatar
    May 2005
    1,647 Posts
    Also, isn't parallax mapping lighter?
    You mean "cheaper"?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  28. Post #308
    Gold Member
    esalaka's Avatar
    July 2007
    10,130 Posts
    You mean "cheaper"?
    Yes

    It is 1AM
    Reply With Quote Edit / Delete Linux Finland Show Events Disagree Disagree x 1 (list)

  29. Post #309
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    That's fucking ill

    Wish I could do shit like that
    Damn I'm so funny and I don't even know it :saddowns:
    Reply With Quote Edit / Delete Windows XP United States Show Events Dumb Dumb x 11Programming King Programming King x 1Useful Useful x 1 (list)

  30. Post #310
    Map in a box's Avatar
    July 2009
    7,167 Posts
    Crossposting from WDYNHW since its my third time asking and I'm still not fully sure
    Code:
    gluLookAt((float)Math.sin(pitch)*0.5f, (float)Math.cos(yaw)*0.5f, 5.0f,  /* eye is at (0,0,5) */
    				    0.0f, 0.0f, 0.0f,      /* center is at (0,0,0) */
    				    0.0f, 1.0f, 0.0f);
    I am not doing it right am I. I know you shouldnt use gluLookAt, I just dont know what else to use.
    I don't know how to make a camera, is what I have trouble with
    Reply With Quote Edit / Delete Windows XP United States Show Events

  31. Post #311
    Zeonho's Avatar
    June 2010
    309 Posts
    I'm working on a small framework (wrapper??) for SFML.Net to get a simliar feeling like XNA.

    Already got a working Game class, ContentManager, GameTime, SpriteBatch(still without layerDepth), GameComponet and DrawableGameComponent.

    Still have to add animated Sprites, a particle system, a collisions manager and more stuff



    Reply With Quote Edit / Delete Windows Vista Germany Show Events Informative x 4Disagree x 2Dumb x 1Artistic x 1Programming King x 1 (list)

  32. Post #312
    Neigh
    CarlBooth's Avatar
    June 2007
    28,550 Posts
    I'm working on a small framework (wrapper??) for SFML.Net to get a simliar feeling like XNA.

    Already got a working Game class, ContentManager, GameTime, SpriteBatch(still without layerDepth), GameComponet and DrawableGameComponent.

    Still have to add animated Sprites, a particle system, a collisions manager and more stuff



    For that true XNA feel, add redundant comments everywhere
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 25Funny Funny x 5 (list)

  33. Post #313
    TGiFallen's Avatar
    January 2010
    1,438 Posts
    Anyone have any suggestions? I'm looking at LuaJIT at the moment.
    I love Lua so I will definitely suggest you use it. It has a tiny memory footprint:
    LuaJIT posted:
    low memory footprint: less than 125K for the VM plus less than 85K for the JIT compiler (on x86).

    It is much faster than V8, as proven in these performance tests..


    LuaJIT is great, especially with its FFI. Pure LuaJIT is basically as fast as Java, AFAIK.
    It is almost as fast as C.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events

  34. Post #314
    Gold Member
    danharibo's Avatar
    July 2006
    4,471 Posts
    How the hell is LuaJIT so fast.

    It's a shame I don't like Lua's syntax that much, since it does seem better suited for high-performance.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  35. Post #315
    Paid for a title.
    Maurice's Avatar
    June 2005
    6,175 Posts


    Random minecraft texture pack

    Yay or nay?
    This would only be for some of the story-levels.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Disagree Disagree x 17Agree Agree x 7Artistic Artistic x 1 (list)

  36. Post #316
    Gold Member

    March 2005
    3,028 Posts
    Looks really impressive. I think you should add shadows before moving on though, take a look at dual parabolic shadow mapping for point lights.

    http://graphicsrunner.blogspot.com/2...w-mapping.html
    I'm not really sure about shadow mapping point-lights (at the very least, I'll probably experiment with it at some point). I'm definitely going to do shadow mapping for the directional environmental light, but I'm not sure it's worth the cost for point sources. If I do support shadow maps for point-sources, parabolic shadow maps really do sound like the way to go, although I don't think I'm going to do VSM like in the implementation from the site you linked, as it can produce some really gross artifacts. I think I'm going to do conventional shadow mapping, but render out to a fullscreen buffer and (if necessary) do a screen-space bilateral blur (which respects discontinuities in depth) to smooth the jaggies.
    Reply With Quote Edit / Delete Windows 7 Show Events

  37. Post #317
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    Got sound working in my Marmalade game

    For some reason, Marmalade's sound system likes to skip into the first sound that's played, and then everything else after that works as expected, very odd

    	// initialization code, etc.
    
    	// warm-start marmalade's sound system which seems to have a very odd bug
    	// the first sound played has some sort of odd delay
    	{
    		ISound* sound = SoundCache::LoadOrGet("silence.raw");
    		sound->Play(1);
    	}
    
    Reply With Quote Edit / Delete Windows XP United States Show Events Funny Funny x 3Informative Informative x 1 (list)

  38. Post #318
    Gold Member
    Naelstrom's Avatar
    June 2010
    2,685 Posts
    Fixed the texture coordinates:
    Do you have a resource I can look at for deferred lighting? Right now I'm using this, but it mainly talks about the concepts assuming you have a good grasp on opengl(Which I don't). Can you recommend anything for me?

    Anyway I've gotten multi-light shading working, only to find out that using more than 8 lights causes severe problems; I'd really like to get some deferred lighting working instead.

    Reply With Quote Edit / Delete Linux United States Show Events

  39. Post #319
    Map in a box's Avatar
    July 2009
    7,167 Posts
    Decided to work again on a engine me and my friend are making

    Autocomplete! Yay!
    Reply With Quote Edit / Delete Windows XP United States Show Events

  40. Post #320
    Gold Member

    March 2005
    3,028 Posts
    Do you have a resource I can look at for deferred lighting? Right now I'm using this, but it mainly talks about the concepts assuming you have a good grasp on opengl(Which I don't). Can you recommend anything for me?
    That's really not conventional deferred shading at all. I've never seen that approach before.

    There's a lot of good information in presentations from GDC and similar conferences. For example the implementations of Killzone 2 or Starcraft 2 (slides or paper). GPUGems also has examples from S.T.A.L.K.E.R. and Tabula Rasa.

    Also read this post if you want an efficient and simple method for obtaining pixel coordinates from depth.

    Many of these sources speak in API-agnostic terms, so you'll have to figure out the details for yourself for the most part. You basically just need to set up a bunch of textures with the necessary formats (rectangle textures are probably easiest to work with in this specific application), try to make them all the same size per pixel. For instance, I use GL_R32F for depth (it's a secondary linear depth buffer), GL_RG16F eye-space normals (x and y only, z is reconstructed), and GL_RGBA8 for diffuse, specular, and emissive color (specular/emissive exponent is stored in alpha), all of which are 32 bits/pixel. Bind these to a single framebuffer object to render geometry to. Unbind the FBO, enable additive blending, bind the g-buffer individual textures as samplers, and render each light as a fullscreen quad, taking into account the positions/normals of each pixel to perform lighting.
    Reply With Quote Edit / Delete Windows 7 Show Events Friendly Friendly x 1Winner Winner x 1 (list)