Högni and Amy's game project

Thought in deed

Archive for the ‘Games’ Category

Standard material done

leave a comment »

For all practical purposes I consider the work I’ve done on exporting the standard material type from ShaderFX to Ogre3D readable format, complete.

It now exports correctly all the subnodes and lights and the calculations all appear correct now, including advanced functions like projection mapping based on vertex positions, alphas based on vertex colors, ambient occlusion, diffuse, normal and more.

I’m now going to proceed to create an exporter for the Glow and Subsurface scattering materials, as those are the ones I see us needing in the near future.

Even though this has taken a lot of time to implement I think it will save us untold hours of work in the future. This applies even if I leave it standing at only the standard material.

Unfortunately I’ve not gotten any further response from Luminox on this matter, so I don’t know if this work will ever reach the public. I can’t release it on my own as it is proprietary software that I’ve made extensions on…

I’ll update on this status when I can.

Written by Högni Gylfason

06.10.09 at 12:43

Ogre3D and ShaderFX

leave a comment »

I’ve been using Lumonix’ excellent ShaderFX plugin for 3ds max to generate shaders, and then altering the generated shaders to comply with the Ogre3D  material framework. To say the least this has not been without problems. The main problem is that Ogre3D is designed to be very open as far as the content pipeline is concerned. The material structure is very flexible, but at the same time suffers for it in its inability to use techniques native to shader programs.

A shader program usually follows a set pattern. At the top are definitions of constants and “tweakables”. These are the inputs to the shader program, such as colours, values for specular and gloss levels, texture samplers and more. After these follow definitions of the matrix structures the shader requires to work properly, such as the world matrix, world view projection, view matrix and many many others. Thereafter come definitions for input and output structs for the vertex and fragment shaders. Then comes the real meat, the vertex and fragment shader entry points themselves and their internals. Last come the technique definitions, where everything is woven together.

Most 3d engines read the techniques and apply materials to the objects in the 3d representation. Ogre goes about this circuitously at best. It does not read the techniques at all, but leaves it to the programmer to know the entry point names and then declare shader definitions that are in turn used in material scripts. To add to this, most shaders exported from any shader authoring software do not compile properly with Ogre without alteration. For example matrix multiplication is reversed when multiplying multi column matrices with single column (vectors). The shader declarations need to include the entry point name, the target (vs_2_0, ps_3_0, etc) and the source file for the shader proper. Then you define the bindings for the world matrices to the shader inputs, e.g. wvp -> world view projection matrix. These, in turn, are read by entirely different files, called material files, where you point to the declarations you made in the previous files, called program files.

This process is labourious to say the least. So, I’ve been trying to find ways to automate some of the steps. The biggest hurdle at first was editing the shader files to conform to Ogre’s format. If you’ve ever seen the contents of a shader file, you know what I mean when I say that it is not pretty. Second was writing the shader definition files (.program) and thirdly including it in the materials. I wrote a short python script that cleaned up the shader file for comsumption by ogre, but it seemed a cumbersome way to do things, parsing the code of the shader and then outputting it to a new file. After trying this with a few different shaders, I decided to trash the project and try something else.

I started looking into how ShaderFX is constructed. Without going into too much detail (proprietary software etc), I managed to build a half assed export extension that exports Ogre compatible shaders. Now I just need to get some support from Lumonix to extend the extension so that it generates the necessary material and program files. So far Lumonix have responded well to this project, so I hope they will be able to answer the questions I have raised with them.

Hopefully to be continued.

Written by Högni Gylfason

24.09.09 at 13:04

Need for Speed is back… well, sideways at least

leave a comment »

I’ve spent a bit of time lately playing NFS:SHIFT (Shift from now on) and I’ve gone from a stand of “neat” to “yikes”. This game is in fact awfully good.

Before playing it the first time I had seen a few gameplay videos and trailers and was somewhat put off by all the goings on in the interface while driving. Thankfully you can turn all of this off, which I did. There is nothing on my screen but the 3d representation of the interior of the car I am driving. And it looks fantastic. The feeling of driving very fast, braking hard and turning comes back to you in a great way, better than any game I have experienced so far. GTR and GRID do this well too, but this takes the immersion to a new level. I’m playing with a MOMO wheel controller with gas and brake pedals and I feel that this is as close as I am likely to come to real racing in the current technological paradigm.

