RSS
 

Archive for the ‘Games’ Category

Items, AI, death and HUD

01 May

Done loads of stuff since I woke up 4 hours ago or so… Not so much as I actually needed to finish this like I’d like, but good nevertheless…

Got the item system working (scripted), and implemented the first item (the Wand of Unsummoning)… All its behavior is script driven, which is quite nice. It fires bolts of magic that unsummon the evil rabbits.

Also finished the rabbit AI (just wander and chase the player if it gets too close). Player can now be hit by the rabbits and die:

Most of the gameplay code is done, still need the flow code (main menu to level, level to another level) and win situation (getting to the end of the area), besides music and sound… So, a whole lot of work still ahead!

Task list:

  • Framework working
  • Loading a level data (from a DDS image)
  • Rendering the level (3d generated from the level data)
  • Drawing the character
  • Rendering character
  • Design levels/items so I know what to implement
  • Spawn points
  • Bind spawn points to scripting events
  • Draw “old man” and do speech system (seems like a polish thing, but it’s kind of important…)
  • Give and take objects to the player (through scripting)
  • Spawn creatures and give them rudimentary AI (also through scripts)
  • Draw and animate imps
  • Wand of Unsummoning
  • End of level (portal thing)
  • Main menu
  • Title screen
  • Game over screen (?)
  • Sound
  • Music
  • Level 1
  • Level 2
  • Level 3
  • Level 4
  • Level 5
  • Load/Save
  • ….
 

Unholy Rabbits!

30 Apr

Dinner was great:

And after, well, I started by drawing some imps, but the end result was that they looked more like hell-rabbits than imps, so I decided to change the story…

They have a particle system to be more hellish…

Anyway, they already wander around (they don’t give chase yet), and all is script driven (which is quite nice)…

Anyway, I’m calling it for today… 24 hours still to go, and I have most of the actual game to make (including the object management, etc). Anyway, I should be able to finish this one, at least enough for the compo…

Task list:

  • Framework working
  • Loading a level data (from a DDS image)
  • Rendering the level (3d generated from the level data)
  • Drawing the character
  • Rendering character
  • Design levels/items so I know what to implement
  • Spawn points
  • Bind spawn points to scripting events
  • Draw “old man” and do speech system (seems like a polish thing, but it’s kind of important…)
  • Give and take objects to the player (through scripting)
  • Spawn creatures and give them rudimentary AI (also through scripts)
  • Draw and animate imps
  • Wand of Unsummoning
  • ….
 

Speech system

30 Apr

And the speech system is in-place… Was a bitch getting right: getting the projected position of the 3d position of the speaker so I could write the text there, center the text, script binds, etc…

Was hard making it visible in all circumstances aswell… Finished writing the text twice, one in black and offset and then in the normal color… Worked quite well…

This is finally shaping up, although it’s not even close to being a game… Next step is probably to draw and animate the imps, making them spawn in their proper positions and giving them AI… Probably will call it then…

Task list:

Task list:

  • Framework working
  • Loading a level data (from a DDS image)
  • Rendering the level (3d generated from the level data)
  • Drawing the character
  • Rendering character
  • Design levels/items so I know what to implement
  • Spawn points
  • Bind spawn points to scripting events
  • Draw “old man” and do speech system (seems like a polish thing, but it’s kind of important…)
  • Give and take objects to the player (through scripting)
  • Spawn creatures and give them rudimentary AI (also through scripts)
  • Draw and animate imps
  • ….
 

Old man…

30 Apr

This last hours don’t show much improvement visually:

But below the hood, I’ve done tons of stuff, mainly a Lua-based scripting system capable of driving cutscenes and other game events! Really proud of it, since it can really makes the code cleaner and handling of the lifespan of objects easier…

The old man in the screenshot appears in a cloud of smoke and will give the object needed for the current level… Just need to add the talking component, which shouldn’t be too hard…

Problem is that I’m running short on time (30 hours to go, but I won’t work that whole time, since I have to rest a bit for work next week… )…

Task list:

  • Framework working
  • Loading a level data (from a DDS image)
  • Rendering the level (3d generated from the level data)
  • Drawing the character
  • Rendering character
  • Design levels/items so I know what to implement
  • Spawn points
  • Bind spawn points to scripting events
  • Draw “old man” and do speech system (seems like a polish thing, but it’s kind of important…)
  • Give and take objects to the player (through scripting)
  • Spawn creatures and give them rudimentary AI (also through scripts)
  • ….
 

Got a character!

30 Apr

This has been slow going, but on the bright side, my character doesn’t look like total puke (just like semi-puke)! 🙂

After a great lunch, courtesy of my awesome wife:

