Monthly Archives: January 2011

Iteration 2 – ready for download

The past week or so I’ve been testing and fixing minor issues. I’ve played about an hour or so without any crashes so I think I got a good amount of them taken care of.

You can download it here.

Even putting up a new release is time very consuming…Today I re-created the installer, updated the website, uploaded the installer and created a new promotional video.

What started off as an idea (asteroid bases) turned into an enhanced station building process, new stations, a new ship, changed interface and many other small tweaks. I played a bit of the actual release and am a little bit worried that it may be too difficult (for a beginner) because the player has to activley create a shipyard station now (in iteration 1 a station was there already built).

Next week I start on iteration 3, converting the game world to asteroid bases only. The code for planets will still be around, so down the line they may make a comback (in instant action mode, scenarios, mods etc).

Thought that popped into my mind

So at this stage the project is a prototype, meaning that a lot of game elements are taken out and I don’t give it much thought, for example in iteration 1 I gave the player all the ships, a station (at that time the only station) and a planet with plenty of resources. So basically a lot of the usual RTS elements were already taken care of for the player (station building, ship building etc). When I think about games and good game design the thoughts that pop into my mind are: give the player something to do, create an environment where they plan and have goals, make it entertaining process. A lot of times in MMORPG type games the player constantly strives for the next step up, the more hit points or damage.

Getting back to my giving the player everything at the start of a new game: this is mainly because as I’m programming the game I like to have all the assets on hand to test the changes, however in terms of fighting for the hearts and minds of gamers maybe this isn’t the best approach? Maybe I’m treating whoever downloads my project at this stage too much like a tester? The player has nothing to aim for except to fight the never ending waves of enemies. However since the game is fairly difficult to play initially (the feedback I received states this, I plan on creating tutorials to combat this, plus the future iterations will have a progressive difficulty) maybe giving the player enough ships to defend already is a good approach?

One thing is certain as the game progresses and the iterations add and refine to the gameplay I should focus more on making it more oriented towards the gamer rather than my testing. The upcoming instant action mode will actually accomplish this, I can have the player go into the game proper with the new game button, and for myself I can save instant action scenarios to help with testing.

Large number of downloads yesterday

Up until now I’ve had about 330ish downloads of the prototype, today the number is 1600ish. What is going on? I can’t believe these are legitimate users (I’m not advertising heavily). is it some kind of a automated downloader bot? But if so why would it download so many times?

It doesn’t make much sense.

Updated station building

Before station building was basically this: if a Planet didn’t have a station already, you could build a station. There was no user positioning of the station, the position was hardcoded (based on distance away from planet). This station was an all in one: defense, shipyard, hangar, and a place where transport ships would transfer cargo. The model used was one I drew up after many failed attempts (the best of the worst made it in).

Now both planets and asteroid bases are able to produce a variety of bases, the user goes into the build screen, selects a station, clicks to create a placeholder object. The user can now positon the placeholder object in 3D space as well as rotate it. The user then tells the placeholder object to begin building. The station then becomes part of the world. The models are SolCommand’s.

There is still a lot of polishing to do: I need to make sure that the station isn’t too close or too far from its base. I need to make sure that the placeholder isn’t on top of another station or object. But hey a substancial part is done and I’m pretty pleased with it.

I may have to let a few days go by with minimal work on this project since I’m starting to feel a bit burned out. Assasin’s Creed 2 awaits (also Dragon Age Ulimate Edition and Gothic 3)!

New you tube video:

Update

Its been over a week since my project went public, I’ve had about 260 downloads so far (which I’m very happy about), but not much comments outside of people who took a look at the screen shots and the videos. I was hoping for comments on actual game play and such. Hopfuly these will come as the progress moves on and I provide the player with more reason to comment.

