Ränneslättsloppet 2011

Yesterday I participated in an enduro race called “Ränneslättsloppet”. It’s a competition with thousands of participants in different classes. I raced the recreational class for men aged between 30-39.

The weather was great and the trail was dry but not dusty. I got a decent start but my lack of experience in competitions such as these lead me to ride defensively in the beginning so I more or less just joined the flow. During the first lap we saw some traffic jams and no less than two bikes catching fire =)

Note: The thumbnail is linked, not copied, and it leads to the photographer’s site (www.bildeffekt.se) which contains many great photos from the event.
 

One lap was 20 km in length and the goal is to do as many laps as possible during 155 minutes. The winner of my class did 5 laps and I am very satisfied with the 3 laps I completed being so novice at this.

My only other previous experience was when I participated in Stångebroslaget earlier this year and that was a truly painful experience trying to get my motocross bike (KX450F) to take me through extremely muddy forest terrain and it kept stalling and draining my energy having to kick start it all the time. For this race I had bought a WR250F enduro bike instead and that made all the difference in the world. I didn’t stall it once while riding, only 3-4 times when I crashed.

Pre-race activities

05:30 – Alarm clock goes off. Time to get some stuff out of the fridge and pack it into the cooling bags to meet up with my race mate.
06:30 – Trailer with bike hooked up to the car and we head off on the 320km journey down to Eksjö where the competitions is being held.
10:00 – Arrival at Eksjö. Registration and carried all the stuff to the pit area for the service stops. We brought 2 spare wheels in case of flat tires, petrol, water, power drinks, tools, extra gloves, extra goggles, environmental mats, and some other bits and pieces.
11:30 – Rode our bikes to the inspection area where they were approved for the race. Then headed off to the start area where we lined our bikes up along side another 1000 bikes.
12:15 – Got dressed and packed our camel backs. I skipped my motocross top and just had a t-shirt and body armor. I overheated big-time at Stångebro so I needed to to all I could to keep the temp down. I also packed an extreme amount of fluids. More than anyone else with a small backpack filled with 2 x 2L water and 2 x 0.5L Powerade. I wasn’t going to dehydrate this time!
12:30 Arrived back at our bikes at the starting line. 15 minutes to go.

The Race

I was placed in the last line of the 30-39 year-olds, and then we had the 40-49 and 50-65 year old riders starting 5 minutes after us. As the start went I got a clean launch and settled into the tempo fairly well. It was quite a few traffic jams and pileups the first half lap so I got to eat some mud, watch a bike on fire, and pushing and shoving my way past every here and there.

The terrain was quite dry but also quite rocky. Sometimes the front wheel would catch a rock nearly sending me off the bike but I completed the first lap without any crashes. I also found out that my new bike, a WR250F, was extremely kind to me and I didn’t have to work nearly as hard as at Stångebro which also meant that I didn’t have to drink any water during the first lap… Great, 5L fluids on my back for nothing =)

I skipped the service stop on the first lap. I had all the water I needed and the bike didn’t need any petrol yet so I decided to press on and save myself from pushing the bike through the service area in the blazing sun. Better to stop somewhere in the shade later on to drink saving me energy and time. So I did, about half way into lap 2 I found a nice shaded area just off the trail so I stopped there, drank water and a Powerade, then continued.

There is a section of the track called “Berget” (Mountain) which is a steep and very slippery section which is definitely the most challenging part of the track. The first lap I chose to take the “easy” way around it because it was heaps of traffic and I didn’t want to get stuck in it, or cause additional jams for that matter. Now, on the other hand, I decided to go for it on the second lap and I cleared the hard path quite easily.

Not long after “Berget” my front wheel caught a rock on a descent which sent me and the bike flying. I tried to stay on the bike but failed and my knee got twisted to a point where it hurt a bit, but not excessively much. When I picked the bike up and carried on I tried to lift my leg back to the foot pegs and it felt really really strange… I couldn’t make out if the bike had been damaged or if my leg was totally messed up. Maybe adrenaline was keeping me from feeling that the leg is wrecked I thought…

The awkward feeling remained and something just didn’t feel right. I managed to turn my foot back and forth, wiggle my toes, and lift my leg despite the strange feeling and as I rid another few km I came to the conclusion that it must just be a combination of the bike having had a slight deformation by the foot peg and me being tired that caused the awkward feeling.

I reached the service area after lap two and as I got off the bike I contemplated whether to call it a day and be satisfied with completing two laps or go into the service area and fuel up me and the bike for a third lap. I chose to the latter. I didn’t come all this way to give up with time to spare.

