So, I recently decided to go on another adventure!

Similar to the journey I had last year, this time I have been checking into various 3D game engines and apis.

Rather than document everything I checked into I figured I’d just cut past that and get straight to my logs of working in my api of choice.

Note: For the record, I checked out NeoAxis 3D Engine 3, MOGRE and Irrlicht Lime among many others. Threw each out for one reason or another. My last test were with MOGRE which I could never get to work and I almost actually tested Irrlicht Lime and noticed that like MOGRE it seemed to be geared toward an old .Net version (like VS 2005/2008 and .Net 2.0). This combined with thinking by the time I sort through all of these things I can probably just drop down to OpenTK (which is simply a .Net wrapper around OpenGL and OpenAL) and get started… made me settle on OpenTK.

This will be a slow journey because I will be doing this in between my Diablo 3 gaming sessions. I am not in any real hurry. I’d rather spend a year or so and have a development environment that works for me. There are many game engines out there that allow you to basically “hit the ground running”. They can be used to quickly get a 3D model loaded and moving around a scene with full animation and basic collision detection & resolving implemented.

The problem I have with such solutions is two fold:

  1. I don’t care for the integrated work flows that tie you to a fairly heavy editor forcing a ton of point-and-click work
  2. I don’t want to be moving down a path making great progress and hit a wall. You know those inevitable walls you run into when using anything high level that was created for the general public. It is so darn frustrating.

So, yeah my plan here is to build up the framework & tools that work best for me. I fully expect to create some Editors of my own but the difference is they will be built from the ground up for my specific use cases and be as lean & mean as possible. The goal is to make everything as quick n easy as possible.

 

02/14/2016 11:30 AM  …  Setup OpenTK & Successfully Created A Game Window

This was very straightforward. I recommend following the instructions here to get started.

Obviously, I am now at the beginning of a journey that will take many months. With some luck, by the end of this year I will have a framework (and most likely one or more utilities) built that I can use to speed up the development of 3D games… without the limitations I run into using the “all-in-one” solutions that are out there. That’s my goal. 🙂

BTW – One of the things I have always been most interested in is bringing a game world to life. I like rich interaction and I want the inhabitants to have a strong appearance of “being alive”. I find it odd that even with modern tools achieving such behaviors is a real challenge. Mainly because they have focused so much on stuff such as pathfinding as a blackbox solution that in the process they made it fairly challenging (if not impossible) to easily modify the behavior of entities using that pathfinding.

What I intend to do is build up a framework that will support pathfinding as well as intelligent behaviors as far as states as such are concerned. One entity may be a predator that hunts for prey. Others may be simple-minded fun loving “live for the moment” creatures. Other may be hoarders of [something] and so forth.

We’ll see how it goes. Like I said, at this point I am a long ways from even being able to focus on such things.

In fact, at this point, I am working toward being able to display, translate and rotate a cube. That will be my next step. After that, I will go on to loading a 3D model and then handle animation for it and so forth. Then I will need to learn about shaders and lighting and so forth. Due to reading many posts on the Unity3D forum the past couple of years by ShadowK I know that lighting is very important in making everything look good. Although the look of a game is not the most important to me I do find it to be an interesting subject. Anyway, all of these are things I will need to build in OpenGL (using OpenTK).

 

02/14/2016 12:50 PM  …  The GarGameWrapper Library

So, after spending time digging around through the OpenGL docs just to get an idea of the overall structure of an OpenGL game application I returned to my own VS solution. First step was to add a new library project type. This has been named GarGameWrapper (GGW) and that is the namespace for it.

I may give it a better name in time but this works for now. Next, I created a streamlined GameWindow method inside the GGW, referenced the GGW from my main program and tested it. Remember, I want all of this stuff I am building to end of as a simple DLL that can be referenced.

One quick note here when looking at the overview of how OpenGL works and the bit of work I have done so far my mind immediately returned to Monkey X. I realized that everything I am doing is exactly the same as Mark has done for Monkey X. I see why he structured the MX programs the way they are. It is simply because this is how OpenGL works.

I must admit knowing this part of me now wonders if it wouldn’t be even simpler to just focus solely on creating the 3D lib part using OpenGL integrated inside Monkey X. One great advantage of that approach is that I would then use Monkey X for both 2D and 3D game development. And it may well save time because I am sure he has already done much of the work that I will end up needing to duplicate for OpenGL work in general.

For now, I will continue on with my own custom Visual Studio solution. Well… at least I will later today. Right now I think is a good time for some Diablo 3. 🙂

 