Anyway what I’m working on now is Iteration 1.5, basically a pre-cursor to iteration 2. Iteration 2 will see the game area transformed from a solar system into an asteroid field populated by about 10 or so large asteroids with bases in/on them. This is my attempt to combat the bad scale that is currently in place in the game. Planets are too small compared to ships. There is a lot of empty area (space between planets). I was trying to straddle the line between semi realism and a comprehensible game world (a solar system that the player could see in its entirety but still recognize individual planets), but it just doesn’t feel right. So anyway these asteroid bases will basically replace planets in function. They will be able to build basic ships such as corvettes. Bases also will have a hangar for fighters. The base will also create stations (like planets currently do), the initial stations will be your basic shipyard, and a (very powerful) defense platform. The shipyard station for will then build larger ships. I’m thinking that eventually the asteroid base will create space stations to augment itself further, for example a space station that is basically a floating city to augment the asteroid bases’s population capacity.

I’m thinking that the game play will be part fight off/defend against the alien threat, and part take over other bases to expand your power and empire. The other bases will be neutral or pirate, so they may or may not be activly offensive against you. This will be accomplished by building a ship that will have a boarding party which will then board the other base (or maybe through diplomacy?). This is where pie in the sky portion comes in, the game would then change to a first person shooter and the player would get a chance to be in control of the boarding party (thinking that the player will get to control a robotic avatar, that can be upgraded through research etc). Anyway this portion if it ever arrives will be far off into the future, possibly part 2 of the project.

The great news is that there is a great resource avaiable online to get me started down this path, Solcommand’s models this means that this new venture will look pretty awesome compared to what it would be if I were the modeler. Lets face it I probably wouldn’t be going down this path without this inspiration. As an added benefit, texturing these bases should be pretty easy, slap on some rocky texture to the roid, then paint the structures a greyish color and voila!

Here are some preliminary screen shots:
Asteroid base 1
Asteroid base 1 – Full size

Asteroid base 2
Asteroid base 2 – Full size

Creating an installer for your 3D game for Microsoft Windows operating systems

Since I recently went through this I thought I’d try to help out the next person out there, below are steps how you can turn your compiled code into an installer.

Step 1: download and install NSIS

http://nsis.sourceforge.net/Main_Page

NSIS is a great FOSS (free open source software) for creating installers.

Step 2: download and install HM NIS Edit

http://hmne.sourceforge.net/

This is a FOSS NSIS editor. Which includes a wizard which makes the whole process much easier for a beginner.

Step 3:

Open up HM NSIS, and click File, then click New Script from Wizard. The wizard will let you fill in the usual application name, who made it, web site address etc. Everything is basically self explanatory or leave as it is (default options).

Default options are ok here.

When you get to the “Application directory and license” window, the thing to consider here is that Windows 7 and Windows XP have different security settings, by default HM NSIS Edit has the install directory to be “Program Files” then whatever your program is called. In Windows 7 (and probably Vista) installing to the programs directory could cause you some security headaches as without altering some permissions Windows 7 won’t let the software user write to this directory. So for example if you have a save game file or configuration file that your program needs to write, this will give you a headache. So in my case I just made the default directory to be C:MyProgramName instead and put in a note for Windows 7 and Vista users not to install to the Program Files directory. Ideally you would code your game to save to the user profile to bypass this, but for now this was my quick solution.


Suggestion: change the install directory to avoid security issues

Next up is the “Application Files” window, here click on the “Add directory tree button” and select your “Release” folder (assuming you are using Microsoft Visual Studio) or whichever folder where all your game files are (make sure all your paths and config files that point to paths match this hierarchy). This will tell NSIS to pack these files into your installer and to copy them into the directory that the user specified in the previous steps.

