Saturday, June 19, 2010

Space Swine gameplay

I posted a video a few days ago showing off how the particle effects are coming along and you can see waves 1-10 with the first boss at the end. For those just coming to the site, Space Swine is our new game for Xbox LIVE Indie Games. You can check out the announcement trailer for some more info here: http://www.youtube.com/watch?v=Gr_qsUL0vpc

Wednesday, June 16, 2010

Stress testing and optimizing

So we're at the point where I need to start making sure everything runs as smooth as it can for Space Swine. I've been going through some slow points in the code to speed them up. I'll run through a few things that I learned NOT to do while making the game. Now I'm no expert by any stretch so some of these may seem obvious but it's what I learned along the way and maybe it'll help someone else out.



  • Creating textures/sounds on-the-fly. Every wave I'm creating up to 30 or so new enemies and every time an enemy was created it was loading a texture and a death sound for that particular enemy. When this all happens on one frame you get some pretty big lag spikes which are no good. I ended up preloading everything which eliminated the lag spikes when I was creating enemies. Instead of multiple instances of a single texture, which never change, there's now just a single one always available. To further improve the performance, I could create a set amount of a certain enemy before the game even starts, and 'reuse' enemies that are currently inactive. More on this in a later bullet point.
  • Updating strings every frame is also bad. In between waves, when absolutely nothing was going on I have some text popup on the screen that counts down to the next wave, shows the wave number, and on every 10th wave shows the current health/damage multiplier. For the countdown timer it just counts down from 3, using Math.Ceiling(...) so it goes 3...,2...,1... and then the wave begins. Maybe it was the math being called 60 times a second that was slowing it down, I didn't check. Anyways I fixed it by making a new method called UpdateHUD(...) and I set it on a timer (Nick Gravelyn's Timer/Interpolator code) so it only calls it once per second. Instead of calling it 60 times a seconds, which is overkill, it only calls it once a second which greatly helped out. I also attached the same concept to the player's HUD so it only updates once a second. The player HUD has a lot more elements being updated so that slowdown was even bigger until I changed it.
  • Be wary of particles. Nearly every game has them nowadays and if you don't keep a close hold on them it can get out of control. I'm using the Project Mercury Particles source code for my particles and it's pretty awesome because it comes with an editor. I never had any problems with it until at one point in my game there were up to 20 rockets on the screen, each with a little fire trail behind it. I'm not really sure on the number, but I think I was allowing them to create 32 particles a frame, with a max of 1000 total. I used the same particle set for all rockets, so they had to split 1000 particles between each other. That 1000 particle limit was getting hit almost instantly when the particles started showing up and I was getting pretty big spikes because of it. I ended up lowering the quantity of particles they were allowed to create per frame from 32 to 6 or so. And the big kicker is that it looks nearly identical to how it did before, and now there's no slowdown.


Now for a few things that worked out very well. As I mentioned in the first bullet point, creating a bunch of something at the very beginning, then using a variable to set them active/inactive when you need them works very well.

  • First off, you're not creating new objects, along with everything inside of that object, you're just setting them inactive as soon as they die. Instead of creating an all new one when you need it, you just set an inactive one to active. I used this concept for all of the bullets for players/enemies. Each player can have up to 100 bullets active at any time, and you can have up to 4 players. That's 400 bullet objects on the screen at any time just for the players. The enemies, while they vary per type, can have up to 16 I believe and most bosses have up to 50. But as I mentioned above you can have up to 30 enemies on the screen at any time so that all adds up to maybe 700/800 bullets on the screen at once. To ever hit a situation like that would be very rare, but it's totally possible so I had to plan for it.
I'm currently working on one slowdown that I haven't figured out a solution to yet and it has to deal with my scoring system. I have it so every time a bullet hits an enemy you get 12 points. That way when playing multiplayer the person hitting more enemies will have the better score which I think seems fair. Adding the score is inside of a for loop which runs through all of my bullets, then all of the enemies, to check for a collision. So basically if a bullet collides with an enemy you get 12 points then the bullet gets set to inactive until needed again. Just a single line of code is causing a FPS drop from 60FPS to about 45 with 4 players constantly shooting. Here's the culprit on my todo list. I'm thinking it has something to do with being called every frame AND inside of a double for loop checking every bullet/enemy for a collision. Weird that such a simple line can have a dramatic performance decrease!

score += scorePerHit;

Tuesday, June 15, 2010

Sony's press conference

1) Killzone 3. Demo is shown in 3D and there's a lot of jetpack action. Use it in quick bursts to give yourself life then glide to the ground. Another demo is shown where you're commanding a turret on some kind of gunship. PlayStation Move capability at launch, more about that in the coming months. February 2011.

