Jump to content

  • Log In with Google      Sign In   
  • Create Account

Journal of Aardvajk



Back To The Platformer

Posted by Aardvajk, 23 July 2016 - - - - - - · 424 views

Back To The Platformer

Struggling to get going this morning, so thought I would update my journal for a change. Did a bit more work on the spaceship game I posted about last, until I decided once again to dust off the platform game and continue with that. The spaceship game was a neat idea but a bit too ambitious and was growing out of control.

 

So I'm hoping instead to use the spaceship stuff (i.e. the cube-mapped star-backdrop and the ideas i had about piloting ships) as a way to link normal 3D platform levels together in a game project. The character plays levels as in the image with normal gravity and interactions, but then travels from one level to the other via piloting a ship in zero-gravity space.

 

I've put too much work into the 3D platform engine to just scrap it. What I currently have working is pretty stripped down and simplified and have removed a lot of the more complex controls and interactions. Basically, at the moment, the character can run and jump and that's it. There is also a full rag-doll simulation feature that can be switched on to take over control of the character when he dies.

 

Before, I had things like edge-walking, edge-grabbing and shimmy and so on all working but I removed these for now. I may re-implement them later but took the view that I needed to get a very basic run-and-jump mechanic working well and fun to play before I added in any more complication. The model is also still just a placeholder (my own work, but not happy with it) and I need to create a character that can fire a bow and wield a blade of some kind for what I am looking for.

 

The level editor is not in bad shape. This is its third or fourth incarnation now and the current incarnation just allows you to build levels using primitive convex shapes (cuboid and wedge at the moment but easy to add more) along with face and vertex selections, texturing support and so on.

 

Making a real model for the game with the abilities discussed above is the real work and the real problem. My 3D model and animation editor (Charm) is in good shape - what is lacking is talent from my side at modelling and texturing support in Charm to really push this forward.

 

So, as usual for gamedev, the problem is not technology or programming ability, the problem is content creation. I'm at the point now in my game programming where I can do pretty much anything within reason with my current understanding of things like 3D physics and rendering. The problem is a lack of artistic ability or maybe just a lack of patience and too much obsession over detail. Not sure which it is really but need to push past this (mainly psychological I'm sure) barrier if I am to move forward with a game.

 

I keep wondering if I am wise to stick with Direct3D 9.0c at this late hour, or if now would be a good time to tackle Direct3D 12, but I keep coming back to the view that I can do everything I need for my project in 9.0c so not sure I would do anything except lose a lot of time learning the new approaches, which I understand to be damn hard and error-prone.

 

Hmm. I don't know. Going to stick with the codebase I have for now anyway and see if I can motivate myself to start working on a sort of over-structure in the game code. Two or three 3D platform levels loaded from file, and some kind of space transport to allow you to move from one level to the other via a star-drop cube-mapped space area.

 

Bit of a ramble today, just musing really so thanks if you made it this far :)




Orbit - my new game project

Posted by Aardvajk, 09 July 2016 - - - - - - · 404 views

Orbit - my new game project

Hello all. I'm still alive and still working on hobby projects, just haven't posted here for a long, long time.

 

I've just commenced work on a brand new hobby project. This is going to be a space-based game called Orbit for now until something better occurs to me.

 

It is going to be an open-universe space traveller/trader/shooter. The unique selling point idea is that you will be able to move seamlessly from flying around in your spacesuit to fly inside spaceships via airlocks, get into the driving seat and fly the ship, all without cutting from one view to another.

 

So the ships will be modelled both inside and out, with some kind of airlocking systems to allow you to get inside, rules about removing your spacesuit before you can sit in the flight chair, then flying the ship will actually move the same model about you were just exploring as level geometry.

 

So far I have set up using an excellent free tool I have found called SpaceScape which generates random cube maps of star fields with nebula. I've generated some of these as cube map surfaces, then have a system in the game to load the surfaces into a cube map, then render a sphere at a fixed distance from the player position, using texCUBE and the vertex position to work out the sample point on the cube map to get an awesome seamless backdrop as you turn your view around. I use a special vertex shader to set the depth of each pixel of the sphere to be on the far plane, so I can then render "normal" objects inside it in any order. Works really well so far.

 