If your application has no further requirements you are basically done, you could click next and then compile the file (by clicking the appropriate button on the HM NSIS editor). However if like me you do have some other requirements you can use this window to assist in getting those installed as well. In my case I need to ensure that the user has proper DirectX files. So first I downloaded the DirectX redistributable file (google: microsoft DirectXend-user runtimes) then download the standalone installer (you could also take the web installer [if you are sure your user will be connected to the internet], however there is some debate whether this violates the end user license agreement). Once you download the redistributable, extract it to some easy to find directory. Now in HM NSIS Edit (still in the Application Files screen) click “New Group” name this group “Dependencies” or “Requirements” (we create a new group so that HM NSIS Edit doesn’t get confused as to what your application executable is [if you add it to the main group, it may think that Directx setup file is your main app], plus to keep things clean and organized) or whatever, and add the folder with the DirectX files to your application as well. HINT: to cut down on the download size you can eliminate the x64 files (which are for 64 bit applications) if your app is 32bit (see this link: http://msdn.microsoft.com/en-us/library/ee416805(v=vs.85).aspx). You can now finish up in HM NSIS Edit wizard by clicking next and filling out the other self explanatory options.


Add your release folder and all required media via these steps.


You can also add DirectX setup files via similar steps.
Ok now we are in the editor itself and not in any wizard, go to the new group (they are called “Sections” now, so find “Section “Requirements” SEC02″ (as it appears in my expample) then scroll down and insert the line below before “Section End”) you created and after the files are copied add this line

ExecWait “$INSTDIRdxsetup.exe /silent

This will tell NSIS to call the DirectX setup in silent mode, it will ensure that all the files in this particular redistributable (there are different versions that get released over time) get updated into your operating system. Now that we have updated these files we don’t need the redistributable files anymore, so lets delete them rather than keeping them on the user’s hard drive. To do this scroll down to the “Uninstall” section of the NSIS script and cut the Delete file parts of DirectX, and paste them right after the dxsetup.exe /silent.

Bonus hint: because this takes a while you can tell your users that it does so as to not have them wondering if the application crashed, here is how you can do this: insert this line before the “dxsetup.exe” command -> DetailPrint “Updating DirectX this may take a few moments…”

There we’ve just updated DirectX and made sure that our user doesn’t have to be bothered with these steps. Now if like me you are using Visual Studio the user may (depends on operating system) also need the Microsoft Visual Studio 2008 runtimes (vcredist_x86.exe for 32 bit apps and vcredist_x64.exe for 64bit apps). NOTE: there are different runtimes for the different versions of Visual Studio (eg: 2005, 2008 etc) so be sure to get the right one you need. Once you download this file put it somewhere safe. Now we’ll tell NSIS to pack this file into the installer and to run it right after the DirectX setup.

In my case adding this line does the trick:

ExecWait ‘C:SDEVDownloadsvcredist_x86.exe /q:a /c:”VCREDI~1.EXE /q:a /c:”"msiexec /i vcredist.msi /qn”" “‘

If you notice the location of my vcredist_x86.exe file is C:SDEVDownloads etc, so yours will vary, but this is enough for NSIS to pack the file and then run it in silent mode (see this blog for more info: http://blogs.msdn.com/b/astebner/archive/2007/02/07/update-regarding-silent-install-of-the-vc-8-0-runtime-vcredist-packages.aspx).

Since we aren’t copying this file to the user’s folder there’s no need for further cleanup. Go ahead and compile the file and then test it on some other PC than your own, now you can see what your user will see when they try to install your app, hopefuly it works great and they’ll have a trouble free installation.

BONUS OGRE HINTS:

Because Ogre applications tend to use a “Media” directory (where all your graphics, sound, gui etc, resources tend to be) and a resources.cfg files and because you have both a debug and release directory, here is what I did. I took my Media directory and moved it underneath the Release folder. Now I took the resources.cfg file in the Release folder and pointed it towards this new location.

So for example usually the resources.cfg files look like this:

FileSystem=../../media
FileSystem=../../media/fonts
FileSystem=../../media/materials/programs
FileSystem=../../media/materials/scripts
FileSystem=../../media/materials/textures

etc… etc…

Change them to:

FileSystem=media
FileSystem=media/materials/programs
FileSystem=media/materials/scripts
FileSystem=media/materials/textures

etc… etc… in the release folder (since the Media directory is now in the Release folder)

and

FileSystem=../Release/media
FileSystem=../Release/media/materials/programs
FileSystem=../Release/media/materials/scripts
FileSystem=../Release/media/materials/textures

etc… etc… in the Debug folder (pointing them at the Release folder Media folder which we moved).