Motorstorm Apocalypse, The Sly Collection, Gran Turismo 5 and Killzone 3 all in 3D. Crysis 2, Mortal Kombat, ShaunWhite snowboarding, Tran Evoluion, NBA 2K11 and plenty more also to take control of Move and 3D in some way or another.

2) Sorcery. Using the Move to cast spells. Flick your wrist at any position to change how it's cast. He selects a potion and shakes the Move to activate the the potion before he drinks it. The demo seemed really responsive and I couldn't see any lag whatsoever. Spring 2011.

3) Tiger Woods. 1-1 motion makes for a near real life experience. First swing he digs the club into the ground, but from there on everything works pretty flawlessly. An update to the game will allow Move functionality when it ships later this fall.

4) Heroes on the Move. Jak, Daxter, Sly Cooper, Ratchet, Clank and Bently all together in what looks like an action game.

5) PlayStation Move. Europe September 15th, North America September 19th and Japan on October 21.$49.99 if you have the Playstation Eye and a PS3. Navigation controller = $29.99. Bundle w/ Eye, navigation controller and Move = $99.99. PS3 Bundle w/ everything = $399.99.

6) Metal Gear Solid: Peace Walker, InviZimals and God of War: Ghosts of Sparta stated for PSP along with others.

7) Little Big Planet 2. A few mini games are shown including a 'don't touch the edge' type game where you must try and push your enemies into the edge of the circle while using a boost option. The editor gives you a ton of features and they show a racing game, a shooter game and a real-time strategy game.

8) PlayStation Plus. Options to expand and enhance their experience. Digital content, early demos/betas, PlayStation Network games and themes. This expands the (free) PlayStation Network to users who pay $49.99 a year.

9) 2 titles with exclusive content to the PS3:
-Medal of Honor.
-Dead Space 2 + Dead Space: Extraction w/ Move support.

10) Portal 2. Gabe Newell comes out to announce Portal 2 for PS3! With Steam support (automatic updates and such) he says the PS3 version of Portal 2 will be the best of any console. Summer 2011.

11) Final Fantasy XIV. The MMO has a quick trailer to show off some beautiful cutscenes.

12) Mafia II. Exclusive day one content only on PS3.

13) Assassin's Creed: Brotherhood. More exclusive content and multiplayer beta only on PS3.

14) Gran Turismo 5. We've seen this game plenty of times now and it looks better and better each time. We saw an actual release date for the game! Will also support 3D. November 2, 2010.

15) Infamous 2. Announcement trailer complete with ice powers. 2011.

16) Twisted Metal. Exclusively to PS3 in 2011. Back with all new helicopters, what looks like Grim Reaper throwing a chainsaw and someone sniping out of a window. Deathmatch and Nuke gametypes shown off. Nuke is basically capture the flag bringing the enemy leader back to your base and holding him in your capture area for a set amount of time. Once you hit that time limit a missle is launched that you must direct into the enemies statue without helicopters shooting it down. First to 3 wins.

Overall, the PlayStation Move looks really exciting and it played pretty flawlessly. Steam coming out on PS3 is also pretty exciting and I wonder if that means more Steam games will eventually move their way over to the PS3. I've never really been a fan of motion control games but maybe getting some hands on play with one of them will change my mind on the subject. I haven't really been excited for Twisted Metal since the first one so hopefully the new one will change things up a bit.

Nintendo's press conference

1) Zelda: Skyward Sword. New Zelda game, using the WiiMote + nunchuck is used to control the shield and sword in the game. Different combinations of movements will use different attacks. From the demo, he has to use certain attacks to kill enemies. He needs to use a vertical slash to kill a certain enemy and it takes the creator even a few tries to get it right. While it seems like a cool concept there seems to be a lot flawed with it currently. Everything he tries to show off takes a few tries to get it right. Cool concepts but still a long ways to go. Coming out sometime 2011.

2) Mario: Sports Mix. Mario's back, and this time he's playing dodgeball, basketball and volleyball. Coming in 2011.

3) Wii Party. 13 different party games modes. Board Game Island, Balance Boat and House party games are mentioned. 70+ mini games. Coming this holiday.

4) Just Dance 2. 40+ hit tracks, duets, dance offs and up to 8 players. Fall 2010.

5) Golden Sun: Dark Dawn for Nintendo DS. This holiday season.

6) Goldeneye 007. Bringing back characters we love with plenty of game modes, exclusively on the Wii. Daniel Craig is replacing Pierce Brosnan in the game. This holiday.

7) Disney Epic Mickey. Use paint thinner to remove anything from the game. Dynamically change the game world with all kinds of different effects. You can also use paint to add things to the world. Kill enemies, or turn them into friends. Travel zones between worlds shows some history of Mickey while he's running through a black and white steam boat willy inspired level.

