So lots of things going forward then…

Ok, so you’ve had a load of stuff, and the last thing was you squishing a very long standing bug.

Yeah, squishing that bug was immensely satisfying. It represented a bit more understanding of a few things for me, as well as seeing unit testing, the direct3d work I’d been hammering my head against and a few other things, all finally come together. With that in place, it meant that I could finally get to work making the whole thing compile again.

What, how do you mean, make it compile again?

Well, basically all the work I did in January on the client, effectively broke the server. A whole load of types were simply removed as they were no longer needed (to do with how the server sent information to the client). The way entities were represented was completely re-written (see previous posts on inheritance structured entity data types now being a single class using composite aggregation) meaning a lot of the code on the server was completely out of date and superfluous and just plain wrong. So, I set to with a flamethrower and attacked it. It was quite liberating. Removing a whole load of classes which simply didn’t need to exist, and had comments even questioning why they existing, removing methods which belonged to entities (which was never going to be maintainable) which now belong to behavior/ property/ metadata classes. There was one particularly satisfying bit were I started to re-write the collision detection and handling code, and it just worked (well, from a reading the code point of view anyway!). A lot of good things were factored like that, away from method calls on things that were utterly inappropriate and into their own class. It wasn’t all great though. As I’ve previously mentioned, I know I’ve broken a WHOLE load of stuff, and a whole load of stuff that I don’t even know.

What’s your next step then? I mean, how are you going to approach unbreaking all that stuff?

Unit testing basically. I know, I know, I keep banging on about it, but it really really does make developing soooo much easier. Take for example this whole EntityDescriptor mess that I was on about the other day. I’ve half heartedly stated a constraint (you can only have one of something) but never really worked it through with examples, or tested the code. For example, do I distinguish between interfaces and classes? What if one class implements two interfaces? How will that work if I try to add a different class, implementing an overlapping interface? Would the code, as written, allow two classes that both implement the same interface? And what about the retrieving code. How well does that handle some of these odd edge cases? There really are so many things about this, which seemed a good idea at the time, but will probably come back to bite me, purely because I don’t have a full understanding of how I expected it to work. So, by writing a unit test around exactly that, I’m forcing myself to confront and then define (for the tests of time) exactly how I’m expecting certain things to behave. This is great, and means I’m much less likely to get to a position where I create a function, come back to it later and tweak it such that it works for how I’m trying to use it and have then broken the original function is an odd and subtle way. I’ve got a unit test sat there telling me what the method is supposed to do!

Ok, you’re starting to sell me on this unit testing malarkey.

And so I should be. It’s already saved me a couple of times from costly errors. Ok, so apart from the descriptor stuff that I seem to have done to death now, there is a whole heap of other stuff that got refactored. Some of it made great sense. Some of it made kind of sense, but other bits were just very much get the fecking thing working as I don’t understand at all how I want this thing to work. A great example of the latter is the updating of the world data. I know that I want each segment of the world updating to be in it’s own stand alone class. So rather than have a method that says “Do collision detection” I want to be able to have a class which does that and exists in a pipeline, allowing me to change the order in which these things are executing by just changing the way the classes are populating into a list.

As for something which is half baked, but kind of right, well, I guess that’s the universe view. This is a view that represented, on the server side, a clients view of the world. It populates from the full universe and represents the subset to which the client is interested in. Quite how/ who decides how this happens is still to be determined. It will definitely follow the model I’ve started down, of having source classes which each represent a particular aspect. The two that spring to mind are one that will allow gigantic things to show up (think planets and local stars) proportional mass/ size to distance etc, but also perhaps another which will only show things within a few hundred km in high detail, and allow diminishing detail the further away entities get.

Anyway, I think that’s quite enough for now!

Posted in Project Icarus | Leave a comment

Quaternions kicked my ass AGAIN.

Yeah, those things are a royal pain

It still bothers me that I have no real idea about what they are or how they work. All I think I know is that they are something to do fourth dimension projections and oh no I’ve gone cross eyed. I’m not bad at maths, in fact, when I put my mind to it, I’m quite good. The problem is that I’ve rarely really put my mind to it. When I did, I got A’s. Unfortunately, that was not very often! I have, however, now decided that I’m going to truly, and fully get to the bottom of what and how quaternions work.

So how you gonna do that then?