The graphics are outstanding. The cars look damn near photo-realistic, and yes, I hate using that phrase. You’re aware you are looking at a computer generated 3d representation of the objects in the game, but they look so good and the lighting is of such quality, you just forget from time to time. I was readily  Some tracks look better than others. The real tracks, i.e. those that represent real tracks that are raced upon in the real world, look distinctly better. Spa GP and Nordschliefe (Nurburgring) look fabulous in particular. The conceptual tracks look worse but not so as to put you off in any way. I’ve never personally been to these tracks myself, but from image and footage I have seen of their real world counterparts, they seem to be faithful renditions.

The drawbacks of the game are the gameplay elements that cater to the consoles. These are achievements, stars, points and announcements thereof in the middle of races. Thankfully these can all be turned off, and then ignored when they are presented as part of the career mode, the heart of the gameplay dynamic, but where you cannot actually turn them off. I would have been well off just getting the money and doing the races.

I thouroughly recommend this title to any who are hungry for some simarcade racing. Some say that games like Forza Motorsport and Gran Tourismo are better games, but I’d rather play yatzee on facebook than play a racer on consoles. And I hate facebook. Not yatzee though, that’s cool.

Need for Speed is indeed back with Shift, but not in the way of the last 4 or 5 iterations. It’s back to pure racing, doing away with the pomp and circumstance of open world mucking about and storylines, leaving you with unadulterated joy.

Written by Högni Gylfason

22.09.09 at 16:21

Posted in Games

Tagged with ,

Hearts of Iron III

leave a comment »

For those who don’t know, Hearts of Iron is a WWII deep strategy game. I don’t really play a lot of this type of game, but I spent a while playing this one.

Some time ago I tried to play Hearts of Iron II, the preceding release in the series. After trying for a couple of hours, I gave up, as the interface and gameplay was too difficult to get into. I read some reviews and forum postings about the new release and saw they were mostly favourable so I decided to give this installment a try. I bought the game on steam and started diving in. I read several informative tutorial posts on the Paradox Plaza HOI3 After Action Reports forum, and I finally got into the game.

My initial impressions were very good. The gameplay was relatively easy going, with only a slight learning curve. I started a game as the British Empire in 1936. After several restarts, I finally got the hang of the detailed resource management and thought I was in a good position by 1939, when the war historically started. Then things started to go a bit downhill. The problem is not the socio-political management simulation, which is good. The land combat modelling is also very nice, enabling the player to perform envelopments and tactical retreats and more. The problem lies in the fact that the naval and aerial combat modelling is completely broken.

This might not affect players if they are playing as germany or russia or another major land antagonist. It does however severely affect any player playing as Britain, USA or Italy. All these nations historically relied on air and naval power to forward their objectives. The north african campaign for example was arguably decided by air and naval power alone. Sure, there was grunt work involved, but British air power based on Malta, and naval power based in Alexandria managed to nearly stop alll reinforcements from reaching North Africa from Italy. There are examples of convoys leaving Italy and losing fully 3/4 their number to airplanes.

In Hearts of Iron ships are hardly ever sunk by airplanes. Airplanes have little if any effect on land combat, even specialized close support units. This is completely at odds with historical fact. The battle of the bulge took a decided turn when the weather lifted and air attacks destroyed the german tank columns.

My first game developed along the usual (HOI3) lines of germany attacks poland and eliminates it, then attacks france and is stopped at the Maginot Line. Attacking through the low countries never occurs to the german AI. Italy then proceeds to conquer France. None the less, after France falls, it goes to Germany, either annexed or Puppeted as Vichy France. Germany then attacks into Denmark and is stopped by the Danish and Swedish armies. Seeing this, I sent my army into Denmark, cut of roughly a thirds of the german army there, and then proceeded to conquer all of Germany.

Those landings in Denmark and northern Germany should have been impossible due to the number of planes in german possession. But all of my ships got through, despite heavy air attacks on the landing fleet.

In my next game germany never declared war on the allies. They invaded Greece and took it, but no invasion was ever attempted on France. In the game thereafter, everything looked like the same thing would happen, and I finally decided to declare war myself. My african armies quickly eliminated the italians in Africa, and I decided to take a closer look at what was happening in Europe. As it turned out, the germans had not invaded France yet, but the Italians were deep in Champagne country. After taking stock of my forces, I sent all units that were not engaged in East Africa stamping out the remains of the ethiopian army, to the border of Italy and France, cutting off most of the Italian army inside France without supplies. Again, if air power was properly modelled I would never have been able to send dozens of ships, unmolested, up the west coast of Italy, to land forces at the top of the boot. After the Italian army in France was enveloped and destroyed, France happily went ahead and conquered all of Italy while I sent my forces into Germany. 2 months later it was all over again.