I stayed in the pit area for about 15 minutes. Dropped my backpack and replaced it with a single camel back with 2L of water. Ate a snickers bar and some “Dextrosol”. Poured half a bottle of water over my head and took off again.

On the third and final lap I was starting to get really exhausted. My arms weren’t strong and my legs started to cramp up when I was standing so I had to sit down a lot more which meant my ass took a beating on the rocky sections. I can feel that today (the day after.) I kept quite a slow tempo but managed to speed up every now and then. A lot of riders completing their 4th and 5th lap were lapping me at this stage and I always knew when they came as they shouted from behind to make their presence known.

I reached “Berget” for the last time and I had already decided to take the easy route – but for some reason I didn’t. I launched myself up the hard section of slippery rocks and about half way up the bike slid to the side and I had to jump off. No harm done to me but the previously awkward feeling foot peg was standing straight up and I though, great all this way to mess up the bike so close to the finish… turned out it was just stuck a bit so after giving it a good kick it was back to just being awkward again.

Not long to go now… I can hear the speaker making announcements in the background. I come to a long whoop section along a concrete barricade where I had done some wheelies over the whoops the previous laps. Shifted up to fourth and gave the throttle a good twist. I saw two spectators standing by the concrete barricades about 100m ahead of me and just as I approach them I jump off a whoop just to see my front wheel hitting the next one sideways… I wobble big time and nearly go over the handlebars. In the corner of my eyes I see the two spectators jumping back to avoid potentially being hit by a bike and an exhausted rider. Somehow I regain control over the bike and I managed to glance over at the spectators and give them a nervous smile just as I pass them. That’s it now – no heroics from now on.

I rolled over the final whoop sections and I enter the last windy section on the big grass field that leads up to the checkered flag. I did it… and despite being very far from the top of my class I am happy with my result. The winner did 5 laps in 2 hours 58 minutes and I did 3 laps in 3 hours and 18 minutes. I finished in 232 place.
Here is a helmet camera that someone wore during the first lap in my class. The rider wearing the camera finished in 250th place but I can’t spot myself anywhere in the footage. “Berget” can be seen at around 24 minutes in to the video. And it always looks easy on video – try it before you decide whether it really is easy or not =)

Posted in Personal | Tagged | Leave a comment

Unity 3.5 and Menu Flow

I’ve been occupied with fixing up my Yamaha WR250F for the upcoming race, Ränneslättsloppet, on Saturday:

  • New oil and oil filter
  • New air filter with NoToil air filter oil
  • Changed to the enduro tires I also used on Stångebroloppet in July (with new inner tubes)
  • Fitted the coolant reservoir again (engine it runs hot in races like these ones, three hours of slow movement isn’t great for the engine that relies on fast flowing air through the radiator)
  • Fitted new hand guards
  • Removed the indicators and number license plate
  • Fitted the race numbers

Here’s are some clips from the 2008 year edition of Ränneslättsloppet… Let’s hope it isn’t too wet this year =)

What about Astrofighter.Net then?

I’ve also been working on Astrofighter.Net during the past couple of days but most of my work has been shuffling around boxes in Visio to try to get the menu flow and GUI design in order. Even thought this is a fairly small game I want to make sure that the lobby screen, ship selection, hosting options, etc. is very easy to understand. I hope it’s worth the time spent on getting it right =)

I’m also looking forward to Unity 3.5 which is scheduled to be released in late 2011. The conference “Unite 11″ which is currently being held demonstrated some of the new features and I found quite a lot of useful information in this blog post.

Even though there are some really visually impressive features coming in Unity 3.5, I am looking forward to the new GUI / UI very much. I don’t particularly like the limitations of the GUI in the current version of Unity and it would really make things easier if the new GUI Editor is available before I have to have a go at making the final menu system for Astrofighter.Net.

Posted in Astrofighter.Net, Imphenzia Games | Tagged , | 2 Comments

Apparently there is Subspace

Today I was also contacted through my ImphenziaGames YouTube-account by a couple of guys who play a game called Subspace.

I wasn’t aware of this game although I now understand 1) it’s been around for a long time, and 2) it’s a 2D multiplayer space shooting game.

Both guys asked me whether Astrofighter.Net is influenced by Subspace and at the moment it isn’t. In fact, there is no influence from any particular space shooting game and I have deliberately not researched any “competition” as I didn’t want it to cloud my ideas for Astrofighter.Net.