02/14/2016 10:40 PM  …  Hitting The Books

I just spent an hour reading OpenGL docs. Getting an overview of shaders (vertext and fragments), projection matrixes and so forth. Some of this reminds me of working in Direct3D many years ago and some does not (I never did anything with shaders back then).

As far as my own framework, I refactored some code and changed the name of the GameWindow class to GameManager. Added in the stub functions for OnLoad(), OnUpdateFrame(), OnRenderFrame() and created a little ResizeWindow helper method to make it easy to resize the gamewindow as desired. Tested and this all works fine.

I think I will probably order a couple of books from Amazon this week. I prefer to have a good paper book or two on hand when I am learning new technology.

So far this has all been quite easy but it does take a good amount of time digging online to find information. And for whatever reason information on OpenTK does not seem to be abundant. So perhaps my journey will help to change that. 🙂

I don’t foresee this project being a major challenge; instead one that will simply take some time. As of right now shaders are a mystery to me. I get the gist of what they are for but I have never actually done any work with shaders at all. So I am looking forward to the next week or two to really dig into them and learn just what can be done with them as well as learn how to write them.

I suppose I will add them to my framework in a manner where they can be easily defined by the end developer (which likely will be only me but who knows perhaps one day someone else will use some my work). Of course, as always, I will attempt to streamline the development of the shader writing too. Where I find things to be a bit verbose that can be a bit more terse I will attempt to handle that. Which of course means I will need to write some kind of built-in parser and compiler. Take a bit of time but as long as it makes development faster in the end I am all for it.

Another thing I am keeping in the back of my mind is WebGL. This is because I find the ability to throw up a game on a web page very beneficial. It is an ideal delivery system when you want to share your work and get feedback. So this means I may try to incorporate WebGL along the way. Of course, to do that I would need to either kind of create my own language that can be compiled to C# with OpenTK and I guess Javascript and WebGL OR write something that can convert the C# programs to Javascript.

In addition, I am also aware that Vulkan is coming soonish and it does seem like I might as well switch to that as soon as possible.

And still, in the back of my mind, I find myself thinking maybe it would make more sense to just do all of this stuff for Monkey X.

Plenty of time to figure all of that stuff out. It is after all only the first day.

 

02/18/2016 6:50 AM  …  Are You Sure? Are You Really Really Sure?

Over the past 3 to 4 days my time on this project has been split between (a ) studying the docs & various code snippets I have found and (b) searching for a better option.

If I absolutely have to I will just commit to using OpenGL to build my 3D game dev framework. However, I just have this nagging thought in the back of my mind telling me there has to be something out there that is in between stuff like OpenGL and stuff like Unity. I mean it is just such a big difference I find it very hard to believe there is no in-between solution.

I expected (and still do) to find some kind of framework built on top of OpenGL that I could use. This would still be at a low enough level to not be loaded with bloat and still provide plenty of freedom of implementation. And it would greatly reduce the development time over using OpenGL.

I’ve been thinking perhaps the problem was my choice to make C#.Net compatibility a requirement. Perhaps there are simply very few (and possibly no) current C#.Net 3D frameworks available.

During my research, I noticed there are a lot of 3D frameworks for C++. I don’t mind going with C++. In fact, at one time it was my most favorite language. The reason I wanted to stick with C#.Net is simply because I could then focus only on learning the api of the 3D framework I chose. Instead of having to make the move from C# back to C++ AND learn a new api. Just a matter of trying to streamline the development time.

So, what I am thinking now is… I will broaden my search tonight. And actually what would be very cool is perhaps there is some BASIC language out there that includes support for 3D Game Dev. While that would still require a switch from C#.Net BASIC is do dead simple it shouldn’t add too much time to make that switch.

I just find it very strange we have all of these open source 3D frameworks out there and yet there seem to be very few actually being taken advantage inside languages. I mean if I was making something like Monkey X or C# or whatever I would take a look at an open source 3D graphics framework that has proven itself over time and is still actively developed and then work on integrating support for it inside the language itself. Doesn’t it just make sense?

Anyway, I will search one last time on my lunch break today.  If I don’t find any options to check out I will commit to just doing it all from the ground up in OpenGL. This will work. It simply means it will add many months of “dead time” before I can actually start working on true game dev framework stuff. Because in the beginning I will be focusing on learning OpenGL and writing mini wrappers around things. Just getting my head into it basically.