8) Kirby's Epic Yarn. Kirby now looks like an outline of his previous version, made of yarn. This fall.

9) Dragon Quest IX. New miniquests and characters can be added from other local DS users. July 11th

10) Metroid: Other M. August 31st.

11) Donkey Kong Country Returns. This Holiday.

12) Nintendo 3DS. A slider on the 3DS allows you to turn off 3D entirely, or leave it somewhere in between 2D/3D. Only the bottom screen is touch capable. 1 camera on the inside, and 2 cameras on the outside. Take pictures and view them in 3D.

13) Kid Icarus: Uprising. Made just for the 3DS.

14) Nintendogs + Cats on 3DS.

Overall, there were a lot of trailers shown (explains the lack of info on most games above) and a lot of emphasis was put on the 3DS and what's it's capable of but it's hard to judge that without being able to hold one and play through something. The Zelda demo was cool but it seemed pretty flawed at the moment but they have 6+ months to work everything out.

Monday, June 14, 2010

Ubisoft's press conference

1) Assassin's Creed: Brotherhood. They're now jumping into the multiplayer realm and you can clearly see that in the trailer. At the end near a dozen assassins are standing next to each other. Jumping around the city with a friend sounds awesome, I'm curious to see exactly what it turns out to be. Using teamwork to complete tasks will hopefully be loads of fun, but some kind of versus mode could also be fun!

2) ShaunWhite Skateboarding. The demo shows a colorless city and you're suppose to encourage the citizens. Doing tricks is bringing color back to the city. Also shown off is a new feature that allows you to make your own path using the right analog stick. Connect rails/jumps by making your own path in between them. The building just transformed 'Transformer's style' opening up a new area after he tricked off all the billboards he needed to.

3) Games you can Feel. A demo of what looks very similar to laser tag happens as people are running around shooting each other. Then a demo where you have to scan 4 blocks, in order, and shoot the 'base target' after each one. The only difference from any of the laser tag games you've played as a kid is that it records this to a computer so you don't have to keep track of things yourself.

4) Innergy. This looks like a zen kind of game that helps you relax. A sensor is attached to your finger as you try to get your heart beat under control by controlling your breathing. Long breaths in/out. Using your mind/body as the controller.

5) Motion Sports. Your Shape: Fitness Evolved. More fitness games for the Kinect. They basically just showed the same demo from the Microsoft press conference.

6) Raving Rabids: Travel in Time. The same little rabbits you know and love, now traveling through time. Hits stores November 9th on the Wii.

7) Ghost Recon: Future Soldier. Optical camouflage is now a reality and it's used for.. well sneaking. With the ability to scan the area for enemies and mark them (Splinter Cell: Conviction style with a longer range) you can plan your route in order to take them all out. At the end a bunch of camouflaged soldiers have enemies marked and on the call, they all drop at once as you take the target hostage. A battle in open field takes place after you snipe the pilot of a helicopter, complete with baddies and a vehicle-type drone enemy. A brief talk about 3D/stereoscopic ends the demo. That marks a couple 3D games planned for this year.

8) Driver: San Fransisco. Change vehicles on-the-fly between cars in your vicinity. About to crash? Activate the ability and jump to a nearby car to keep on going! Using 'Shift' (aforementioned ability) and multiplayer together will change how you experience multiplayer.

9) Project Dust trailer shown. Looks like some kind of hidden power is being unlocked that is dragging everything into its wake, quick sand style. First time I've seen/heard anything about this so I'm not sure what to think yet.

10) Rayman Origins. The goofy platformer style is back with an awesome art style behind it. No more details other than the trailer.

11) Maniaplanet. User-powered gaming. Create/share content to distribute in one place. Shootmania (FPS), Trackmania (Racing), Questmania (RPG) all announced. One matchmaking system, one editor, all shared through the same distribution channel. Launched through the next few months on PC.

EA's press conference

1) Need for Speed: Hot Pursuit. Cops vs robbers is back and looks just as fun as it was in the first hot pursuit! Plus it looks awesome. November 16th, 2010.

2) Dead Space 2. I never played the first one (I plan to once I get a chance) because I'm a fan of the horror genre. It looks just as creepy as the first dead space and the gore factor has been upped. Bigger and badder enemies! January 25th, 2011.

3) Medal of Honor. Afghanistan. Moving away from WWII is a big step and probably and good one since everyone else has also moved away from it. To show it off they had a live 24 player demo, which was pretty cool. From the short little demo it looks and plays just like Modern Warfare 2 or Bad Company 2. Play the beta June 21st, 2010. Comes out October 12th, 2010. Also announced www.gunclub.ea.com (when it launches) which gives certain 'VIPs' access to extra weapons and such for EA games.