The first job I think is to set up movement using the spacesuit and air-jets so you can thrust forward and back, and rotate your view in any direction and add some roll controls for movement in the zero-G environment. Then I need to make a rough spaceship model that can be explored both outside and inside and see where we go from there.

 

I just finished reading Tuf Voyaging by the excellent Game of Thrones author George R R Martin and it awakened in me how absorbing science fiction can be written and I am interested in finding a set of game mechanics and environment that would allow for some decent science fiction to sit on top of. I think this could be the way forward. Once the key travelling and interaction mechanics are working, I'm hoping they can be used to build an imaginary universe that can hold together a set of stories alongside randomly generated content to reduce the need for a shedload of manual designing. That is the current theory anyway. I was focusing on 3D platform games before but the sheer amount of manual design needed for a one-man-band is just too much to ever be practical. I'm hoping a space-bases set of sectors with a mix of designed and randomly populated sectors with an over-arching back story might instead prove more manageable.

 

Anyway, early days at the moment so we will see how it goes from here.

 

Hope everyone is well. See a lot of interesting stuff going on in Journal-Land at the moment. Real life work has been keeping me pretty busy so slow progress on the hobby stuff but forcing myself to grab the odd hour here and there as all work and no spaceship dog-fights a dull boy Jack makes. Chow for now.




Personal Update

Posted by Aardvajk, 31 March 2016 - - - - - - · 760 views

Just a quick personal update to explain my total lack of posting here for a while.

 