Alright… let’s see what lunch break brings! 🙂

 

02/18/2016 12:47 PM  …  BASICs To The Rescue!

Great news! After opening up my search criteria it didn’t take long at all to find there are many promising looking BASIC languages out there all providing support for 3D game dev to some degree!

Of course, I was already familiar with Blitz3D having used it many years ago and occasionally dabbling with it as recently as a year or two back. However, it is no longer supported and is locked on DX9. I also knew about DarkBasic and the DarkSDK. Eliminated those for the same reasons. Mainly because I’d like to get involved in 3D with modern capabilities if only to better understand them.

So… what did I find?

NaaLaa 6 – This one looks interesting and says it is focused on making retro style games. I checked and found examples of many 2D games as well as a 3D game. Seems to be focused on inexperienced programmers but that doesn’t mean it sucks. It may just mean RGD (Rapid Game Development). However, I am more interested in checking out another of my findings which I will get to shortly.

PowerBASIC – This one has been around a long time now. I remember coming across it many years ago. It is still actively developed and they are still focused on making it produce programs as fast and tiny as possible. This one looks interesting to me because there has been a lot of work on using OpenGL from inside PB. In fact, someone on the forums has converted all of the NeHe OpenGL examples to PB. However, this is only for Windows. But I basically decided over the past few days why do I even care about support for MAC and Linux development? I mean I don’t have those machines and I most likely never will. I think the only reason I kept that requirement is because I wanted this page to be as helpful to as many other people as possible.

PureBasic – And this one looks to me to be the most promising of them all. First off it does support Windows, MAC and Linux development. More importantly for me… remember early this morning when I said I do not understand why none of these programming languages (well since the days of Blitz and DarkBasic) have integrated 3D frameworks? Well, PureBasic actually has Ogre3D integrated inside it.

Yes, from what I understand with PureBasic you get the rapid development of using BASIC and it combines full support for 2D games and also contains the Ogre3D framework for full support for 3D games.

Granted, in one way I feel like I am going back in time by using BASIC again. I mean there are certainly many pompous programmers who would consider BASIC the area of amateurs. All I can say is… get over it. I have been programming for over 3 decades in a variety of programming languages both as a hobbyist and for my career. I don’t care what the language is as long as it gets the job done!

In short, I am pretty excited to try out PureBasic and Ogre3D. It is my hope this will allow me to get a jump-start on my code-oriented 3D game development. I may even be able to use PureBasic to create a library that is usable by Monkey X. If I did that then I would be able to use MX for all of my game development… 2D and 3D! But for now I am just looking forward to trying out PB for 3D game dev on its own.

I will check it out tonight! 🙂

 

02/20/2016 10:08 AM  …  Lots of Options… even Unity3D

I checked out the PureBasic 3D examples and I gotta say they are very good. Working with 3D in Ogre & PureBasic will definitely be a little lower level than working in something like Unity3D. Which is not a bad thing and is in fact basically what I am looking for.

Truthfully, I have now checked into many different things and found many different options. And I have even considered returning to Unity3D once again. I have continually tried to work with Unity in a more code-oriented way. And thinking about it, at one point, I actually tested working in Unity in the same manner as I’d work in any other framework. What I did was make a single monobehaviour class and that one class managed a collection of hundreds of other GameObjects. None of those were a monobehavior. My manager handled all updates, movement and so forth. However, I thought this was really anti-Unity style of development so I moved away toward having every in-game object have a monobehaviour.

So… I am thinking perhaps I was on the right path to begin with back in my very first Unity3D project. I think I will explore that again.

Basically, all I am looking for is the best way to work in 3D for me. I don’t care much for the Unity Editor (or UE editor or any other all-in-one editor so it is not just Unity). Mainly I just think it is odd to be making all of your dev tools inside these editors and even forced to be working in them at all. I am used to launching a code editor and going to work. If I need to build a game world map then I launch a dedicated tool to do that. Same for the other stuff.

I think going back to original approach and exploring that may be the key for me. Also, I am going to check out NaaLaa 6!

So… as you can see I am in no hurry. Sure, the sooner I find my ideal dev environment for 3D game dev the better. What I mean is taking a week or even a month or two to explore many different options is the best way for me to find what I am looking for! For example, I did the same thing for 2D game dev last summer and settled on Monkey X. For me, it is the best & fastest way to develop 2D games.

 

02/21/2016 11:22 AM  …  How Many Options Are Out There?