4) EA Sports MMA. Plenty of play styles, authentic venues from around the world (cages), etc. EA Sports LIVE Brodcast lets you add smack talk videos, place your face on your fighter, prizes and live spectators. Sounds like they're trying to allow you to give yourself a reputation and following on the internet. Launches October 19th, 2010.

5) EA Sports Active 2. Basically a fitness training simulator for the Wii/Kinect/PS3. The PS3 version looks like it uses wireless straps instead of Move controllers. All of your workout data is uploaded to the net so you can track your progress from anywhere and share workouts/strategies with friends. November 16th, 2010.

6) Madden 2011. 'Game flow' is a new way to call plays in the huddle. Joe Montana came out to help with the announcement. Trying to make it more accurate and accessible to everyone. They didn't really show off much of it, a few plays but didn't get more in depth than that.

7) The Sims 3. I've never played one of these in my life so I can't really give an honest opinion on it. Different professions, weighted decisions based on changes throughout the game and coming to consoles now! Coming this fall.

8) Crysis 2. Moves away from the jungle and into New York. Looks beautiful just like the first game. AND a 3D demo!? Fully 3D experience on PS3/360/PC when it launches! No 3D glasses here so I couldn't see what it looked like, but it sounds pretty awesome. Holiday 2010.

9) Bulletstorm. "Kill with Skill" Chain together kills for extra points, kicking people into electrical wires, kicking them off cliffs and using a grapple hook to either drag enemies closer to you or attach explosives to enemies. Using a shockwave to launch enemies into the air and blowing up an explosive barrel and watching the bloody mayhem is awesome. February 22nd, 2011.

10) Knights of the Old Republic. It's been awhile since I've wanted to play a Star Wars game and this looks like the game to pull me back in. With Bioware behind the helm I'm sure there will be lots of RPG elements and character building tied in. The CG trailer looks awesome and makes me want it now! Wish I was at the show so I could get my hands on it...

Microsoft E3 press conference

So Microsoft's E3 event just got over with and while it is exciting to see new trailers and gameplay from the big games (Gears 3, Reach, Fable 3, Black Ops) I would've liked to see more new games in the works. The trailer for Metal Gear Solid: Rising was awesome and seeing the new stuff for Kinect (Project Natal) was... entertaining. But the main theme of the show was definitely to show off what Kinect is capable of. There was nothing in it that really excited me as a core gamer and it all seems geared towards non-gamers and the casual audience. I could see it being fun as a party game and being able to jump into a game at any time by just standing next to your friend who is already playing seems pretty awesome. I touched on a few of the games on Kinect in the previous post, and after seeing them in action my stance hasn't really changed on it. Voice commands look pretty cool though and it looks like anything you can do with motion controls, you can also do with voice commands. Pausing and playing movies by saying "Xbox, pause" is pretty awesome so you don't have to fumble with the remote to find the pause button.

If XNA gets Kinect support (which I don't see happening anytime soon) I'll probably have to pick one up because it'll probably be all the rage just like zombies/avatars have been recently.

Also, here's some pictures of the new slim Xbox 360, from Major Nelson's flickr:
 

 

Microsoft's Project Natal = Kinect

So Microsoft had their 'pre-game show' if you will today where they announced a bunch about Project Natal. Included was them changing the name of it to Kinect. I'm not sure I really agree with them setting a name, having about a years worth of press, then changing it to something else. Sure it was a code name but I think getting a years worth of press then changing it should have some kind of effect. It's targeted at getting non-gamers into the scene and I'm sure 99% of them have never even heard of Kinect, or even Natal. Anyways they also mentioned a few games:
Kinectimals - Play with 20 different kittens. Lions, tigers and cheetahs oh my... Nintendogs anyone?
Dance Central - So You Think You Can Dance by MTV. For you... dancing types.
Kinect Sports - Bowling, soccer, table tennis, etc. If you've played Wii Sports you get the idea.
Kinect Adventures - A multiplayer river rafting game using your bodies to move the raft. Could be cool, the more the merrier.
Joyride - Racing game where you steer using your hands. Holding an imaginary steering wheel probably looks pretty goofy to other people, but the early demos have looked pretty cool.


I'll be blogging tomorrow as the event is going on about anything I find interesting!

Sunday, June 13, 2010

Slimbox (Lightbox)

I'll probably be posting images throughout the development of our game so I decided to install Slimbox which is a variation of Lightbox. If you click on one of the images on the site you'll see how it operates. I think it's pretty cool because you can group your images together and users can scan through them without having to open a new window for each image. For example, if you're reading this while it's still current, I only have 4 images and I have them grouped as 'particles'. So if you click on any of the 4 images on the site you'll be able to see all 4 images with the 'particles' tag attached to it. If I post some gameplay images later on I can set them to 'gameplay' or something of the like so they're grouped with each other.