By the power and majesty of that which is called YouTube. No, I mean really. YouTube has videos for literally everything now. I had a quick search and started watching a few videos, and fully intend to watch them to completion on the bus at some point (namely, and

What was the problem then?

Well, part of the problem was me fundamentally failing to understand rotations, and when challenged with the truth, it instantly became obvious. I was having trouble with projecting regular space onto a specific ship space, so that I could then work out where that ship was in relation to the ship that was doing the looking. So, I wrote a program that had two ships in it, with a couple of 3D views and controls for adjusting the position and orientation of the two ships. Not a big deal here. But, then I came to the issue of attempting to adjust the ships orientation. Now, the orientation was stored as a quaternion, in order to attempt to avoid gimbal lock and other associated problems. The problem is that I couldn’t find a sensible way of converting a quaternion back into its source pitch yaw and roll. Now, I’m still a little hazy on this whole thing, and I’m not actually convinced I’m right about what I’m wrong about, but it would seem that converting a quaternion back into the source yaw pitch roll just isn’t possible. I basically wrote a unit test around converting a quaternion back to yaw pitch roll that had just been generated, and found several examples of how to do this on the internet. The problem is that I couldn’t get any of them to work.

That doesn’t really sound like a quaternion problem.

You’re right, it isn’t really, but the point is, that it was a result of me not understanding the realtionship between yaw/pitch/roll and quaternions fully, and also, not being able to natively “read” quaternions. If I had, I’m quite sure that half the problems I was having with the roll/ pitch/ yaw conversions wouldn’t have been problems, and the whole program would have come together a lot more easily. Who knows, I might even have ditched the yaw pitch roll control and just had a quaternion control instead. The problem is that it seems to be basically impossible to consistently convert a quaternion back into the yaw pitch and roll that it came from.

So you didn’t actually get anything done then?

Well actually I did. When the unit testing showed that my current understanding/ implementation was flawed, I hacked it a little bit, which is to say that I just stored the yaw pitch roll as values and then create the quaternion each time. I know, I know, I’m opening up to gimbal lock et al, but for that example it was fine, as I wasn’t attempting to update an existing rotation as each scene was effectively static. In the end, it worked perfectly and I was able to see exactly which things were working and which weren’t. I had previously day dreamed a vague solution about using an inverse matrix of the quaternion on the target ship, and that seemed to work, except I was clearly getting some weird angles out. Adjusted the trig a little and all was fine, and that interception helper method now works!


Anyway, I think that’s quite enough for now. Still got plenty to talk about, including how I learned to stop worrying and love the bomb. I mean love the behavior pattern that I’ve previously mentioned.

Posted in Project Icarus | Leave a comment

Is time you wasted gaining experience really wasted?

It sounds like you’ve been up to a lot since our last chat.

Well, kind of. I spent about a week completely screwing around with Direct3D9. All I wanted to do was have a WPF and Winforms control that I could get a device for and draw with, so that I could write an app that would allow me to debug certain issues. After a LOT of false starts, I eventually got there. I tried SlimDX, some random controls I found on the internet, but I always hit some hurdle or other and could never quite get where I wanted to be. This was mostly due to a lack of examples in SlimDX, and me only having a very basic clue on how to write Direct3D stuff, so I’ve decided to go with the native implementation and get rid of SlimDX completely (for now, anyway).

Direct3D9, isn’t that, like years old?

Yes, and that in itself is causing me massive headaches. And I mean *MASSIVE*. The underlying problem is that the way Direct3D works, is that when you do something wrong, you get a simple error code “Invalid Call”. You get no information about why it was invalid. To get that information, you need to turn on the Debug Runtime, and look at the console. The only problem with that, is that the Debug Runtime doesn’t work on windows 7. There are supposed to be work arounds, but really, I can’t be bothered with that. So, when I inevitable srew up, I’ve got absolutely no idea wThe reason I’m stuck with Direct3D9 is that Microsoft haven’t released a D3D10 or D3D11 managed wrapper (although SlimDX has, but see previous lack of examples. If I was more familiar with working with Direct3D, then I’m sure this wouldn’t be a problem). So, in short, I’m stuck in a really bad position when it comes to the Direct3D stuff.

Well that sounds pretty crap.

Yeah, I know. For now, there isn’t too much I can do about it, nor is that much I want to do about it. I have a couple of ideas going forward, one is to use it as an excuse to launch into C++ and D3D10/11 (which there is LOADS of documentation for), or try to move into SlimDX D3D10/11 (which involves trying to re-write the c++ documentation, but again, this mostly relies on having a solid understanding in the first place). I might look at getting some books. I think though, the C++/ interop way is interesting going forward, as it really does open up some interesting challenges, and lets face it, C++ interop is not going away any time soon!

 So when you got it working, what did you do with it?

Well, I spent a little time playing around with creating models by hand, which, let me tell you, is a royal pain in the arse. I’ve got quite a few thoughts going forward on that one, ranging from importing an off the shelf model format (although this sounds like a lot of work), writing an editor to assist manually editing the vertex and index information (and don’t forget texture information as well!) Although this, too sounds like like a lot of work. In short, working with models is going to be a lot of work, and I’m a little concerned that working with a dead technology (D3D9) is going to render a lot of the work out of date too… Still, I’ve got lots of other things to fix before the model front really becomes an issue.

You mentioned something about a bug you managed to fix?

Yeah, so once I had a few models to play with, I wrote a little app with multiple rendered controls to allow me to set up and visualise scenarios (mostly around the interception code initially) to see what and how things were going wrong, and to see if my understanding of the maths around space translations was correct (It was and it wasn’t).

So, I’m gonna leave that here, cos I’ve got a lot more still to write on that subject, and it’ll probably take a blog post up all on its own. Till next time!

Posted in Project Icarus | Leave a comment

Ok, Now for the good stuff…

Well, we’ve been waiting for long enough!

Yeah, I know, but I’ve been busy, give me some slack! So, all the stuff I did back in Jan looks great. Sometimes you come back to stuff that looked great at the time and it just looks like a steaming pile of turd, but this, mostly seems good. The move towards interfaces over classes, starting to use IoC containers, moving to composite aggregation rather than inheritance just leads to a nicer developing experience.

IoC what now? Isn’t that something to do with the Olympics?

Haha. IoC containers are just a way of physically constructing objects. So normally, you do something that looks a little like this:

var mynewobject = new SomeObjectType(dependency1, dependency2, dependency3);

This is “dependency injection” the mynewobject now has references to the instances dependency1, 2 and 3. Nothing ground breaking here. But, the thing is, we’ve just created a dependency in the method that calls that line to not only SomeObjectType, but also dependency1, dependency2 and dependency3. The method needs some reference, or way of constructing these instances. This is where the Inversion of Control steps in. In your constructor, you simply list parameters that the class will be dependent on. Except, rather than listing these as classes (which you can if you want) you list them as interfaces. So now, you’re not actually dependent on anything other than an abstraction of what it is you require. This makes the purpose of a class much much clearer, you only list the things that this class is actually interested in. As a bonus, you don’t have to go around passing references of things that you don’t actually want, just so that one of your members members member can access it. To top it off, it means the class is very easily testable using a testing framework like Moq

Moq? What the hell is that? Some kind of sports jacket?

No, that’s Coq Sportif. Moq is a testing framework. Basically, you start with an interface, point moq at it and through a little black magic and voodoo, you get a class that implements said interface. You then get to specify delegates and data values for each of the members (if you want to). Then, you pass it into the thing you’re testing, and when the test is finished, you can interrogate the moq object to see what methods were actually run. Neat huh?

But isn’t unit testing for losers?

That’s a commonly held belief by a lot of people, but make unit testing as painless as it is when you use dependency injection and Moq, and couple that with a test run framework like NCrunch and unit testing really comes into its own. Whether or not you do fully fledged TDD, or just want to test fiddly things to make sure they work right, it’s up to you. NCrunch is probably my most favourite thing at the moment. It doesn’t actually do anything that new, in the same way that ITunes main feature wasn’t that it could play music. ITunes power was in the way it let you work, it’s catelogue of your music content that let you search it in real time. NCrunch continuously runs all your unit tests (and supports pretty much every framework out there) without recompiling, or even saving. So, you write a test for some bug, and because NCrunch is integrated with visual studios editor, you get immediate feedback to whether or not you’ve satisfied your test, or broken something. You get a little green circle on a line of code whose tests all pass, or a little red circle if not. It also gives you full exception information as to why your test failed!

Sounds awesome, if you like testing!

Well I do. Testing has saved my ass many times. You’ve got a bit of functionality that you can’t quite pin down? Write some tests around it so that a) you’ve fully defined how the code should function and b) then when you do the work you can be confident that it actually works. The when c) you inevitably break it by attempting to tack on functionality/ edit a depenency, you know straight away and you don’t have to start at square 1! You can even use it to enforce business rules in your code. Want a message interface that must be inherited from once and only once? do some reflection and stick a unit test around it.