After this I can’t really justify spending time on this game. Even though building up your forces in the pre-war years is fun and interesting, the actual war is without any challenge whatsoever. Added to that, playing as a naval nation is neutered by the wierd ineffectiveness of landbased air power. It should be difficult to maintain supply lines to North Africa for the British, with the Italians controlling the air. It’s not. It should be a challenge to face the Japanese in the Pacific, facing supply difficulties and distances. Ditto here. The Japanese are overrun in the first months of the war by the Nationalist Chinese in short order and are a non-entity in the game.

After spending hours in the buildup, the game is always completely dissapointing in the endgame. What a shame, as it promised to bring a deep strategy game to the masses, yet fails by the fact that it plays completely unrealistically.

Written by Högni Gylfason

16.09.09 at 11:29

Posted in Games

Tagged with ,

Pleasant surprise

leave a comment »

I installed and did the first few races in Need for Speed: Shift tonight. Even after pretty rave reviews on ign and gametrailers, I was sceptical, but decided to go ahead and treat myself. Since my long term relationship with GRID ended, I’ve not gotten enough use out of my MOMO steering wheel.

It’s really quite good. It strikes a nice balance between GRID’s arcadey dynamics and the rock hard realism of GTR and iRacing. I rather think I will enjoy the rest of it.

I can only hope that it does not employ the methods of NFS MW where it danced with you, held you tenderly and then, around the middle, proceeded to punch you in the stomach, bend you over and do unspeakable things to your nasal passage, by way of the small intestine.

Written by Högni Gylfason

16.09.09 at 00:51

Posted in Games, Uncategorized

Tagged with ,

Golden oldie… Or is it?

leave a comment »

I have played flight sims for a long time. I’ve played most flight sims that have been released. At least the ones with things that go boom. A while back my trusty old flight controller died, leaving me with only a MS Sidewinder that I had used up until that time only for games requiring both mouse and occasional flight control. Battlefield, Operation Flashpoint and Arma1/2 to name a few. Up until the point that my FC gave up its long life, I had played Falcon4 the most of all. It’s excellent complexity, accuracy and good dynamic campaign – in particular with FreeFalcon or similar mods applied – appealed to my love of detail and procedure.

After finally giving up on my trusty old CH FCS stick, I played Arma and similar games for a while, in lieu of more serious sims. I then decided I needed a more solid fix than these games offer. I had from time to time tried IL-2 Sturmovik of 1c Company. I now decided to give it a more serious try. It had been hanging around, not getting much use. Since the time of Pacific and European Air War I had had little interest for me.

The first iteration of IL-2 was especially uninteresting, dealing primarily with the epynomous airplane of CCCP manufacture. A heavy duty ground attack plane designed with close support duties in mind. An early forerunner of the A-10 one might say. The design gives insight into the tactical know-how of the late war CCCP war leadership. In comparison the US and UK had no specialized close air support planes until shortly after the war. A number of airplanes were successfully employed in the same role, e.g. the P-47 and the Typhoon. Both were originally designed primarily as fighters with a secondary ground attack capability. So, while the IL-2 is undoubtedly – academically – quite interesting, still a ground pounder and not so intersting to me as a subject of a flight simulator.

So I hooked up the Sidewinder, wich still works very well even in Windows 7, and installed IL-2 – 1946, i.e. the complete package. I started it up and went into the video options. No widescreen resolutions are available. Baffled, I checked the configuration file, which I found by the simple expedient of sorting the installation directory by modified date. I opened the file, found the resolution settings, and set them to 1680×1050, my preferred resolution for most games. Starting up the game, I again got black bars on either side of the screen. Maybe it was just the menu I figured and started a quick mission. Nope. This game, even patched to max, does not support widescreen resolutions. Not a good start, but I can live with it I suppose. For reference, Falcon4, patched, supports any resolution you can dream up, as long as you can find a cockpit graphic for it. I used to run it at 1920×1200 at all times.