got the character moving through the level, with collision detection (my old nemesis… I always get stuck on this and end up with ugly code!)… Even have a small shadow on his feet (helps the visuals, not looking like he’s floating)… The ground texture now seems terrible, so I probably need to work on that (think I just need to tweak the contrast a bit)…

Now I need to take a step back and think what I want to do with the game from here on… Current task list:

  • Framework working
  • Loading a level data (from a DDS image)
  • Rendering the level (3d generated from the level data)
  • Drawing the character
  • Rendering character
  • Design levels/items so I know what to implement
  • Spawn points
  • Bind spawn points to scripting events
  • Draw “old man” and do speech system (seems like a polish thing, but it’s kind of important…)
  • Give and take objects to the player (through scripting)
  • Spawn creatures and give them rudimentary AI (also through scripts)
  • ….
 

Level loading and rendering…

30 Apr

This is not going too well, loads of small things in the 3d system going wrong (why do I insist on trying 3d for this!!!!)… this one ended up just being a small problem in the redundant renderstates checking (was initializing the value with the wrong number)…

Anyway, I can now load a level from a DDS file:

And create level geometry… already had the idea of having just one huge level (works well with my idea) so I already prepared this so it has some clustering done (NxN blocks per mesh, so I can do culling easily)…

Also added texturing so this doesn’t look so ugly… Only use one texture for the whole level, but it has a kind of atlas that I can setup easily:

My graphic skills suck so badly…

I’m having 3d billboard as “characters” in the game, so no modelling is required…

So, my current task list is:

  • Framework working
  • Loading a level data (from a DDS image)
  • Rendering the level (3d generated from the level data)
  • Drawing the character
  • Rendering character
  • Design levels/items so I know what to implement
  • ….

Now I need to get a story going, so I know what to draw as a main character…

 

Ready to start…

30 Apr

Hey all! So the theme was kind of unexpected (“It’s dangerous to go alone… Take this!”), although it won with a big margin!

Saw the theme at 3am (local time) and after discussing it with my wife, she gave me a good idea and I just built on that… On my game, the player will have an item given at the start that modifies in some way the “game world” and he has to pass through the level using it… The cool thing is the item has usually a “bad thing” associated with it, so it really makes the level more dangerous, not less! Should be able to pull this off…

Desk shot: 

Alread loads of cool stuff lying around… Task list:

  • Framework working
  • Loading a level data (from a DDS image)
  • Rendering the level (3d generated from the level data)
  • Drawing the character
  • Rendering character
  • Design levels/items so I know what to implement
  • ….
 

Back… I think…

26 Apr

Well, there go my good intentions… work and laziness have won, and I’ve not been updating… But I’m going to try to change that again, starting this weekend: another Ludum Dare competition!

I’ll probably participate in it, using my usual framework, that needs some more work on it, since I want to add support for skeletal animation (through my own Reality format)… I want to try my hand in designing some 3d characters and animating them…

On the game playing front, not much going on… Played through "Dragon Age 2" and I’m playing "Metal Gear Solid IV" (which I probably won’t be finishing), besides loads of "Band Hero" and some "World of Warcraft".

dragon-age-2-capa1-550x463

"Dragon Age 2" was nice, but it’s nowhere as good as Mass Effect… the CRPG component (the stats and skills part) is almost absent (it’s a very basic system, in which you really don’t really feel any impact on the decisions you make), but the RPG part was actually very good, since I felt my decisions impacted the game world and the distinction between "good" and "bad" decisions was very blurred in some instances, which made it more "real". The gay thing everybody’s talking about was taken a bit too far, in my opinion… I almost felt raped (and I think this runs a bit against the whole "gay is a choice, not a disease" vibe the developers wanted)… Another bad decision (in my humble view, of course) was the fact that the "troubles" were too local… although it ends up being more "real" and different from the usual "thou must taketh the artifact to somewhereth elseth", it takes a lot of the "epic" from it…
In other perspective, the graphics were sometimes appallingly bad (except for the facial rendering, which was very good, although a bit wooden in terms of expressions, but that’s to be expected in this kind of massive games), but it was a competent affair most of the time.
All in all, the game is interesting, and I had a good time playing it, but I think the series is going in a direction I don’t care much for (but again, this is a matter of taste)… 7/10

On the other hand, "Metal Gear Solid IV" is terrible…. I fail to understand why people loved this so much… the story is convoluted and makes little sense (and the sense it does seems like a soap-opera), the graphics are average, the storytelling is erratic, the missions are dreary and punishing (checkpoints at the beginning of the level only?! What is this, 1985?!), terrible controls…
Don’t get me wrong, I don’t have anything against the series as a whole, I loved the first 2 MGS, they had proper pacing (even if the story was already terrible), but this one is just a grind to get to the next (idiotic) cutscene… Maybe the problem is me, but I think that a stealth game should give us enough stealth opportunities, with loads of different paths, etc, and not make us wait behind a car for 1 minute for the patrol to go away, for lack of other paths… this hurts when you’re doing the scene for the n-th time, always getting a bit further using stealth… I end up finishing the levels by shooting everything, which kind of defeats the whole "tactical espionage" thing, in my opinion… 4/10…