Had some kind of problem with my stomach and kidneys which led me to be admitted to hospital a couple of weeks ago. I was able to walk when I went in to the doctors, was rushed to the hospital in an ambulance and was blood tested and weighed - 40 kilos or 6.2 stone (I'm 41 and 5 foot 10) and my kidney function had effectively stopped.

 

Due to this, my potassium and phosphor levels dropped to almost zero and within about three hours, I had become completely paralysed, I could wiggle my toes and move my head, but the rest of my body was like a dead fish. Couldn't even move my finger tips. Was pretty scary.

 

Spent about four days like this on the acute cardio ward. Went into surgery to put a pick line in my neck to get medication into me faster, in addition to the two cannulas, one in each arm, the feeding tube in my nose, the pads connecting me to the monitor and the catheter they inserted up my pride of manhood. They poured an insane amount of potassium, phosphor, nutrients and even at one point a blood pack (grizzly looking thing when it is dangling over your head) while dumping me on bed pans and shifting my position every half hour to avoid sores,

 

Sleep on a noisy ward, with cables coming out of every angle is impossible as you can imagine. The long nights waiting were probably the worst bit, but they passed eventually, as they do.

 

Eventually, one night, I noticed I could move my fingers again, so spent the entire night forcing myself to move more and more. By morning I could lift my hands over my head as long as I linked my thumbs together, and next day to my enormous joy, I could operate the bed control. I cannot describe how amazing it felt just to have the choice to move the bed up or down when I wanted.

 

Within a couple of days, my movement returned and I was put back on a normal ward. Spent about another week there going slowly insane as was not able to sleep due to the noise and the fact that there were cables protruding from every imaginable spot on my body and head, But after a couple of days I was able to walk to the bathroom, with my catheter bag in tow.

 

Then, one by one, the cables were removed. Once I only had the pick line and two disconnected cannulas in, I was able to walk to the hospital canteen and back, which was nice in a way, but nearly killed me. Always been one to run before I could walk. Made it there okay but nearly collapsed on the way back.

 

After a total of ten days in, they finally sent me home. First night at home was amazing. My own bed, television, radiator, clothes, all seemed like mana from heaven, although sadly that feeling fades,

 

So now, I'm still off work and having regular blood tests. My potassium, phosphor (were dangerously low) and sodium (was dangerously high) have returned to normal, but turns out now my haemoglobin is about half what it should be so had another test yesterday to confirm it is iron deficiency anaemia. Should be easy enough to treat if so, maybe with another transfusion or maybe just pills, but it at least explains why I'm still using a walking stick and need two hours lie down for every ten minute walk I take.

 

My blood electrolyte balance is also still all over the place but this is apparently due to refeeding syndrome. My body was in famine mode for so long it is still struggling to figure out what to do with the food I'm now pouring in. But I'm a hell of a lot better than when I first got out of the hospital, just very tired which I'm hoping is just iron deficiency anaemia which should be treatable.

 

So, quite a month really. Looking forward to getting back to work, hopefully next week, and looking forward to getting the energy to get into some pet projects again. Need to review where I was with my game and level editor but just don't have the concentration span at the moment.

 

I was extremely poorly at home for about a week before all this happened, so it looks like I'll get plenty of warning if this is going to happen again. They have no idea if it will or not, but at least I now know the early signs and can get myself into treatment a lot earlier in future. Suspect I'll be being monitored pretty regularly for a while now anyway.

 

The British NHS truly is the best in the world, free at the point of need and paid for purely by National Insurance. I also have to pay £8.50 per prescription because I work, but these are free to people on welfare. Every civilised and rich country should have the same and we here need to fight the current government like hellcats against its current approach of "defund, break and privatise". The service I received was, as always, fantastic.

 

Had a lot of time to think and not much else in hospital, especially during the sleepless nights when I was paralysed. It really is true that you don't appreciate anything until its gone, and that you have no clue what is actually important until you lose it. I wish I could hang onto that feeling for the rest of my life, but it is already fading. Guess I'll be back moaning and sweating the small stuff within a few weeks. Seems to be how our brains work. A shame really, but probably an evolutionary necessity I guess.

 

Thanks for stopping by.




Frustrum Culling (with video)

Posted by Aardvajk, 17 February 2016 - - - - - - · 799 views

Slipped and fell down three steps flat on my face onto concrete at work yesterday. Have smashed up two knees, one ankle and one wrist. Falling over at the age of 40 is a lot less funny than it was at 20.

 

On a brighter note, I've implemented basic frustrum culling in my game, meaning larger levels are now possible while maintaining efficiency.

 

 

If you look at the depth map in the top left corner, you can see the culling going on. The culling for the depth pass is similar, I just ignore the top plane of the frusrum for now. Probably need to come up with a more sophisticated culling strategy for the depth pass at some point.

 

It was quite straightforward really. I stole some code from the Rastertek tutorials to extract the six planes from the view and projection matrix, then wrote a method to build a local AABB from any of my mesh objects.

 

I realised it was reasonably efficient to support OBBs instead of AABBs for the culling, so created a Hull class (basically a list of vertices) that can be constructed from an AABB. Each scene node now maintains such a hull, updating it whenever the transform of the node changes.

 

I can then trivially check to see if all the vertices are in the negative space of one of the frustrum planes and reject the node for rendering if so. I'm aware I could find a support vertex in the direction of the plane normal and just test that, but I'm not convinced that would be more efficient, since identifying this vertex would involve a dot product on each vertex, which is basically the same as testing which side of the plane it is on.

 

I copied and pasted my level in the editor and moved it over to double the size, realising as I did that the code to draw selections in the editor needs to be made a lot more efficient - barely usable when many object selections are being drawn but perfectly fast drawing the meshes themselves.

 

The game maintains a steady 60 fps on my mediocre hardware regardless of the view, so seems to be acceptable so far. Will have to see what happens as the levels get larger.

 

Thanks for stopping by.




Textures and fighting with the editor

Posted by Aardvajk, 13 February 2016 - - - - - - · 768 views

Fairly quick update today. I've added support for basic diffuse texturing to both the level editor and the game. The editor is very much bodged to support, but the game is handling it properly.

 

Attached Image

 

I've added Texture and TexScale properties to the StaticMesh entity type. You can see them ringed in the next screenshot:

 

Attached Image

 

At the moment in the editor the available texture (grass) is just hardcoded loaded, like the proxy meshes, but can add some UI for this later on.

 

So you just set the texture string ID on an object ("grass") and set the TexScale to size the texture correctly, and its good to go.

 

What I have had to do is, on export to the game file format, output multiple "internalmesh" objects, grouped by texture so that you end up with a mesh per texture. The game was already set up to load multiple internal meshes and static mesh instances, so this was pretty seamless from the game side.

 

I've also added a feature to the editor so that whatever object(s) are selected shoot a ray down from their centre to the nearest floor.

 

Attached Image

 

Makes it a lot easier to see where things are in the world and was a pretty trivial change, since I already had all the ray casting against entities code working for the select tool.

 

That's all for now. Thanks for stopping by.








July 2016 »

S M T W T F S
     12
3456789
10111213141516
17181920212223
242526272829 30
31      

Recent Entries

Recent Comments

Recent Entries

Recent Comments

PARTNERS