Due to the nature of my game, and in comparison to Subspace, there will probably be less players on a server in Astrofighter.Net. I will, however, based on how much I can optimize the networking code allow for as many players as possible. My current goal is 16-32 players and since I use rigidbody physics (instead of simply moving objects using velocity and direction) the game uses a fair amount of bandwidth.

I now have most aspects of Astrofighter.Net sorted out in my mind so it’s mainly a matter of making it happen. This is a one man show and I do the development, 2D graphics, 3D objects, textures, music, sound effects, and web development by my self so it’ll take some time.

Feel free to contact me if you think there are “must-have” features in a game like this. I will consider any input I get, but be aware that I may not necessarily be able to (or want to) implement them =)

Posted in Astrofighter.Net, Imphenzia Games | Tagged , | Leave a comment

Menu flow of Astrofighter.Net

The importance of a flowing menu system

Today I prioritized looking at the menu flow of the game. If there was anything I learned from Beat Ball 2 it was that I shouldn’t take for granted that a menu makes sense – especially with assumptions like “people will probably understand.” Many won’t.

The reason why the menu system in Beat Ball 2 is confusing is because I added features “on the go” without any proper thought to it. I’ve got a chance to get it right in Astrofighter.Net from the lessons learned before.

Flowchart the menu

I’ve created a flow chart today that contains all the menus: Main Menu, Find Game, Host Game, Options, Lobby, etc. For each screen and item in the menu I think very carefully about:

  • Does the flow between screens make perfect sense?
  • Are the options labeled correctly?
  • Is every screen absolutely necessary?
  • Is every option absolutely necessary?

I’m putting effort into this process now because how I continue with development of fundamental building block of the game and game states (menu, lobby, match, etc.) depends heavily upon the menu and game flow.

What bout the menu design?

The actual design of the menu is secondary in comparison to the flow. Of course, it’s important with a visually pleasing menu, but it can’t harm ease of use and navigation.

Even though I am focusing mainly of the menu flow rather than the actual design I made a proof of concept main menu screen. The idea is space oriented with high contrast where white text is always clickable and orange text is always a title of a menu / section. Menu navigation will be to the left and context and buttons will be to the right.

Astrofighter.Net Main Menu Draft

Free game but registration for statistics

As you can see in the main menu draft picture you can see a “pilot profile” which is essentially a player. First of all I will, most likely, make the game free for every to play. If a player wishes to record statistics (such as kills / deaths / weapon use / ranking etc.) the player will have to “Register” the pilot for a small fee. There will be a lot of communication and database handling to store all the information and hosting the service to enable the statistics feature costs money so I think it is only fair to charge a small amount to offer this functionality.

I am also putting a lot of effort and resources into Astrofighter.Net at the moment with some sacrifices such as lost social time and sleep =) For this reason it will also be required to be a registered pilot in order to pilot all the different ship types.

That’s my idea anyway – but everyone will be able to enjoy the game whether you wish to register your pilot or not =)

Platform support

I’m developing this game with the Windows platform in mind but from what I understand it should be easy to compile the game for Mac OS X as well. And not only that, I read great news on the Unity3D web site that Playstation 3, Xbox 360, and Wii support is around the corner and unless Sony, Microsoft, and Nintendo make it very difficult for me to launch the game on their platforms it would be very cool to have it run on consoles as well as computers.

I don’t plan to support Linux at the moment. Linux are for servers.

Posted in Astrofighter.Net, Imphenzia Games | Tagged , , , | Leave a comment

Added homing missiles to the array of weaponry

Just a quick update today – I’ve just added support from missiles with optional homing / seeking functionality to Astrofighter.Net. The homing feature will need some tweaking though, have a look at this video =)

I’m going continue with development for another couple of hours now.

Posted in Astrofighter.Net, Imphenzia Games | Tagged , , , | Leave a comment

I lost my vector (Astrofighter.Net)

Today I spent 3 nice hours in the autumn sunshine riding motocross at Uringe which is about a 45 minute drive from where I live. When I came home I first had to wash the bike, then I had to wash my Enduro bike that I had left in the garage all muddy the week before. Since the gear was out I also decided to wash my car.

It was 5:15 PM by the time I got in and we then headed straight to the playground with my son so he could play for a couple of hours. Back at 7:15 PM. Then it was time for him and my daughter to go to sleep so after changing into PJs, the nightly bottle, brushing teeth, saying good night, getting them a sleep, it was 9:00 PM.

