Thursday, June 23, 2011

Flame on!

 
Video showing what happens when the ball gets too close to the fire.  I also include a switch to turn the flame off.

Fire and smoke - Particle effects in ShiVa3D

 
Finally something flashy!  It is pretty easy to implement a particle effect in ShiVa3D, but you will want to spend some time tweaking the settings to get exact look you want.  I still don't feel that I got the fire exactly right, but I feel good about the smoke.  At first I didn't like that some of the fire particles lifted off the main body of the fire because it didn't look very realistic, but when I added the smoke, the fire particles now look like the light of the fire reflecting off the smoke.  I think it looks pretty cool.  Next I will add some sensors so that the ball catches on fire when it goes through, which will be very cool if it works out right!

Wednesday, June 22, 2011

Emulating a trampoline in ShiVa3D

 
Not going to write much on this one because I am at work =)  Watch the video and see how to implement a trampoline like object.

Tuesday, June 21, 2011

Installing the Corona SDK and looking at the demos

 
I'm not getting bored!  I'm just interested in a lot of different things all at the same time.  I wanted to start doing something in Corona so that I could see exactly how different it is to working in ShiVa3D.  This video just installs the SDK and then we look at some of the demos.  I will be developing a game in Corona and documenting it along the way similar to what I am doing in my ShiVa3D video series.

Monday, June 20, 2011

ShiVa 3D - Adding a poly trail to the ball via a helper object.

 
Here we are adding poly trails in ShiVa3D so that we can see where the ball has gone.  I was finding it difficult to position objects in the level when I couldn't remember exactly where the ball had traveled.  This makes it easier because we can see the path of the ball by using poly trails.  I love how easy they are to set up and they just work. I also add a helper object to make the trail work right.

Sunday, June 19, 2011

I changed my github setup

I realized that within a ShiVa project there is a scripts folder that has the raw Lua files.  I setup that folder as my github folder and so now I am syncing directly from there.  As a result, my github files are now divided up by functions/event handlers.  Just an FYI in case you get confused when you go there.

Saturday, June 18, 2011

Python!

Ok, I may be a bit late to the game, but I just started seriously using Python for the first time and I have to say that I haven't had so much fun in a long time!  This really has nothing to do with game development, so I hope you will bear with the digression.  I am a bit of a programming language junky, but only in the sense that I like to learn about them, play with them a bit and move on.  I don't do a lot of serious programming with each one unless I come across a situation that seems appropriate.  I had to do some simple modifications to a CSV file and I will have to do it on a regular basis.  The idea of using C# or Java to do it didn't sound like much fun and those are the languages that I am most familiar with.  Instead, I thought of Python and went from knowing nothing to having the dang thing finished in a few hours.  The code was much smaller than what I would have written in C# or Java and it was a lot more fun!

Fixing a small issue with the object move

 
Ok, I guess I am a perfectionist in some ways, but the initial jump that an object would take when you first start moving it was really annoying me.  It is not a huge change to the code, but the concept can be a bit muddy if you don't have a clear picture of what's going on.  So if anyone needs clarification, let me know.

Thursday, June 16, 2011

Code cleanup and github repository video

 
 We already talked about this stuff on the blog, but I also put up a YouTube video demonstrating some of the code changes I made and what the github repo looks like.

Code repository on github

I uploaded my AI script code files to github so you can view the complete code instead of relying only on the videos.  I'm doing this because sometimes it is easier to look around in the code when you are learning.  I consolidated all of the functions and event handlers for an AI into one file, but I couldn't do that for the AI variables--sorry.  So if you are following along in the code and see a reference preceded with "this" and you can't figure out where it is coming from, that's why.  I committed the code but it hasn't shown up on github so hopefully I am doing things right.

The great code cleanup!

Okay, so in my videos I keep saying that I will clean up the code and add some documentation.  As I have been working on some of the more complex features of the game, I realized that I needed to do the clean up now.  Last night I got through most of the code and got things straightened out and as a result I have also decided to publish the code so that people can take a look at it directly rather than just through video.  I'm working out the details, but the source should be up soon!

Wednesday, June 15, 2011

What I'm working on