Anyway, it’s getting late and I’ve got a lot to do tomorrow. More posts coming with changes made recently!

Posted in Project Icarus | Leave a comment

Wow, what a year…

You’ve really got to stop taking so long between updates

Yup, I know. I’ve just been a little… well. Busy. It started off ok, looking for a new job, brushing up on the game, getting things as they should be, applying what I’d learnt into how to do various things better. I think it actually helped get me a job. Lots of people seem to really come alive when they ask me about it in an interview situation. It really shows that I love what I do, and am prepared to do things off my own back to really make them happen.

So, new job then?

Yeah, I started in April. Things were going really well, it was all databasey, web pagey, front end, using IoC containers, AWS (Which I will hopefully be investigating later!) and loads of things, and to top it offer, they were paying me a butt load more cash than I would have done the job for! Anyway, so shortly after I started there we finally sold the house and found one we wanted to move into! A lot of faffing around later, and we eventually moved in August. A lot of time unpacking, getting settled and redecorating later and I finally find some time to unpack my pc.

Oooh, a nice new house then!

Yes, very nice. Well, it will be when we’ve finished decorating it. At the moment it just needs a lot of TLC. So things were going really well there for a while. The job was awesome, was starting to find myself with a little free time that I fully intended to use towards this and then, completely out the blue, I find myself being made redundant at the end of November.