I started a new campaign game, selecting the USMC campaign, with the first mission starting on Guadalcanal in 1942. I did a mission, base defence, and promptly waded through the horde of zeros and bettys. It seemed all other planes in the area were flown by idiots. After landing, I went into the options and turned everything to the hardest setting, and then restarted the campaign. First mission, take two, base defence. The Wildcat I was flying suddenly had stalls and damn near zero climb rate. In addition, I was last of the Wildcats in line to takeoff. The lead fighter sat on the field, revved up with flaps in takeoff positions for 3 minutes before taking off. By this time the specks in the distance had taken the form of airplanes. By the time I was in the air the lead was under attack by what seemed like 10 zeroes. Apparently he decided to ignore them and try to climb to frontal attack the incoming bettys. Things went downhill from there. I managed to down  2 zeroes in high speed frontal passes before being forced to land, triggering the mission accomplished flag.

After 10 base defence missions with precisely the same opponents, attacking from the same direction I had almost had enough. The next mission was a ground attack mission on some tanks standing compliantly in line. There was also a ship nearby, but when I went off to strafe it, the flight leader started shouting “Stay with your leader!”… repeatedly. So I ignore the ship and go back to trying to strafe tanks with .50cal MGs.

This goes on for 10 or so more missions, doing imtermittent ground attack missions and base defence. I then start escorting B-17s on bombing runs in various seemingly ground support roles and interdiction. The B-17s utilize dive bombing, yet another glaring AI flaw. 20 or so escort missions later, where I just turn on the AP at mission start, set time acceleration to maximum, and make the wife tea or something, I am starting to get fatigued by this game. The B-17s never attack anything other than neat lines of 8 tanks placed at random locations on the island. The frontline never changes position. A loose count of destroyed tanks determines that I or my allies destroy a tenth of the total number of type 95 tanks the Japanese ever had on the Pacific island campaigns. The campaign winds up suddenly after escort mission no. 21.

I start a campaign in the USN, flying F6s off the Sara, attacking targets on Palelieu. The first mission is a ground attack mission in support of troops. I’m carrying a 1k lbs bomb and 6 HVARs. Fine. I take off with some difficulty, fly to the target, bomb some random stuff, HVAR some houses and shoot down at least 4 Georges.

Something is wrong. The flight characteristics feel somewhat familiar. In fact, they feel precisely the same as the Wildcat’s that I flew earlier. I switch out of the campaign and do a quick mission in the Wildcat. Yep, they feel precisely the same. I start a mission in a P51, P38 and a few other plances. All are the same. For kicks, not really willing to beleive this, I start a game as a german flying a 109F. The P38, a two engined fighter, has the same sideslipping high-G flat stall character as the Corsair, the fighter that was designed specifically to be the smallest fighter possible to be fitted around the Wasp engine and had horrible low speed stall characteristics. This was happening at 200mph or more.

I quit in disgust. This game has been hyped by people I generally trust to have an objective opinion on games in the genre. It has been hailed as the saviour of the entire genre, in fact. I was so disappointed. The list of flaws is as long as my arm.

Many have praised the game’s excellent AI. I failed to notice any excellence in the AI to be quite honest. After a frontal pass a Zero will damn near invariably dive. From Wildcats, or later even from Corsairs and Hellcats and P38s or P51s or even from the P47, then king of divers. What in the fuck? In addition, they will do slow barrel rolls all the way to the deck, often ending up barreling into the ground or sea at the bottom of the dive. I’ve managed to do this quite a few times after running out of ammunition, chasing Georges, Zekes, Franks or whatever, right into the ground. In the later years of the war, this would have been understandable perhaps, but early on, the japanese pilots were extremely competent and well trained, often with hundreds of hours in type. My “wingmen” were no better, often ploughing right into the sea, the ground or other handy objects based in the firmament of mother earth.

The graphics are very bad. This is to be expected from an older game, but why has this not been addressed in later patches? Airplanes are colourless and lack in detail. Even the addon skins are unambitious and uninteresting. Tracers are uniform and hard to see for some reason. The ground geometry and texturing is just terrible. Truly awful. The interface is the worst I’ve seen in some time.

The controls are decent but some actions are strangely not mapped after install. One interesting shortfall is the “Release chocks”, an absolutely neccesary action when taking off from a carrier. All my flight controls were inversed, but that was quickly corrected. The problem with the chocks took more digging.

I’ve uninstalled the game now. I’m sad about it. It could perhaps have been better, but it’s not. It is mediocre in every way. The campaigns are monotonous and impersonal. The flight dynamics might look good at first, but don’t hold up under scrutiny. Every plane handles the same, only differing in small ways in speed and therefore climb and dive characteristics. What a shame.

Written by Högni Gylfason

05.09.09 at 00:16

Posted in Games

Tagged with ,