Still no development as it was time for me and my wife to eat. I made some fanjitas, or was it burritos, and by the time they were done and we’d finished eating it was 10 PM.

Finally, I’m really tired but I launched Unity to get some more development done.

Today’s progress

Didn’t get a huge amount done today during the 3 hours I could spend developing (10 PM – 1 AM) but some progress was made.

Missiles on the way

I’m adding support for missile and currently I can fire missiles with smoke trails. Since the trail needs to live longer than the missile (if the missile reaches end of life or impacts) I detach the smoke trail particle system gameObject from the parent missile gameObject so it can fade away nicely.

Vector confusion

I also added parent velocity from the ship that fires a bullet/missile but even though it is correct to do so in real life it didn’t feel right in the game. Ok, it’s fine if you go straight ahead because if you add the velocity of the spaceship the bullet will move away from my spaceship at the same rate as it would have if the spaceship was stationary… BUT… since the spaceship has drag (funny in space, huh?) and the bullets/missiles do not it looked very peculiar so I’m opting to add part of the parent velocity to my bullets/missiles.

The problem with this partial velocity I need is that I don’t know how to calculate it so I had to spend some time drawing a picture and posted a question about it in the Unity3D forums.

Should I treat missiles like bullets?

I’ve also been faced with some other issues today. For simplicity, should I treat missiles like bullets or should they have a separate class?

The benefit of sharing the same class, even if the name is “Bullet”, I would reduce the complexity as anything fired from a weapon is an instance of the bullet class. Another benefit is that they can share properties, so a bullet could become homing if I ever wanted to add that as a feature.

The downside of treating it as a bullet is that I have to do a lot of checking in the code to handle missile-like specific properties, such as a smoke trail, acceleration, homing, etc.

My decision, for now, is to treat it as a bullet. I’ll also keep it as a raycast and move it by changing it’s position every frame rather than treating it as a rigid body with it’s own thruster and physics properties.

Homing missiles might become a networking issue

Firing projectiles and rockets in a straight line is not a big deal with a network game. The server tells all the clients that a bullet was fired at X,Y with a velocity of Speed. All the clients can then instantiate their own bullets and there is no need for the server to keep sending positional data of bullets all the time.

The problem I foresee for homing missiles is that the server, who has the real state of all the objects at the time the homing missile was fired, will probably calculate the trajectory different from my predicting network clients. This could result in the missiles taking a different path on the client missing the object but on the server who is authoritative it actually hit. For the client it would appear the missile missed but a ship may explode anyway because of server registered the hit.

My plan is to give missiles, or at least homing missiles, their own NetworkViewID in Unity and send positional data from the server to ensure they take the same path. The downside is increased network traffic but I suspect missiles will have a low rate of fire and won’t be coexisting for a very long time so it should be OK.

Signing off

The past week I’ve slept between 3-5 hours per night and I think my son will be waking up in about 5 hours from (it’s 1:41 AM now) so I best head off to bed.

Update:

I solved the issue. What I was looking for was the dot product comparing the velocity vector and the forward direction of my projectile…. Funny what guesswork can do =)

 

Posted in Astrofighter.Net, Imphenzia Games | Tagged , | Leave a comment

Astrofighter.Net Development Update

Last night and today I rewrote the weapon class for Astrofighter.Net so that it can support a wide range of custom properties for each weapon. I’ve added about 40 properties so there will be a great number of ways to upgrade weaponry using powerups.

Here is a short video demonstrating two of the properties named “ChargeUp” and “Multiload.” If “ChargeUp” is applied to a weapon you can hold the fire button down to increase the power/velocity/life of a shot. The “Multiload” upgrade allows you to hold the fire button to load X number of rounds before discharging the weapon.

Posted in Astrofighter.Net, Imphenzia Games | Tagged , , | Leave a comment

Astrofighter.Net – Now suddenly loving C#

Today I redesigned the code for weapon handling in Astrofighter.Net and the game now supports very dynamic creation of weapons and weapon upgrades. Each weapon is configurable with tons of settings such as various sound effects, autofire, charge up for increased power, rounds per minute, and so forth. In all there are about 40 customizable settings for a weapon and for potential powerups / upgrades.

While rewriting, and documenting, my code it strikes me how much I’m starting to like C# and the intellisense autocompletion of all variable names and functions. Today I learned about the ability to use the {get;  set;}  feature to treat a variable as a property – quite nifty. What this means is that you simply define a variable like this:

