Pre-Order the Game!

Desura Digital Distribution

Sunday, September 16, 2012

Source Code Uploaded!

I've just uploaded the source code for Beyond Beyaan to!

Now, before I explain the structure for the game's code, I would like to take a moment and share the reasons for lack of development progress the past couple of months.

On July 3rd, our baby Marie was born 10 weeks early.  Ever since then, our life has been hectic.  Sometimes I have some free time to work on the game, but that was rare.  I needed to support my wife both physically and emotionally.  And so my motivation for working on the game declined.  After all, it's just a computer game, it's not as important as our newborn.  I can go back to the game later when things gets better.  There were some scary situations when our baby required antibiotics to fight a deadly infection, and requiring a blood transfer.  Then there's the period when she wouldn't keep the milk down.  But the good news is that she has recovered, and has just arrived home with us today!  So hopefully in a month or so, our lives will be stabilized enough for me to resume work on Beyond Beyaan.

I know that you all are waiting for the next Master of Orion game.  It sure seem like the MoO 2 curse is working hard against me, but I won't let it succeed!  There will be a complete version, the game will be playable!  :)

Now, about the source code.  I've tried to keep it clean and easily refactorable.  So I'll explain how all of it is organized.

First up is the "GameMain.cs".  This is the core of everything, it stores the galaxy, the empires, etc, and is located in the same directory as the project.  All of the UI refer to it.  GameMain.cs stores the different parts of the game, and each of those parts (such as "EmpireManager") handles the logic internally.  The UI is responsible only for updating the values and displaying them.  So it's critical that major components are stored in GameMain.cs, and that the UI does not have game logic in them.

Then there's four directories:
Utility - static classes that assists in different calculations (such as line/circle intersection and so forth), all static classes/functions goes here.

Data Modules - Data classes that both stores and processes data.  For example, "planet" class stores data about a planet, and has functions for processing data such as population growth, production, etc.

Data Managers - This is a collection of classes that helps in managing the data classes.  An example is the EmpireManager class.  It stores which Empire is doing its turn, all of the empires in the game, assists in the end-turn processing by going through each empire and calling their "ProcessTurn" function.

Screens - This is the UI for the game.  Each screen is an independent class, with each screen being able to contain and display other classes.  An example is the GalaxyScreen class.  It displays the galaxy screen where you see the stars, fleets, starlanes, etc.  It also stores "SystemWindow", in that if a system is selected, it calls the "SystemWindow.LoadSystem()" then draws SystemWindow as a part of GalaxyScreen's drawing code.  The GameMain class also manages which of the main screen is currently displaying.  If the name is "Screen", it's a main screen.  If the name is "Window", it's a sub-window that can be stored and displayed by another window or screen.

There's still a lot of work to be done.  The assets on Desura is not yet updated to work with this version.  My plan is to finish the planet screen UI, then update both demo and full versions on Desura so you can drop them into the project and run it.

Yes, the Demo version will be runnable by compiling this project.  So what will be the difference between the full and demo versions?  As of now, the demo has all the races (4 of them), while the full will have more added in the future.  Also, there will be less technologies and artwork for space combat, so basically a limited version, sufficient to let people try it and taste the possibilities of the full game's version.  However, it's possible that people not buy the game, and just download the source code and provide their own content.  But if you want to support this project, please don't hesitate to buy it!  The funds will go directly into adding new assets (new races, new technologies, etc).

Since the game's engine is now open source, and the only thing I profit from are assets, I'm considering merging my "ReMoO" project into this game's source code (For more details, go to this post:  What that means is that when I'm done with Beyond Beyaan's features, as in that it's a fully playable game, I'll look into adding the ability to load MoO 1's files directly, and you'll be able to play it without requiring DosBox.  Maybe in the future, if multiplayer is added, people can finally play MoO 1 multiplayer and see how their strategies work against other people :)

If you're interested in using some or all of my game's source code in your commercial project, let me know and we can work out the licensing agreement.  There's already one person who've expressed interest in using parts of my game's code for their project to help speed their development along.  The truth is, I won't be able to inspect all of the available 4X development projects to make sure they're not ripping my code off.  So I'm trusting you all to be honest :)

Have fun digging in my 23k plus lines of code! :)


  1. 23k lines of code O_O! That's twice as much as Stareater, even with autogenerated GUI code (Winforms, designer classes). I guess I got lazy lately...

    Glad to hear the baby is OK.

  2. Yeah, most of the underlying framework for the game are done. There's some features that's not completely done, and a few that's not implemented. The majority of work remaining are the UI, space combat, diplomacy, and AI. Space combat is about half-done. AI is just a placeholder, it does nothing. But the functions for processing are there and being called (despite it being empty).

    This game is around half-done, which is far more than many of the failed 4X games. I want to see it all-done! :)

  3. I also wish you all the best for your family!
    You truly have the right priorities!!!

    Im just hoping things get better, and you can continue to work on your gaming dream and make it come true.
    Hopefully you find some people to work together with you on the matter to speed things up.
    In the meantime Im putting part of my hope in Starlords and MORE ;-)