If you noticed I haven’t really been around for a while I stopped updating the website and it was hacked and taken down and all that crap. But anyway I’m back and thought I’d let the world know whats been happening in my absence.
Initially I wasn’t updating my website because I was quite busy with work and other things and my life became quite hectic and I really didn’t have time to focus on my website.
Along with all this back in December last year I got very ill and because of that I’ve been in and out of hospital since, It started off as pain, then had surgery in January which led onto complications which had me re-hospitalized in February eventually I was let out with antibiotics but I still continued to deteriorate and was sent back to hospital in march when I spent 6 weeks before having major surgery on the 17th of April. I was Discharged from hospital 2 days ago and seem to be doing well.
Naturally having been ill so long I’ve fell quite far behind with uni work and everything I’ve been working on has gone to pot.
Just in case anyone’s interested as far as my engine is concerned I actually started work on a new Engine “Nightmare Engine” Back towards the beginning of this academic year the pure focus of the engine was simplicity more than anything. I was focusing primarily on making all the different modules of the engine independent with next to no coupling to keep the project simple. The irony being is potentially this engine although far simpler than my previous engine, is more powerful, there’s less coupling and is far easier to maintain and add new features. Obviously having being ill I haven’t really worked on in for a while but nether the less it has a nice set of functionality which I plan to improve upon over the next few years. I had planned to do a lot more by now but due to illness I have been unable. At some point either on here or on its own separate website I’ll be putting up some information about my engine and maybe a few demo applications to check out.
So hopefully how I’m better I’m going to start writing some random but maybe quite interesting posts again and get back on the development front.
Thanks for reading.
So I though I’d just post a little update on the progress I’ve made since my last post. To start I did spend a good while trying to make some decisions on the architecture of the engine it really took longer than I was originally planning but I got there in the end. So I lost some time to that, also I’ve spent a bit of time researching and doing other things not even necessarily related to the engine so maybe I haven’t spent as much time on the engine as I should have. Although I’m already ahead of the game as far as the project is concerned anyway and I’ve made some good progress nether the less.
Last time I was talking about getting the Assimp library integrated and now it pretty much is, I loaded my first model into the engine and everything ran smoothly with no issues.
As far as the implementation is concerned the content manager recursively loads all the models within a file directory when the engine is started, it then extracts information related to the all the meshes in the file and unloads the data. it does not store any data related to vertices positions, normal, texture coordinates or whatever else. It just takes information relating to each mesh and where it is located in the model so that at a later stage when the asset is needed it will use this information to load the mesh into the cache. At the moment to some degree its still incomplete as I’m yet to maintain all the data obtained from the assimp importer and sustain the hierarchical structure in the model file which does lead to some issues with the more complicated formats. But that’ll come with time I still haven’t 100% planned how its going to work. Anyway I’m being a bit to vague to understand I’m sure.
This diagram will give you a kinda vague idea of whats going. It will become more clear overtime.
One of the things I was planning on producing was a set of basic textures which I can use obviously to check that they load correctly and everything is working as well as getting a feel for how different size textures look. So far I have only created one texture. I’m going to be adding to them as the project go’s on and will probably put them up here so people can use them in their own projects for testing and whatnot.
I had previously written a crude features list just of the top of my head coming up with some of the features that I wanted to include or just have a go at implementing. For each feature at some point I will post a more detailed designing looking at each feature on its own and the detailed design and implementation. I’ve lit-rally got piles of notes written on several areas of the system during the design process, which I will literally be regurgitating.
So I have been quite busy and haven’t had chance to post anything, I’ve spent a lot of time designing and redesigning parts of the engine as well as looking at implementing them. I’ve spent a lot of time specifically designing a content management system that I can use to cache resources and designing how the whole rendering system Is going to work. So here is an overview of the basic understanding behind the rendering system. I may at a later stage post some more detailed information about the design of the engine but I’m not sure exactly how much I want to have free to the public.
Engine Components – In order to understand how the system works I’m going to go over some components in the engine and how they work and interact.
SceneGraph – The Scene Graph in the engine is used to keep track of all objects that have been created as well as passing Objects to the rendered to be rendered. These objects will have components attached that keep of track of which shaders, textures, and meshes to be used.
ContentManager – The content manager handles resources in the system, The scene graph will let the content manager know when an asset needs to be loaded and this will handle this, also through collaborative with the scene graph it’ll try to keep track of when a resource is being used, and when it is no longer being used by any object in the scene, maybe because it has gone out of the render distance or the object has been destroyed, then the content manager will handle the unloading of resources to free up any unnecessary memory being used. When a resource is loaded it’ll create a unique resource ID that will be passed to an object such as a texture so it’ll be able to use this id to associate with the resource that’s been loaded
Ok that’s a very brief overview of whats going on and I believe it gives you an idea of the how the system works, at the moment it is only partially implemented. One reason for this is I’ve redesigned it several times already since I started implementing however which each revision is gets better. Last night I wrote a new class used specifically for handling the loading , unloading and manipulation of images as well as caching the loaded image for use by the renderer at a later stage. Generally the class interacts with the Content Manager although It’ll work perfectly fine on its own as-well.
Thanks for reading as always.
Something I’ve spent along time doing is thinking of what different things I want to include my engine and possible tools that should be created to accompany my engine. They may or may not end up in the finish build for now its really just a rough template of ideas. This list is in no particular order.
- Level Editor – This is one of the main things that we quite often associate with an engine, of course due to time and feasibility it would have to be kept fairly primitive but nether the less would be a fine edition to the engine. Basic functionality I guess would be being able to import models and assets into the editor and being able to manipulate their transformations. It would also be good of course to add Prefabricated entities for things such as players, lights, spawn points, and whatever else is included with the final design. In an ideal world the engine would all be in one nice little neat package so you could play in the editor much like we see with Unity 3d but we’ll have to see. Integration with an editor probably won’t be until late into the development cycle as I see it more of a tool that sits on top of the engine but I’ll be keeping it at mind during the design process of the engine I ideally want to make it as simple as possible to integrate when it comes round to it. The other thing while I remember is it would be really nice to have a hierarchical view of the entities in the scene nicely sorted and orientated easy to see and select so they can be manipulated in the scene.
- Prefabricated entities + Instancing – I was going to have these as two but I think they kind of link together. I would like to be able to combine multiple entities in the scene into what would be known as a prefabricated entities this way it’s there if you want to use it again you can without reconstructing it and any changes made to the prefab will effect all the entities throughout the scene. Considering their all the same I’ll be using a rendering technique know as instancing as a form of optimization more than anything. When you add a prefab to the scene I’m probably going to have it so that it won’t create any new objects but use the ones that have already been created basically.
- Space Partitioning – I would very much like to implement my own partitioning system such as an Oct Tree, I haven’t totally got this planned out yet but I’ve been having a look, like most things I understand the concept but I’m trying to work out the implementation for myself, I’ve spent some time looking at different containers I could use, at first I though I was just going to use a map container but I herd somewhere that they can be quite slow to work with for such a system so I guess I’ll have to do some more research.
- Content Management – It would be nice to have something in the system for handling the content management as far as loading and unloading assets is concerned and caching resources so that they may be used later,Object Pools. I haven’t planned this out yet but I know from experience that constantly loading and unloading data when it is not necessary can cause a huge performance hit to the system causing it to be a bit jumpy, a good content management system becomes especially hard when creating something suitable for a sandbox where all the time you are having to load and unload large amounts of assets.
- Level Of Detail – It would be good to have support for different LOD’s both on models within the scene and for things such as terrain where large levels of detail are not necessary when far away.
- Volumetric lighting – would be a nice edition.
- Volumetric fog + other effects – just would be really nice to have.
- Lighting – point lights, spot lights, directional lights, usual stuff. Obviously would be nice to have various effects to modify the lights such as the brightness, color, distance, falloff and more. But at least get the basics down. and be able to be Real Time and Dynamic.
- Shadows – Haven’t really looked into shadows much but have a general idea of the concept. Real time and Dynamic Ideally.
- Scripting Language – Implantation of a good scripting language could be potentially useful there’s already things I’ve come across that are too easy when implementing in c++ such as reflection which isn’t naively supported by c++ i believe. I need to look more into it though I’m not exactly sure of what exactly I want to achieve yet and how I want to do it.
- UI/ Menu Editor – A useful edition could be a dedicated tool for creating in game menus and Interfaces. At the very least have a nice section of functions that can be used for creating interfaces and menus, I don’t think it’s really so much of a necessity to have a visual UI/Menu editor.
- Terrain Generation – It would be great to have some form of terrain generation with varying levels of detail, some kind of quad tree in relation to detail level based on view from active camera. At the very least I would like to be able to generate a terrain from a height map and at the most I would like it integrated into the editor with various tools for manipulating the geometry of the terrain.
- Shaders – A lot can be done with Shaders, I’ve spent some time looking into the rendering and graphics pipeline so hopefully It’ll work out. I’m undecided what shader language I will be focusing on I could just us GLSL a shader language used with Opengl, or I could use nvidias shader language cg which is compatible with Opengl and Direct X so could save some time in the future if I was to port the engine to Direct X. I would like to make use of Vertex Shaders, Geometry Shaders and Fragment Shaders. I’ll get more into this at a later stage when I look at the OpenGl graphics pipeline in relation to the engine design.
- Abstractness to the Rendering System -It would be nice to some degree to try and keep the rendering system in some way abstract from the graphics library that it is using, this could make porting the engine to use other graphics libraries in the future a lot easier. I’ve spent most of my time trying to design this part of the system and It’s still for the most part incomplete but I’ll be going onto this much more later. In my mind this is the hardest part of the system at the moment and one of the most crucial so I’m tying to take my time with the design process. I’ve been doing a lot of research, planning and more than anything thinking about what I want to achieve and how to keep it well optimized at the same time.
- Input Management System – This is something that I’ve already done a nice bit of work towards implementation, For now I’ve took the bind a function to a key press approach, as it stands at the moment you can bind a key to a function which is then in turn called on the key press I thought it may be better to check for all key presses once in the engine loop rather than every object you want to receive input on checking every time its update function is called. Slightly better optimization in my mind. I’m thinking you could have an object which is the current object under control with the player that the input manager keeps track of then it calls the function on that active object and none others, could be combined possibly with some kind of player indexing system in order to manage multiple inputs through one machine at the same time and only call the functions on the objects associated with a given player index. Bit hard to explain what I’m thinking but I may go into more depth at a later stage.
- Networking – It would be great to have some form of networking but at this stage I don’t have a clue how I might going about implementing it in the engine, It’s more something I would like to implement but probably won’t it’s always something I could look into in the long term after I’ve finished uni if my engine hasn’t been a complete failure.
- Scene cameras – To view inside the scene, each view port will render the view given by a Scene Camera, The scene camera will hold data relating to the orientation, position and field of view. I pretty much have a clear idea how to implement this and I don’t think it’ll take to long.
- Objects – Everything object in the scene will inherit from a class called object, among these objects we will have container objects and entities, container objects will hold other containers and entities, This will group the entities so they can easily be manipulated and allows for a lot of flexibility. Entities Ideally will be able to be written in code or a scripting language if implemented.
I will leave it at that for now, there’s still a long list but it’s getting late so I leave it at that for now and probably add more at a later stage. If your one of the few that have found this blog please feel free to criticize my bad spelling and grammar. Thanks for Reading.
Its actually taken me some time to decided what the focus of my engine was going to be, first I had to make some decisions such as whether it would be 3d, 2d, 2.5d, then after that I’ve had to start thinking about a specific style of game to target the engine towards whether it be an FPS, RTS and so on. Another thing that might also affect and make the development easier is focusing on a specific genre of game and bending the engine to suit it’s needs. This is especially important as i pan side by side with the engine development to produce a simple game to test the functionality of the engine, this is opposed to creating several small sample applications to sample different areas of the engine.
I decided to focus my engine towards 3d graphics in the end for several reasons.
- I’ve looked into 2.5d in the past and as great as some of the engines look that I’ve checked out, It’s just not for me I would rather focus my efforts of either something 3d or 2d. Here’s an intresting example of an engine someone made on top of the XNA framework http://www.youtube.com/watch?v=-Q6ISVaM5Ww.
- I feel there’s a lot more I could do with 3d than 2d, There’s quite a few things I’m interested in attempting to implement in my engine. I’ve be composing a list of potential features at a later point.
- I like the added level of complexity involved.
As far the genre of game is involved my 2 preferred genres are adventure and horror, must probably for a common core characteristic between adventure and horror games is that they tend to have really good well written story lines and very fun to play. I’m probably going to take the horror route as its definitely my favorite genre of games. Some of my favorite games include all the Resident Evils created before 4, although the new ones are fun to play the whole feel of the game has changed and they don’t feel anywhere near as eerie as the older ones, Silent Hill, Eternal Darkness And Amnesia – The dark decent. It would be good if I could find a middle ground between some of these games.
quite obviously I’m going to have to now come up with an idea for a simple game that can be built on the engine side by side, I obviously want to keep it simple otherwise It’ll really slow down the development process. I’ll be producing game designs as a later stage, It’s a bit early in development to start thinking about really, first I need to get the core engine designed and implemented I will be keeping it at mind though.
This is far from my finalized, I may change my mind later on, I’m going to spend a lot of time just looking at the feasibility of what I’m trying to accomplish.
This is the first real look at the design in relation to the game engine I have been developing, I’m new to the scene in engine development so it’s quite easy for me to make mistakes and overlook certain aspects. I have very little to go with and I’m constantly researching and finding out more about Engine architecture and implementation. So if something I’m doing seems a bit stupid please feel free to point that out.
Here is a list of some of the libraries that I have identified so far that may be useful during the development, some of which have already been partially integrated into the project, This list is likely to expand as the development go’s on.
- SDL(Simple DirectMedia Layer) – This is a library which can be used to handle windows management and Input as-well as several other handy things. Using this library could save me a lot of time as far as windows management and input is concerned and makes if far simpler and easier to set up a window ready for displaying 3d graphics. It also has the benefit of being compatible with both OpenGL and Direct X and several Operating Systems. So it leaves a lot of options open. Although I will be focusing on windows development with OpenGL it might make it easier to port to different OS’s in the future if need be.
- OpenAL – I haven’t looked into this much yet but this is a audio library that works with opengl.
- Newton Game Dynamics – A open source Physics Engine, Looks really good and some really impressive things have been made with it in the past. Physics engines are quite large and complicated so I didn’t deem it feasible to create my own from scratch, that’s a whole project in itself.
- SDL_Config – A library I found that is used for loading data from configuration files, very handy and saves a bit of time.
- Devil – A cross platform Image Library
- Tortoise svn – eventually I will probably uploading my project to a svn just to make development a little bit easier to keep track of. I’ve worked with svn’s in the past and found them very useful.
- Doxygen – A useful tool used for documentation, herd some good things but haven’t checked it out yet.
- Visual Studio 2010 – My compiler of choice.
As part of my course as you may know in the 3rd year a good part of our grade is deterministic on a project. The actual subject area of the project we undertake is very much our own choice, although of course it should probably relate back to games development. I don’t wish to reiterate over what we have already been given so please refer to this pdf(http://unorthodoxgamestudios.co.uk/Downloads/GamesDevYr3_Overview.pdf), on the last page is a brief description of the project as-well as expected learning outcomes.
As my project progresses I will try to continuously post updates relating to my progress on this blog which may or may not be used as part of the documentation for my project in the future.
for my project I want to create a lightweight Game Engine, which I have already started work on in regards to the base of the engine and the planning but I won’t have the OK on it until I get back to uni in September next year. Game engines do have the potential to be quite complicated so hopefully all the work I do between now and then will help me to getting the OK from lecturers, and convince myself that I’ll be able to produce something worthwhile in the time given. Having worked on largish projects before I know how things can go horribly wrong and that is definitely one of my biggest worries, getting half way through the year then realizing that its all gone wrong and I’m going to have to rework the entire engine. So basically i’m trying not just to convince the lecturers but convince myself as-well… I do know if everything does go wrong with the engine I could always cut a few corners in order to get it complete on time.
In my next post I’m going to start going over the design of the engine, I’ll be looking at some of design choices I’ve already made and the general architecture of the engine it’s far from finalized though a lot could change between the current design and the final design.