Oh crap, that really sucks!

You have no idea. The last month really has been a very big blur for me, but the good news is that I got a new job within two weeks, and again, I’m pretty sure this had something to do with it. Interviewers really do seem to come alive when this is the subject, it shows that I’m constantly wanting to play with new technologies and able to adapt what I’m doing to be able to use them.

So what have you been doing then?

Well, the good news is that I’ve had a lot of free time (understandably) to try and get some work on this done. It took me a while to get going and I spent faaar to long on something that actually turned out to be quite simple, but that’s the way this goes sometimes!

What, that’s it?

Well no, but I figured I’ve written enough for now and that it’s probably best to leave the techy stuff to its own post.

Posted in Project Icarus | Leave a comment

Welcome back, Commander.

That’s an elite reference, I see what you did there.

Ok, progress has been slow this month, but there has been progress. So far, I’ve got some good stuff working, and I’m happy with that. I’ve got a few things to tick from the checklist, specifically, It’s pretty much back where it was before I broke it. When I picked up the repository, it didn’t even compile. Lots of head bashing later and I’ve got something that works (mostly). A few of the widgets are broken, but I’ve completely re-hashed the entity model and the contact model.

The entity what now?

From the clients point of view, it would get information about “stuff” from the server. This came in the form of an entity. Every different entity type (weapons fire, planets, suns, ships) all had their own class. This was already causing me a nightmare (for example, there were owned and non-owned varients which exposed read-write behavior or read only behavior) but it really didn’t fit well, and would have been a complete and total nightmare to maintain, and caused significant headaches when entities became “owned”, as I had to keep track of who had what class and make sure they received and updated to the new class. Now, the client only has one entity class, and attached to this are behaviors.

Sounds cool. What is it?

The idea is that as the client knows more about an entity, it will tag it with a behavior. This thing has a position in space? It now has the ISpatialPositionBehavior. It can be flown? It now has the IPositionalControlBehavior. The key thing is that they are interfaces, so can have umpteen different implementations depending on what, where and how they exist (for example it might wrap a call to the server to request a position update). The added bonus is that anything that consumes an IPositionalControlBehavior can actually consume anything that implements that interface. So, it could be a ship, or a missile, or a wing man…

Ok, so what else?

What do you mean what else? That’s a really elegant way of changing behavior of my objects at run time without having to redefine an object! Pah! No pleasing some people. As I’ve been re-implementing various bit, I’ve come across a few bugs (which I’ve done my best to squish). However, I’m spending increasing amounts of time chasing data, which is a pain in the arse. What I mean is, trying to specifically identify what the back end data is that is causing a glitch that I can see. I just flew through a ship, and neither of us blew up. the question is why? Where was I, where was the ship I thought I flew through, what positions were we both etc etc. To that end, I’ve started implementing a DDU interface. It’s a simple web site using MVC over ASP.NET and should allow me to get to grips with stuff that is happening inside of the client in real time.