public float velocity { get; set; }

This enables you to from other scripts access the variables directly:

// this automatically uses set
remoteScript.velocity = 10;
// this automatically uses get
Debug.Log(remoteScript.velocity);

The only downside is that you can’t have these variables show up in the Unity inspector to assign them a default value which is a shame. There is a workaround for this in Unity but it requires a bit of code bloating so I simply don’t use inspector configured values in this case.

I’m very happy with today’s progress as it enables me an incredible level of control of my weapons and powerups. Should be able to create tons of cool upgrades that split bullets, enable homing missiles, alters velocity and force of projectiles, and so on.

Posted in Imphenzia Games | Tagged , , | Leave a comment

Astrofighter.Net

Astrofighter.Net is my new game development project for learning Unity and C#. During the past week on every spare moment I’ve been able to find I have been developing and creating assets for the game. When I’m not on the computer I am coming up with about a billion ideas for the game, or at least so it feels like.

If you want to read about Astrofighter.Net directly – skip this next section =)

The dangers of being in a situation such as mine is starting a tremendous amount of projects and never finishing them. With “a situation such as mine” I mainly refer to the wide spread of hobbies I have, all of which must fit in to an otherwise normal life. Non-computer based hobbies aside (motocross, photography, martial arts, spending time with wife, two children, and friends) I am, as many of you are aware, currently dedicating much of my time to:

  • Being the independent electronic artist Imphenzia with 85 tracks and 6 album releases to date – this includes maintaining my custom created artist site, maintaining presence at Spotify, Youtube, Facebook, Twitter, Soundcloud.com, Soundclick.com, and Ubetoo.com. The custom web site is created in PHP and I think it’s the 6th generation (each being a complete rewrite.)
  • Being the composer Imphenzia Soundtrack with over 250 songs/loops and 260 sound effects available for licensing – this also includes maintaining the custom created site.
  • Being the game developer and graphic artist Imphenzia Games with completed 3 game releases (Beat Ball, Beat Ball 2, and Netris.) Again – maintenance of the custom created web site for the official site and Beat Ball 2.

I’m proud of my achievement over the years, especially fitting all of it in next to my every day that normally takes up 8h + 2h commuting every weekday. I have one project, however, that has been my bad conscious for a long time. It’s been nearly 10 years since I started “Computer Touring Car Championship” (CTCC) which was later renamed to “Performa Cars.” This game is still unreleased but as I recently announced in a blog post I will release the game but without network multiplayer (only split screen), and it will be freeware since it’s using such dated technology.

I have to accept defeat when it comes to implementing multiplayer in Performa Cars simply because I didn’t consider the nature of network gaming when I started making the game. It would take a complete rewrite of the game (more or less) to make networking work and it would not be time well spent since it’s using unaccelerated 2D graphics that probably utilizes less than a single percent of today’s graphics cards. Seriously.

There is new hope, however. I’ve used BlitzPlus, Blitz3D and BlitzMax to develop Beat Ball 2 and Performa Cars and I’ve really enjoyed the Blitz-range of products over the course of 10 years. Lately I discovered Unity3D and I first dismissed it a year ago. Who want’s to make a game in an “editor” I thought?

How to waste time

No, I thought. I want full control of my game development. I need to see every line of code and be sure I structure the games exactly how I want. This is how you waste a lot of time by the way =)

In Unity I trust

When I gave Unity a second chance, I looked at a whole bunch of video tutorials on YouTube. The tutorials explained Unity in a step by step manner, going through the editor, all the windows, hierarchy, types of game objects and so forth. Unfortunately I can’t remember which series of tutorials I watched – but Google the topic and I’m sure you’ll find many great tutorials. Giving the step-by-step demonstration of Unity a chance helped me tremendously and I fairly quickly started to make some simple scenes with a bouncing ball, colliding objects, particle systems, etc.

My ultimate goal is to re-create “Performa Cars” as what I refer to as a “2D-but-3D” game with the multiplayer functionality it so much deserves. Using Unity instead, I’ll be able to cut down development time and also make great use of the power of modern computers and graphics cards.

My “2D-but-3D” approach, as seen in Beat Ball 2 and in the coming Astrofighter.Net game, is making the game look like an old-school 2D game but using the visual and physics power of 3D engines. I think many developers are too tempted to tilt the camera down into the 3D scene since “it’s possible.” And I agree 3D games are awesome, but I am fighting the temptation to tilt the camera as I want to make 2D games and I know there are a lot of fans of 2D games out there so this one is for you =)