Since I’m just bitching about stuff… I’ve been working on an iPad application for work… and I hate Macs more and more each day… 🙂 The fact that I connect my nice keyboard to it and it still doesn’t map all keys correctly (not even using Ukalele and other such applications) pisses me off to no end… And don’t get me started with XCode! I’ve ended up mapping a directory of the iMac to my harddrive and just using Visual Studio to develop, just using the iMac as a compiler (BTW, if you want to share a keyboard and a mouse only, without need for video, take a look at Synergy, which is a software-only solution for multiple systems, which is pretty cool if you want to do stuff like I’m doing)…
Even so, I’m still stuck with debugging with XCode, which is terrible for a person that’s used to Visual Studio’s debugger… I know half the problems I have with it might be solved with some web-searches, etc, but how hard would it be for me to be able to see the contents of an STL vector right in the debugger window out of the box?!
The iPad itself is not a bad piece of hardware, my application runs lots of triangles (even a bitmap based font renderer, which is pretty triangle heavy) without any big problems… I can definitely see the potential for gaming in that platform, although I don’t think most games play well there (the ones that use a "virtual d-pad" and stuff don’t work too well for me); but it’s easy to see the appeal for independent game developers… I’m more of a PC-dev guy, since most my game ideas are of a different focus that doesn’t translate well for iOS devices.

So, that’s it for now… Hopefully I’ll be more regular again from now on… want to get my hands on that "Portal 2" thingy, and Pixel Junk’s "Shooter 2", besides improving on my artist skills, so I can do better on competitions…

 
 

Blizzard turns 20…

11 Mar

Didn’t had the time to write anything decent this week, but didn’t want it to go by without sharing this video with you:

http://eu.blizzard.com/en-gb/company/about/b20/videos.html#blizzard-retrospective

It’s a nice retrospective of one of the most influential game development companies in the world, and it has some nice trivia and behind the scene looks… It’s really something, thinking that a small group of dedicated people could create something like that!

Another good link to share was written by David Amador on his blog, and he talks about motivation and game development, check it out at http://www.david-amador.com/2011/03/so-where-is-that-motivation/

And that’s it for this week… Work has been hectic, but I’m almost reaching the first deadline of an important project, and most stuff should be simple and neat from here on, so I expect to have more time for game dev stuff in the near future!

 

Shadowmap LOD

18 Feb

ShadowmapLOD

This week I’ve been working on the LOD system for the shadowmaps…

Using the idea that I can have about 60-70 lights per area on the game, I can’t update 1024×1024 shadowmaps every frame… Well, I could, but I’d get 0.5 FPS (I tested it for fun)…

So, I decided to play with 4 variables:

  1. Multisampling: 16 samples per pixel take some time to render, even in today’s video cards, so I can’t have all lights multisampling
  2. Resolution: 1024×1024 to 64×64 shadowmaps give me quality on those that are near, but still have some quality on stuff that’s far away
  3. Update rate: Updating all shadowmaps (even the 64×64 ones) is slow, because of all the setup time, changing rendertargets, etc…
  4. Turning off shadows at a distance

Number 4 got removed from my LOD algorithm. The reason for this is that in some angles, the difference in lighting is actually pretty big… the shadows are necessary to keep the light confined to the room where the light source is.

So, what I do is that I do the nearest N1 lights with multisampling+256×256 shadowmaps+update all frames, then I do N2 lights with 128×128 shadowmaps+update every 4th frame, and so forth…

On my test case, I have 120 lights, and I defined that I could do 10 updates per frame… I defined circa 22 categories with different resolutions and update rates, and I set the category of each light per frame, based on distance.

On my video card (a NVidia GTX 465), I get about 200 FPS average with this scene (which is very simple, not many texture switches)… In a real case, this will of course not be the frame rate, with all the setup of objects, etc, but I still have some tricks up my sleeve (group up all static objects in a few DIP calls for shadowmap rendering, separating objects that might have alpha-test from the others so I don’t need to use texture swaps, change the criteria of the lights, even going back to not having shadowmapping in lights that are too far away).

Anyway, I’m very happy with the results, specially considering that the game will not feature a camera so close to the shadows as on the above screenshot. This, combined with the ambient occlusion map rendering, will probably be a good rendering solution for the game.

Now I’m going back to work on the editor I’ve been working on and off for one year… Never added 3d capabilities to it, so it will be a neat challenge, but I hope that in the next few weeks, my artist can start creating levels with decals and such stuff…