# mattdev

Member

32

182 Neutral

• Rank
Member
1. ## Help with 2d Lighting Algorithm[SOLVED]

You want int xDiff = myx-x; int yDiff = myy-y; int distance = sqrt( (float) (xDiff*xDiff+yDiff*yDiff) ); instead of int distance = sqrt( (float) ((myx-x)^2+(myy-y)^2) ); "^2" doesn't square things, in C++.

4. ## Fish

Very cool fish :) I imagine he's just using the vertex coordinates (scaled) for UV's.
5. ## Udo progress

Very cool, I too am glad you're carrying on with Udo :)
6. ## Let the carnage begin...

I don't know how you have enough hours in a day to get all this work done. One minor thing: maybe you should use a variety of explosion textures (or just modulate each particle with a slightly different colour), they all look quite similar at the moment. Otherwise, brilliant :)
7. ## lightmaps

Lightmaps are working :). Currently I'm just using N.L as the lighting calculation, radiosity is next on my list... and I'm assuming that'll be the harder part. Screenshot (the stuff in the background is from not clearing the target each frame):
8. ## Untitled

It's been a while since I last updated... since then, I got the game to a state where it was playable and fun for a few minutes. I would need to add some more enemies/spells and spend an age balancing everything if I wanted to release it like that (and I'm guessing I can't just use all those MD3s without permission...). I can't really bring myself to spend time doing that. So I decided to just press on in a different direction. I changed the camera angle to behind the player, and slightly to the right of him (trying to emulate what I've seen of Gears of War ;)). I also brought out an old 3DS Max exporter that I wrote, exported some geometry, and wrote some code to read that into the engine. Finally, I read through this excellent article and managed to implement collision detection for the character (which seems to work 99% of the time...). So you can now run around in a little (un-lit) level, without going through walls. The rest of the game is still in there at the moment (although everything that was meant to be viewed top-down looks totally wrong when viewed from this angle, like the blood effects etc.). I'm not really sure what I want to do with what I've got now; I'm pretty confident that I don't want to finish the game as it was (a clone of Crimsonland), but I'm still quite keen on having ultra-simple gameplay. My current thoughts: keep it outdoors-based, where the player shoots oncoming hordes of enemies, but have little "towns" consisting of indoor areas, which the player can go back to occasionally. In the town(s) he can spend cash (buy items, etc.) that has been earned off killing monsters. So... very much like Diablo, except 3D, and without any of the dungeon/quest-type stuff. Anyway, all of this stuff I'm adding to the engine is relatively reusable, so even if I change my mind about the above paragraph within the next few days, I won't have been wasting my time ;P. Next step will be to generate some lightmaps for this geometry. Finally, a screenshot of some geometry with a single texture on it... the ground plane that I was using before is still sticking through there.
9. ## Early Rain effect + Order icons

The rainy atmosphere you've got there is really convincing. And congrats on 100k journal views!
10. ## Best. Weekend. Ever.

Nice work, it's looking great!
11. ## HUD stuff

Looking good, you're really getting through this stuff quickly.
12. ## videos

Heh, thanks :)
13. ## videos

Not much new to report for the game, just been cleaning up code & fixing bugs. I've also been playing around with C# recently... seems really cool. There was actually a point to posting this entry, however! I made two short videos of the game; they're ultra low-res; that's all Fraps can manage to output on my laptop, I'm afraid. Anyway, here they are: video 1, just showing me running around and killing some doods video 2, showing spell effect pixel shaders
14. ## Update

That video's really amazing. Keep it up!
15. ## Rargh.

I spent the last day or so trying to work out why my game wouldn't run outside of Visual Studio. It ran fine in the IDE, no problems. Eventually I worked out that I could get it to run *sometimes*, if I linked with the multi-threaded CRT, as opposed to the multi-threaded DLL CRT. It's comprised of two parts, by the way... my engine, which is a DLL, and the game (which is an executable, obviously). Finally I ran into this article, which suggests that I need to do some fancy stuff with exporting STL objects if I'm using a DLL. I don't know if that article applies to VS2005, though.. it seems to be targeted at VS 6.0, and other URLs such as this seem to suggest that if I'm using one CRT consistently (which I was already doing) in a post-6.0 version of VS, I shouldn't need to do anything special... Anyway, I tried that for a while, without much luck. Eventually it dawned on me that I don't really need my engine to be a DLL, so I made it a static library and all seems (relatively) fine now. At some stage during all this, I took a break and tried my hand at modelling a head in 3DSMax. Considering I've got very little artistic talent, I was quite pleased with the result. The head is still a bit oddly shaped, though. I might try fix it up later today, and then attempt to make a body for it.