Ok, what about Gravity?

Yeah, so the issue that was mentioned in my previous blog, regarding massive client/ server lag issues, it turns out was Gravity. When I looked again at the code, it made me cry a little inside. Although I was being vaguely clever with some of it, it was completely inescapable that I had accidentally introduced a triangular number performance algorithm.  What this is to say is that every entity has to look at every other entity in order to determine it’s gravity calculation. So, if there are 10 entities, 55 calculations have to be made. When we get to 100, it’s 5050 calculations. by the time we get to 1000 it’s 500500 calculations.

Yeah, so that’s bad. 

Yes,  yes it is. For now, I’ve turned it off. I will look at it again later, when I have a few other things sorted out. It’s something that is just asking to have a server side behavior to define which entities source gravity, and which are affected by it. The point is, that all these problems I’ve been having, would have been a lot easier to solve if this ddu thing worked. It’s now in place, and is a nice platform for me to learn javascript, jquery,, mvc and all these other things that I have no clue about. So that’s where I leave you. I’m going to implement a few more DDU pages (which I now have a nice android tablet to view on!) and then fix the broken widgets. Once that’s all done, I’ll let you know what the next thing for me to do is!

Till next time!

Posted in Project Icarus | Leave a comment

Well, That Escalated Quickly…

Oh, hello. You were making a candy crush game or something?

Yeah, yeah, I know. It’s been two and a half years since there was any update at all. A lot has happened since then. So, I went on secondment up at Bristol, which was cool. I learnt a lot, and everything was delivered on time and on budget, so that was good. Unfortunately, with bouncing back and forth between Bristol and Yeovil, I had very little time to work on Project Icarus. Then, I was made redundant (Or rather, I took voluntary redundancy). Fortunately for me, I got a new job and was back at work within a week of leaving BAE.

So you then had loads of time, right?

Not exactly. I was sent (literally) to Coventry for three months on a software project that I had literally no clue or grounding in. Fortunately for me, I managed to get a firm grip of it and got it (more or less) working. Then I got sent to Ireland for three months to install it on the customer site. Ignoring a few little hiccups, it works fine.

So then you had loads of time, right? 

Well, still, not quite. Work was very busy, and with one thing and another, Project Icarus slipped from my radar. As part of the redundancy package with BAE, I got a training course to become a Microsoft Certified Professional Developer. Something which I achieved in March of this year. Unfortunately for my available timings, I’d also asked my wonderful Jojo to marry me in the previous October, so all things were cracking ahead with organisation for that. So, we got married on November 2nd 2013, and everything was wonderful, and I had spare time again!

So you’ve now got spare time?

Well, that’s the plan. I’ve come a very long way since I started PI, and I’ve learnt so much. I still have plenty to learn, but that was always the purpose of PI. So, with January 1st and new years resolutions, I thought, what better thing to resolve to do then to get PI going again. Of course, all the space opera books I’ve been reading lately have helped and given me some inspiration…

So what’s the plan?

Ok, I’ve got a few things I want get in place:

Framework Changes:
*Fix the server <-> client comms. From what I remember, the last big change I introduced made this laggy as hell.
*Fix the entity model. The way I currently implement the entity model on both server and client is pretty strongly typed. Whilst this provides good compile time safety, it really hinders the creative process, and causes a lot of boiler plate code to have to be written. I plan on completely re-working this to allow a much less restrictive model.
*Re-implement Database Backend At some point in the development of PI, I dropped the database part of the server for performance reasons (I was getting “springy” lag). I have a few ideas on how to resolve this, so would like to try!
*Fix the server model Currently, the server is configured to be a service. This is great for instance based gaming, but not so good if I want the server to start-up on its own.
*Developer Modes. I want to implement some sort of developer framework. This will allow remote access to the currently running client/ server. It will enable turning on and off of certain features (for example, turning on hit-boxes and clipping helpers)
*Full glitch free system wide travel. Previously, I was having significant issues with floating point numbers causing precision issues when reaching far-flung corners of the system. Not good!
*Scaling Issues. The scale of planets and the sun was wrong. This needs to be fixed.

