Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

461 Neutral

About sprite_hound

  • Rank
    Advanced Member
  1. sprite_hound

    Error handling in Epoch

    Nice. Is it possible to pass no parameters / more than one parameter to evacuate() (and - maybe opening a different can of worms - would it be possible to catch them generically)? I'm not saying this would actually be a good idea or not, it's just something that sticks out. Is there any kind of "exception specification" so a user can know what functions "throw" what (or fulfil what "exception safety guarantees")? (or maybe that's just something that could be relegated to an IDE tool).
  2. So... not available on Steam in the UK, instant crash to desktop then a 1Gig patch. That's classy THQ. Real classy.
  3. sprite_hound

    From: Opengl texture quality

    Also, try GL_CLAMP or GL_CLAMP_TO_EDGE instead of GL_REPEAT. (Should get rid of the extra black pixels at the bottom).
  4. sprite_hound

    C# Game Programming: For Serious Game Creation - Completed

    Yup, I get the same "alutLoadMemoryFromFile failed" error.
  5. sprite_hound

    C# Game Programming: For Serious Game Creation - Completed

    Well, I don't know what the assertion actually is (I guess it comes from somewhere deep inside the LoadSound function since there's one error message for each sound), but in any case relative paths are probably the way to go. No sounds actually seem to play once I'm in the game after getting those messages. After playing again for a bit, I don't think the bullets are so bad. I think I was just slightly surprised by the way the player's ship velocity is added to the bullet velocity (which is technically correct, I guess, but I think slightly unusual for an arcade style side-scroller (not that I've played many recently...))
  6. sprite_hound

    C# Game Programming: For Serious Game Creation - Completed

    I get the same SoundManager errors as zarfius (just clicking ignore on the message box seems to work). I don't see why it would be anything to do with a sound card though. Possibly just a sound file in the wrong place or something? In the game itself, I was at first confused by the player starting off the screen to the left. Also, the movement is a bit odd for a side-scroller, in that the ship actually turns in the direction it's going, rather than just moving up / down while facing the same way. Personally, I was disappointed that the ship bullets don't travel very far (made it rather hard, but perhaps I'm just not very good at it).
  7. [subheading]Yet Another New Project[/subheading] Time for yet another new project: a 3D space shooter using the Unity engine, tentatively titled Star Blaster. (A quick google indicates at least 2 other games with the same title exist, so I'll probably change the name when I've thought of a different one). Since Gamedev are awesome enough to allow hosting working Unity apps with the GDNet webspace (big thumbs up for that), I shall try to upload the latest build as frequently as possible, and keep a log of changes made here. It's not going to be anywhere near a decent game for quite some time (and the graphics will likely suck for just as long), but feel free to provide any feedback here. The latest build can be found here. [subheading]Current Features[/subheading] What's implemented so far is very basic: You can fly the ship around, and it's followed by the camera. \o/ The camera is attached via a configured 6DOF PhysX joint, with springs to return it to the defined anchor rotation behind the ship. I'm pretty happy with how this has turned out, though it might need a bit of adjustment when there's more than one ship type in game. The ship control scheme is WASD for forwards, backwards and strafing, and mouse for pitch / roll. The space bar provides an additional booster, and left shift cuts the engine and turns off drag ([size="2"][font="Arial"]a[/font] la Freelancer's tab / z keys). I'm not really sure I like the pitch / roll model, and will probably implement a rotate towards type thing for comparison (the real test probably will come when turrets / shooting exist). [subheading]What's Next?[/subheading] First up is fiddling with the Unity WebPlayer Template to show a keyboard layout below the WebPlayer. Then I probably need to think up some sort of hardpoint system, for simple creation of different engine types / effects and weapons turrets etc. See the next page for ongoing progress this week. [page] [subheading]Progress Log[/subheading] Keyboard layout image created and placed below WebPlayer (a bit ugly, but it'll do for now).Thruster fitting logic and placeholder particle effect added (thruster drains linearly over time and recharges non-linearly).Changed the engine particle effect (figuring out the best general settings to base future engine effects on and enabled multiple particle systems per effect).Changed the skybox (now one of the Spacescape presets). It's amazing how much better it looks just with this. I'll play with Spacescape some more later - seems like a pretty nice tool.Changed the thruster effect to be the base engine effect (scaling particle velocity with current ship acceleration force). Added rather rubbish looking smoky effect as a thruster effect.Experimented with engine trails, but they don't work very well. Mainly because the thruster / engine effects are done in local space, rather than world space, so they stick out in a different direction. Changing the engine effects to worldspace just doesn't look very good, so I'm leaving engine trails out for now.Wing-tip vortex trails, however, look quite shiny, so they stay in.Fixed bugs in thruster logic (ship can now go backwards, thruster turns off properly when out of energy).Ship is now twice the size it was, and goes much faster and accelerates quicker (adjusted particle effects to match).Added a couple of numeric readouts to the HUD (the top one is ship speed (velocity magnitude) and the bottom one thruster energy remaining)).Toolitps now work (kinda fiddly working out the offset / text alignment so that they show on screen no matter where the item being hovered over is located, but it's done now)."Parking brake" turns off mouse input and decelerates to a stop (enter key). Turned off by using one of the normal movement keys.Parking brake added to keyboard map and player starts parked (currently called "All Stop" - might need a better name later).GUISkin created for HUD (no visible difference, but will be useful later).Simple muzzle flash exists as place-holder, triggered when firing.First attempt at turrets is in. Turrets have a base, stem (yaws left / right) and barrel (pitches up / down) and aim at where the mouse is. Still needs some tweaking.Eliminated barrel jittering (up vector now properly recalculated).Added tracking speed to turrets (probably leave this high enough to be nearly instant for most turrets, but lower for torpedo type things). [subheading]To Do Soonish[/subheading] Proper weapon slots / groupings.
  8. sprite_hound

    Dialogs and stuff

    What the heck? You killed Otto. After he was so nice to you and everything. Umm, anyway. Pretty cool.
  9. sprite_hound

    Unity Asset Store

    I'll certainly be curious as to how you get on, as I've been considering doing something similar recently.
  10. sprite_hound

    Almost 7 days of social news and plenty of "News" updates!

    It might be nice if the "7 Days" and "30 Days" options for the news said "Top in 7 Days" / "Top in 30 Days" to be consistent with the "Top in 24 Hours" item in the drop down menu.
  11. sprite_hound

    Tri-planar textures and bump mapping

    Last summer I started on a project that stalled largely due to my apparent compulsion to write engines, not games, excessively ambitious scope, lack of a realistic project plan and a masochistic hardware target (OpenGL 4.x). However, since ATI seem to have fixed a couple of driver bugs that were plaguing development (for loops with uniform conditionals, and a hideous driver crash), I spent the weekend fiddling with lighting and bump mapping. Even with just two rather amateur test textures I don't think it looks too bad: The bump mapping was a bit painful, due to using tri-planar texturing for the terrain. While the relevant GPU Gems article touches on the subject of bump mapping, it doesn't really go into detail. Still, I seem to have ended up using a hacky method similar to the code in the article. The scribbles below show my thinking out the tri-planar texturing method, and the coordinates needed. I'm using the same texture on multiple "sides" of the projection for the moment, and seem to have a slightly different mapping from the article (notice that on all the sides of the cube UP is upwards, not on its side). Splitting out the 6 cases I wanted, the correct texture coordinates can be figured out from the world (/object) space position (they can be combined into 3 by using the sign of the relevant normal). So far I've not managed to properly generate tangents to perturb the normal, so I'm just swapping the x / y displacement to the relevant world-space axis each for the tri-planar projection, adding it to the normal and normalizing. This is what the bump vector is on the right of the scribbles. And here's a test image of the terrain using the tri-planar projection: The snippet of glsl below shows the end result of the scribbles in code. I'm currently using a default texture, and an array of alpha maps / other textures - I might simplify this to include the default in the array at some point. I'm using noise to sharpen and randomise the transition between different textures - this could also be improved, perhaps taking into account the bump map. // get terrain normal (already normalized) vec3 normal = texture(NormalsTexture, TexCoords).rgb; // calculate triplanar texture weights vec3 tpweights = abs(normal); tpweights = (tpweights - 0.2) * 7.0; tpweights = max(tpweights, vec3(0.0)); tpweights /= tpweights.x + tpweights.y + tpweights.z; vec3 signs = sign(normal); vec2 tpcoord1 = vec2(vec2(-signs.x * Position.z, Position.y) * DetailTexCoordScale); vec2 tpcoord2 = vec2(vec2(signs.y * Position.x, -Position.z) * DetailTexCoordScale); vec2 tpcoord3 = vec2(vec2(signs.z * Position.x, Position.y) * DetailTexCoordScale); // noise value for blending float noise = 0.0; noise += tpweights.x * texture(NoiseTexture, tpcoord1 * NoiseCoordScale).r; noise += tpweights.y * texture(NoiseTexture, tpcoord2 * NoiseCoordScale).r; noise += tpweights.z * texture(NoiseTexture, tpcoord3 * NoiseCoordScale).r; // collect detail texture data based on alpha maps float alpha_accum = 0.0; vec3 detail_color = vec3(0.0); vec3 detail_normal = vec3(0.0); for (int i = 0; i != NumDetailTextures; ++i) { float alpha = texture(AlphaTextureArray, vec3(TexCoords, i)).r; // modulate alpha value with noise, to get sharper, but noisy transitions alpha = smoothstep(0.48, 0.52, alpha + noise - 0.5); // calclate triplanar detail colour vec3 dc = vec3(0.0); dc += tpweights.x * texture(AlbedoTextureArray, vec3(tpcoord1, i)).rgb; dc += tpweights.y * texture(AlbedoTextureArray, vec3(tpcoord2, i)).rgb; dc += tpweights.z * texture(AlbedoTextureArray, vec3(tpcoord3, i)).rgb; detail_color += min(alpha, 1.0 - alpha_accum) * dc; vec3 bump1 = tpweights.x * normalize(texture(NormalTextureArray, vec3(tpcoord1, i)).rgb * 2.0 - 1.0); vec3 bump2 = tpweights.y * normalize(texture(NormalTextureArray, vec3(tpcoord2, i)).rgb * 2.0 - 1.0); vec3 bump3 = tpweights.z * normalize(texture(NormalTextureArray, vec3(tpcoord3, i)).rgb * 2.0 - 1.0); vec3 dn = vec3(0.0); dn += vec3(0.0, bump1.y, -signs.x * bump1.x); dn += vec3(signs.y * bump2.x, 0.0, -bump2.y); dn += vec3(signs.z * bump3.x, bump3.y, 0.0); detail_normal += min(alpha, 1.0 - alpha_accum) * dn; alpha_accum = min(1.0, alpha_accum + alpha); } // fill remaining alpha "space" with default detail colour vec3 ddc = vec3(0.0); ddc += tpweights.x * texture(DefaultAlbedoTexture, tpcoord1).rgb; ddc += tpweights.y * texture(DefaultAlbedoTexture, tpcoord2).rgb; ddc += tpweights.z * texture(DefaultAlbedoTexture, tpcoord3).rgb; detail_color += (1.0 - alpha_accum) * ddc; vec3 bump1 = tpweights.x * normalize(texture(DefaultNormalTexture, tpcoord1).rgb * 2.0 - 1.0); vec3 bump2 = tpweights.y * normalize(texture(DefaultNormalTexture, tpcoord2).rgb * 2.0 - 1.0); vec3 bump3 = tpweights.z * normalize(texture(DefaultNormalTexture, tpcoord3).rgb * 2.0 - 1.0); vec3 ddn = vec3(0.0); ddn += vec3(0.0, bump1.y, -signs.x * bump1.x); ddn += vec3(signs.y * bump2.x, 0.0, -bump2.y); ddn += vec3(signs.z * bump3.x, bump3.y, 0.0); detail_normal += (1.0 - alpha_accum) * ddn; // hacky normal mapping normal = normalize(normal + detail_normal * BumpScale); I'm still not 100% satisfied with this, and will probably try out the method of generating a tangent basis touched upon in the GPU Gems article and see if it looks better. In the mean time I'd love to hear if anyone else has done any bump mapping with tri-planar texturing, and how you got it to work. Cheers, __sprite
  12. sprite_hound

    Creator of Worlds Testbed

    I tried it, but the lua interpreter can't seem to find modules that are required... do I have to copy certain files around or fiddle with my LUA_PATH? EDIT: I found that setting [code]package.path = ".\\?.lua"[/code] before the dofile call worked fine.
  13. sprite_hound

    A Picture

    Deferred lighting: Because it's pretty.
  14. sprite_hound

    What's this?

    It is a top down view of a lighting test for a level? (or something)
  15. sprite_hound

    What happened to the OpenGL community?

    It's pretty much all about the specs for me. Admittedly I'm not very into OpenGL coding at the moment (I'm using Unity for most things). I used to read the extension files, but are there that many cards that support extension features (presumably for 4.0, so things like tessellation / transform feedback?) that don't just support the creation of a better context in the first place?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!