Rather than jumping straight into making the new top down racer in Unity I wanted to make sure I know how to develop a multiplayer game. This is why I am first attempting to make a simple multiplayer space shooter game.

Astrofighter.Net

As I mentioned early on in this post, I’ve dedicated a lot of my time the past two weeks when I started a real stab at creating a game in Unity. I am amazed at how fast I am able to make progress in Unity being such a novice at it. In just a matter of two weeks, Unity has enabled me to create the basic foundation of space combat game that already supports server side authoritative network multiplayer with client side prediction.

I captured the footage above today as I tested the current build of the game with two of my mates. It runs very well already although latency is very low at 30ms so I’ll do more thorough testing using a 3G modem with 150+ ms latency. The YouTube version of the video is choppy since YouTube reduces the frame rate from 60 FPS to 30 FPS. You can download the 60 FPS H.264 version of the video to see exactly how smooth the game flows.

So far I’ve implemented the basic networking code, the spawning of player ships with the choice of two weapons. A Blaster and an 80mm Gatling Gun Cannon =) The blaster is single fire and the Gating Gun fires 800 rounds per minute. There will be loads of ship types and weapons with upgrades – I have an excel sheet with loads of goodies and ideas.

The game uses true physics with rigid bodies and real life forces. I’m really happy with how easy Unity is allowing me to just assign my ship, for example, a weight and what force it should apply during movement and the physics is just “taken care of.” It also looks very promising how I can use the physics aspects even during multiplayer.

To prevent cheating, and to ensure collisions don’t behave differently, the server takes care of all the physics and collisions in an authoritative way. The clients also animate the objects but if a cheating player hacks the game to move twice as fast on his own computer the server will warp the player back to where he belongs. Feminists can attack me now since I referred to the cheater as “he” but surely women don’t cheat, right? =)

Is it a felony to have this much fun?

I’m having so much fun with this project that I even feel stressed when taking a break. This lengthy blog post is also hogging time from Astrofighter.Net but I want to make sure to post about my progress.

Today I also registered Astrofighter.Net – and I know I know – there was a game from 1980 named “Astro Fighter” but I don’t have a space and I added “.Net” to emphasize it’s a networking multiplayer game.

Posted in Imphenzia Games | Tagged , , , | Leave a comment

Redeemed myself today

I’m happy to day that today I redeemed myself from yesterdays failures.

Getting the missing parts

After today’s daily pickup [of my child at daycare] I set off to buy the toilet seat, the front brake disc, and the hand guard mounts that I failed to get yesterday. My son only threw up once on the journey as well, that’s not bad. Also, he refused to exit the huge plastic car attached to the shopping cart at Bauhaus so we were stuck in the parking lot for a god 10 minutes convincing him that it’s much more fun traveling backwards in our real car so he can throw up properly again.

Raycast my bullets please

I also managed to implement a great Raycasting bullet script in Unity3d. My previous bullets, or projectiles, were using rigidbody physics and a collider but even with continuous collisions enabled my fast moving bullets went through obstacles. This is not uncommon in Unity from what I understand which is why I had to switch to Raycasting instead.

Basically, raycasting is when you look ahead a certain distance to see if the bullet will hit anything whereas the rigidbody method just teleports the projectile forward and if the step is large enough to step from one side to the other in once fixed timestep, the bullet will just bypass the object. So – check out the link to the bullet script if you have no knowledge of Raycasting in Unity – it helped me out a great deal.

I did do one modification, however. When a rigidbody is hit, I apply AddForceAtPosition (instead of AddForce) in order to introduce torque on the object hit making them spin nicely:

hit.collider.rigidbody.AddForceAtPosition( transform.forward *
    impactForce,transform.position, ForceMode.Impulse );

Shader to make a shielf / forcefield

I also managed to give my spaceship a nice force field shield using a custom shield shader in Unity. Since my little game is top down view I didn’t quite get the nice effect as seen on that page – so for the time being I apply a plasma texture that is animated across my ship and it looks quite nice.

Tomorrow is another day

Well sort of anyway. It’s 01:59 AM and I have just queued up what to think about when heading off to bed. I’ll use some of my brain’s processing power to figure out how to best structure the assets for my little space fighter game. I’m hoping to get a prototype of the game up and running in a couple of weeks. It’ll just have one space craft and one weapon – but most importantly – multiplayer must work!

 

Posted in Imphenzia Games, Personal | Leave a comment