I normally try to get videos out nearly every night, but I have run into some issues that are taking a bit longer to develop.  I am trying to implement rotating the objects in the game in addition to moving them.  While this is rather trivial on one sense, it is proving difficult because I am trying to setup a HUD overlay when you mouse over a movable object.  The overlay has a button for rotating the object.  So far I can get the overlay to appear in the correct position, but one of the issues I am having is that I have set the "onMouseLeave" event to hide the overlay but it doesn't seem to work the way I expected.  The other issue is that I want the overlay to be a circle around the object, but if I implement zooming in overhead mode, the objects will scale up and the overlay will need to scale up as well.  So I'm working on it--stay tuned....

Saturday, June 11, 2011

Moving objects in two parts!

 
 So we are now able to move objects within the game!  This is the first inkling of what the game may be like. Of course there will be several different types of objects within the game, but we will have to make due with the pillars for now.

Setting up the interface to move objects

In this video I change up some of the functionality so that when we are in "edit mode" we get our cursor back and we also get the ability to move around the screen.  The next step will be to allow us to actually move the objects so that we can position them in such a way that the ball will make it to the end of the level.

Thursday, June 9, 2011

The challenges of game balance

I think Understanding Balance in Video Games is a good article that points out some of the things that game developers need to think about in regards to game balance.  What I like about articles like this one is that it may not explain how to achieve game balance, but it at least gets you thinking about the issues.  I had not thought about some of the finer details of game balance and I also think I am beginning to understand where complexity comes from in a game.  Take Radioactive for instance, the game mechanics are fairly simple because the physics engine does most of the work, but the levels can be fairly difficult to balance properly - how many objects do you include within a level, what types of objects do you have, and what is the physical layout of the level?  When you consider that every collision surface within the level is potentially part of the solution, it can be difficult to add the right amount of challenge so that the level is not too easy and not too hard.

Tuesday, June 7, 2011

More bounce!

 
Ok, we have an overhead cam and a chase cam in place...let's add some objects!  Ok, so it's only one object because I found that by making the ball more bouncy, I also made the chase cam more bouncy.  As a result, I adjusted my chase cam code.  The result is simpler code and better behavior, so I think it was a win.  I like the iterative process that allows you to catch things like this along the way when it is easier to fix.  Keep your eyes open this week for more objects and maybe even the end target!

Monday, June 6, 2011

Overhead Camera

Ok, so we are getting close to having the basic mechanics worked out.  We will still have to do some tweeking to the physics and other behaviors, but that's ok!  The overhead cam is probably the biggest change we have made so far just because we have to tie it in to the other two cameras.
I also consolidated the code to hide/show the crosshairs into a function. Once we get the basic mechanics worked out, I am going to clean up the code a bit, so there may be some more consolidations.

Thursday, June 2, 2011

Heads up!

Cliche, I know...oh well.  Here we add a basic HUD component in the form of a crosshair for aiming.  Then I work some trickery to make the crosshair disappear when we aren't aiming.

Cleaning up the chase cam

 
 I really didn't like how sloppy my first chase cam was, but you have to start somewhere!  I cleaned things up a bit by relaxing the chase cam AI so that it didn't do much if the ball velocity falls below a certain threshold or the ball was within a certain range of the camera.  This is actually more in line with what I wanted originally when I imagined the chase cam.  I like that the camera stays put as the ball slowly rolls away at the end of the shot.

The Belly of the Whale: Living a Creative Life in the Games Industry

Here is a great article by Bob Bates about working in the games industry.  I felt it had a lot of good insights into the psychology of game developers.  It was also interesting to hear how things are "on the inside" since I have never worked for a game company.

Wednesday, June 1, 2011

Matching the rotation of the ball to the camera and...Fire!


 Ok, so the next part is pretty easy, just match the rotation of the ball to the camera and launch the ball.  It doesn't really look as smooth as I would like it so I may change the chase cam code to be more stable.

Moving a camera with the mouse

Part of aiming the ball will be to move a camera in order to look at where you are aiming. I use the mouse controls to enable us to rotate the camera.

Taking a look at an algorithm and how it changed my design

 
 I am really bad at planning out the details of my game before I jump in and start coding.  You would think that I could at least do some basic outlining so that I know if I am going down the right path.  In this video I plan out a basic algorithm for aiming and launching the ball and then go about making the changes in my code to reflect the change.  Luckily it is early in the process so there are no major changes, but I had better keep that in mind for the future!