Gameplay/ Functional Changes:
*More ships. At the moment, there is one ship, with one model, with one set of characteristics. I want more.
*Gravity. Quite a simple concept, I want gravity back on.
*Full keyboard UI. At the moment, there is no attempt to capture “key-press” events from the keyboard. Not helpful!
*AI. Pretty simple, I want ships to fly themselves.
*Flotilla. A flotilla of ships, flying from place to place, using the AI.
*Some sort of menu. I’m grasping a little bit here, but I do want some kind of in-game menu, to allow configuration and selection of objects. This is a monumental piece of work. There are frameworks out there to do exactly this kind of thing, but I’ve no experience using them, or even what my requirements would be. Instead, I could write my own, but that’s also a minefield! One thing at a time!


Posted in Project Icarus | Leave a comment

Ok, time to stop thinking and start doing

Where the FCUK have you been?!!?

Ok, I might have gotten a little distracted with a few things. Basically, I’ve moved out of my house, into a hotel, paid for lovingly by my company. A few weeks ago, I was told that a secondment oppertunity had come up in filton, and that I was being considered. As soon as it was confirmed that I’d be coming up here for an undetermined period of time, I decided to do the sensible thing and stop developing Project Icarus and to spend more time with Jo. This time-less-ness issue was then compounded by a house inspection just before I disappeared up to Filton.

But you’re back now, right?

Yes, I’m back. Like I said, armed with the knowledge of not seeing Jo for anywhere near as much as I would like, and that in the coming months I would have plenty of time to devote to the cause. Which I now have

Sounds good! So what have you been up to?

Yup, it does sound good. It’s some good, some bad though. I’ve managed to cure at least some of my performance ills for now (you’ll remember that I was having a little trouble with frame rate performance a little while back). By turning off vsync I boosted my frames per second from ~30 to 180+ on my laptop. I think this is due to the way in which I was presenting the frames. Rather than preparing a frame between frames and then presenting as soon as was requested, by waiting until requested for a frame and then drawing and then presenting, you’re obviously going to cause performance issues. I do plan on fixing that later, but the work around will do for now.

Other than that, I’ve had some small successes with some HMI widgets, namely one which determines which direction to go to to face the current target. It seems to work well. Ish. It’s in the common class, so should come toghether with a few other classes I’ve written to form a rudimentary AI.

AI?! Are you mad, you’ll kill us all!

Ah yeah, I know. But as Jo pointed out, it’s rather boring watching ships stay exactly still and wait around with no purpose. So, they’re going to randomly move around a bit, and occasionally decicde to pick a fight with someone. It’ll require a bit of poking around on the server, but it should be minimally effective.

During this exercise, I have, however noticed that I’m getting very bored of declaring the same operation in four different class types, each feeding through to a member class. It makes me wonder if I should put things like “orientation” “velocity” and “acceleration” in an interface to make my life a little easier. My worry is that by doing that, I’ll get a duplicated name space issue due to the way the server types propogate over to the client when I run the WCF discovery tool… I’ll have a play with it and think about it later.

You mentioned some bad news?

Well yes. I’ve been running into a few problems with y’ardware. (That’s hardware to you mortals) it would appear that dogsbody has taken exception to external network communications (this always used to work!) and I can’t get on to SVN to sync my code. On top of this, my laptop really struggles to be a decent development platform. It’s slow, limited in screen space and well. A bit rubbish. Don’t get me wrong, it’s great for what I wanted it for, and a bargain at the price I paid, but hey, not everything is ideal.

I have looked at getting a dedicated web server, but I’m basically looking at 25 quid a month, which, is obviously a long term goal, but not sure quite if I’m ready to comit to that quite yet.

To complicate matters even further, in just over a month, I might be moving into a place on my own for a little while, depending on whether or not this contact gets extended. If it does, I’ll be able to bring my PC up and connect dogsbody to it, pretty much solving these problems (another reason I don’t want to prematurely buy the web server!)

Still, there is a lot to think about and a lot of good progress has been, and continues to be made. Anyway. It’s late, I’m tired and I need sleeep.


Posted in Project Icarus | Leave a comment

Ok, Time to stop and think

I was just looking back at the first blog. It suddenly occurs to me that, apart from the whole newtonian motion thing, I’ve achieved all the milestones that I initially set out to do. So, I guess it’s time to set out some new ones.