Last night I found yet another option. Two in fact: Nuclear Basic and Nuclear Fusion. The fact the more that I dig the more game dev options I find is the reason I firmly believe that out there… in Internetland… some place… is an ideal solution for me. The problem is in finding these things. It takes so much time to dig through the search engine results, dig through forums and so forth to find a mention of a product. Eventually, I get a lead, a subtle mention of a product name and then I can focus my search and dig it up.

Anyway, so this company named Nuclear Glory has apparently been working on NB and NF for a long time now. And the products have been out there and in use for a long time now. Nuclear Basic is probably the closest thing I have found to a more modern version of Blitz3D. Nuclear Fusion is their engine created for C++. I see both of these as solid options.

They can make use of DX11 at least to some degree such as using shaders. The engines are supposed to be faster than Blitz3D. And they also offer Nuclear Studio which is their World Editor. It allows you to easily build your scenes using point-and-click. I’m not sure if I would use NS simply because although I do find value in Scene/World Editors as far as the actual building is concerned… I want a full solution. This means being able to access that world data easily in a structure that is easy to work with. Personally, I’d be happy for a simple 3D equivalent of a 2D tile map. So basically just working with 3D worlds as cube maps. They do mention a “game grid” which may possibly be exactly what I am looking for.

Anyway, I downloaded Nuclear Basic this morning and tried it out. I don’t like the “\” operator for field access but that is the way Blitz did it as well. Other than that, the language seems packed with commands to make game dev quite fast. The examples all worked fine and I had a lot of fun playing around with shaders just to see what the different FX actually do. So it has been educational as well.

One thing I like is both Nuclear Basic and Nuclear Fusion are more “to the point” than working with PureBasic and Ogre3D. Meaning NB and NF require much less set up and less code to actually get things done. If I went with PureBasic I’d need to spend time writing wrappers around their Ogre3D stuff to get to the same level of development.

Like PureBasic, Nuclear Basic is not free (although they have a 30-day free trial). I guess what I will do is play around with Nuclear Basic and see what I can accomplish within a week. I could certainly keep digging because there are likely many more options out there but I am getting to the point where I am tired of digging and want to get started doing some development.

Anyway, after a week of using NB I should know if I want to buy it and use it going forward, should search for more options or simply return to Unity3D and try out my code-oriented development approach.

 

02/22/2016 6:14 PM  …  It’s a Strange World Out There!

Ha ha! Well, my adventures with Nuclear Basic are finished. I joined the forums over there and posted a message asking some questions about the community and future development. Received a good response and a welcome from forum member madjack. I replied to their post and hit the submit button only to see a page that said I had been banned.

Banned for posting this?

Yeah, I don’t get it. Maybe that is someone’s way of telling me this is a waste of my time.

Anyway, on to the next thing.

 

03/03/2016 9:46 PM  …  Finally Decided on Unity3D for My 3D Game Development

It’s been about 10 days since my last update.  So what have I been doing?

I spent a little more time searching for other code-oriented solutions and even considered just doing some raycasting for so called “fake 3D games” actually using 2D. However, that was a brief thought despite really liking the way those games look and feel.

In the end I returned to Unity. In fact, I tried once again to install Unity 5. Previously I had done all of my work in Unity 4.6. I had attempted to install Unity 5 but it simply would not work on my laptop. Anyway, I noticed they had a new update for the 5 series so I downloaded the latest 5.3.2f1 and it actually installed and worked fine!

One of the biggest things I have struggled with in Unity is that editor. I thought it was just because it seemed so strange to start out working in an editor rather than just using a dedicated world editor application and jumping into the code. However, I thought maybe just maybe the reason why I don’t like working in that editor is because something is just “missing” or otherwise presenting an obstacle to my enjoyment / productivity.

Long story short, I tried out the free ProGrids 2 asset from the Unity Asset store and it has made all of the difference. I wouldn’t have thought such a tiny thing was the reason I disliked working in the editor so much but I guess it must have been! Because now with an actual grid and automatic snapping to grid in the editor I find working in the editor a breeze. It really just made a huge difference for me and I recommend everyone using Unity to try it out.

I still may try my idea of using a non-component based approach to the coding. Maybe. I mean I will still add colliders and character controllers and so forth to GameObjects in the editor but beyond that I would like to try out a more traditional programming approach to my Unity3D game dev. Just so I will know from firsthand experience which way works best for me personally. It is all about maximizing productivity! I am always striving to use the approaches and workflows that allow me to get the most done in the least amount of time.