Sooooo, to that end the new milestones are:

  • Widgets for HMI controls (both input and output)
  • DLL file plugins for Widgets
  • XML for input/output of settings, and for output logging (debug etc)
  • More Weapons (missiles and lasers)
  • Simulated Solar system and real newtonian physics (really this time)
  • Time dilation to allow sensible travel between planets.
  • Server hosted on a remote host, preliminary debugging of latency issues

Ok, so there’s quite a lot there. I know, I know, it’s ambitious, but hey, that’s the whole point really, isn’t it! It’s worth noting that quite a lot  of things will be basic concepts, for example, you won’t be able to interact with the planets or anything like that.

There’s still a lot to do of the old stuff though, surely…

Well, yes. There is. But there is also a lot of stuff that I could spend days sorting out, but changes that are coming will sort out, and what’s in place will work well enough as place holder. (Joystick bindings, lack of keyboard bindings etc) There were also some issues to do with frame rates and lighting, and these will obviously be addressed as they’re pretty important!

Ok, so what about chatting, docking, trading, scores, money, hit points, ship systems and baddies?

WOAH THERE SPEEDY! Not so fast! Yes, these are all things I’d love to do, and certainly plan to do at some point waaaaay in the future, but the point is, that at the moment, I’ve got to concentrate on a few relatively simple and straightforward things to implement. There is also the fact that I want to re-write pretty much the entire server, from scratch. as I wasn’t really sure before on what I wanted it to be and how it would hang together. Now that things have started to take shape, I have a lot more clarity in what the server needs to do.

Anyway, Jojo is going to turn canablistic if I don’t get food ready within the next half an hour, so I’m going to go and cook. Lots of great ideas laid out for the second phase, and I very much look forward to implementing them. Have fun peoples!

Posted in Project Icarus | Leave a comment

And the lord said, let there be light! (and lag)

Ok, so a lots been happening the last couple of days. (Well, not that much, but, visually a lot has changed). The first thing to happen was to find some .x models that I could use as my spaceships. Quite easy and straight forward to start with! A few tweaks to the default ship class and the correct ship was appearing. Unfortuantely, it just appeared as a white shadow outline, with no detail of any kind. Exactly like the weapon balls were. A little googling later and I had nothing.

A ghost ship then!

Well, not quite. I did have a random hunch though, and a mini breakthrough occured when I noticed that the colour it was, was the same colour I’d selected as ambient light. What, I wondered, would happen if I turned on directional light, and turned down the ambiet light? And that, as they say, was that! All of a sudden my weapon balls were green and microsofts pretty spaceship model was more or less correctly drawn. There was, one, teeny, tiny problem. My frame rate had gone through the floor. I turned lighting off, and all was great again. Turned lighting back on, and things were lagging very much indeed when there were more than four or five ships around. Blow a few up and the frame rate was playable again. This is a problem!

How did you fix it then?

That’s the bad news. I haven’t. Like I said, it was vaguely playable with only a few ships around, so I decided not to lose too much time investigating it (I was feeling a little burned after spending so much time looking into the mysql problems, which, haven’t really caused a problem yet, even though I suspect they will in the very near future). Anyway, I’ve long thought that keeping bearing of what where and how you are rotated is very tricky. To that end, I re-jiggled the client a little bit, and now we have stars! They’re purely randomly generated, and they’re purely client side only (meaning that no two clients will see the same set of stars. I’m not too worried about this for now, it’s just a thing, you know?)

Ok, so what’s the point?

The point is that I now have something that doesn’t look too far from being a finished game. I’ve just got a couple of head up display type things (cross hair and speed indicator) I want to do and I will have something that I would have no shame in showing to someone such as prospective employer (which, lets not forget is one of the major goals I’ve got going here!). Anyway. Yes, that’s pretty much where I am and where I want to be going in the coming days. Yes, I’ve got a whole load of issues that need addressing, and yes, they will really need solving before the game can progress to something vaguely fun. There’s also the flight model that I want to update, the whole big ship combat thing, not to mention explosions (lets face it, ships simply disappearing out of existance isn’t great!) will leave me plenty still to do! So, with plenty of thoughts on my mind for things to do to drive us forward, I’ll leave you with the latest development video!

Posted in Project Icarus | 2 Comments