Canonical orx game project template

20 views
Skip to first unread message

enobayram

unread,
Sep 7, 2015, 6:33:23 AM9/7/15
to orx-dev
Here's what I'm planning to do:
  1. A public repo containing a base project that contains all the setup needed to compile for all the targets (initally I'll have desktop + android). People can fork it (or a script can do it for absolute beginners) and later merge changes from upstream. I really prefer this to a script that generates a layout, as it's then hard to merge later improvements.

  2. The project uses biicode+CMake to fetch dependencies and compile the project for all targets. So all you have to do is to issue:
       bii build android
    to obtain an apk. CMake can further be used to generate project files for most IDEs.

  3. C++ build configuration has no redundancy. That means, you define your build configuration at one place and it's used to build all the targets. So, no need to worry about android.mk etc.

  4. All the user has to do is to install biicode and clone/fork the base repo, everything else gets fetched automatically, including orx, all the other dependencies and even the (cross)compilers and cmake.

  5. I aim to enable the following host-target configurations:
    Host Linux -> Linux, Windows, Android
    Host Windows -> Linux, Windows, Android
    Host MacOSX -> Linux, Windows, Android, MacOSX, iOS

    Once we have a web build, we should be able to target it from all host platforms.

  6. I will also export some of my utility libraries as packages that can easily be fetched by this setup and create a workflow from preparing packages and publishing them to biicode.
I'm looking forward to your feedback.

solewalker

unread,
Sep 7, 2015, 8:48:31 AM9/7/15
to orx-dev
Hey, your idea of a base project. I have not used bii, but checked their examples and such, seems interesting. For sake of arguments we think, base project is configured for all the targets. So to start a new project,

 i) Install biicode
 ii) Clone or download the repo
 iii) Build orx first which will automatically fetch all the dependencies needed.
 iv) Then build your project like "bii build windows" or "bii build android" or build from generated project with help of an IDE

Pretty convenient, I hope there is a way to rename the project other than what the base project is named, also there should a be build config file for project specific settings. Let's see what others say, we already have a premake build system, not sure if we should totally move to a different one, also I am not very knowledgeable in this regards.

enobayram

unread,
Sep 7, 2015, 8:58:21 AM9/7/15
to orx-dev
The way I'm planning to do it, compiling orx isn't one of the steps. In fact, since orx already has its premake based build system, I'm not planning to get the users' computers to compile orx at all. I'll upload the orx binaries for all the platforms to biicode, so they'll just be fetched. I'm not suggesting that we switch orx's own build system to cmake, what I'm suggesting is that the user projects' build system will be biicode+cmake, which will download precompiled orx binaries for the target platform.

As for renaming the project, you can of course do that by (publicly or privately) forking the base repo. There will probably be other places where the project name appears (like the android manifest etc.) and we can automate the name-changing process via simple scripts.

solewalker

unread,
Sep 7, 2015, 9:04:17 AM9/7/15
to orx-dev
Okay, but do we need to host a web server or something to store the precompiled? Because I don't want it to get too complicated.

Enis BAYRAMOĞLU

unread,
Sep 7, 2015, 9:08:30 AM9/7/15
to orx...@googlegroups.com
Nope biicode is like github, it already hosts tons of open-source libraries and I'm planning to add orx there. This also means that any project using this setup will be able to incorporate all those libraries (from math to networking and whatnot) in their projects with a single line of code.

BTW, with biicode+cmake, most libraries get downloaded and compiled as needed, but those libraries use biicode aware cmake as build configuration. And that will also be the case for future community contributed orx-oriented libraries. Since I don't want to touch orx's build system, I'll just make it download the binaries as an exception instead of compiling them.

--
You received this message because you are subscribed to the Google Groups "orx-dev" group.
To post to this group, send email to orx...@googlegroups.com.
Visit this group at http://groups.google.com/group/orx-dev.

solewalker

unread,
Sep 7, 2015, 9:18:26 AM9/7/15
to orx-dev
Sounds fine to me. But always linking to static lib is not a good idea, e.g. you have a UI lib or some helper functions you want to share, you can do it through biicode, and it will be added in the project but if the user wants to change a few thing, or want to look into the source to understand how its done, then no way to view the source, or change or add a few things without going through biicode. So, in some cases linking or adding plain source file is a better way to do.

Enis BAYRAMOĞLU

unread,
Sep 7, 2015, 9:23:50 AM9/7/15
to orx...@googlegroups.com
I'm not very experienced with biicode (yet) but I think you can easily configure a local source folder as a dependency. If a user wants to be able to modify a biicodified orx library, he can download that library, point his project configuration towards where he's keeping the local copy and still get all the benefits of this new setup (multi-platform, automatically packaged etc.). Better yet, the user, when satisfied with his modified library can publish his version back to biicode, and use his fork in his project.

solewalker

unread,
Sep 7, 2015, 9:29:33 AM9/7/15
to orx-dev
One last confusion, after you add orx in biicode, how will orx get compiled, or how the daily or weekly orx build will be available for end user to use?

Enis BAYRAMOĞLU

unread,
Sep 7, 2015, 9:31:10 AM9/7/15
to orx...@googlegroups.com
Orx is already continuously compiled, you can download all the binaries here: http://sourceforge.net/projects/orx/files/orx/

In fact, I haven't compiled orx myself for a long time.

Enis BAYRAMOĞLU

unread,
Sep 7, 2015, 9:34:04 AM9/7/15
to orx...@googlegroups.com
BTW, Uploading these binaries to biicode will not be automatic (at least in the beginning), so you'll configure your project to depend on a certain release (which is probably a good idea anyway). In the long run, if everyone's happy, I'm sure we can modify orx's build slaves to upload automatically to biicode, so you have access to nightly builds.

solewalker

unread,
Sep 7, 2015, 9:47:09 AM9/7/15
to orx-dev
Yes, I was talking about biicode, now it is cleared. I too have not compiled orx lately.

What I would really like to see besides biicode way of doing new project, is a single zip containing orx precompiled lib for all the platform, with a script to create a new project, from a template project. So, it will create with project targeting all the platform, with appropriate lib linked to appropriate platform. Right now, everything is done separately. So, I download VS libs and create my project manually from VS. So far so good, I am building for VS now. But if I want to build the same project in my mac or for android, I don't see a way other than downloading the mac or android demo, then copying my assets and source there. I had to create 3 project for 3 platform. This process is complex and demotivating.

Enis BAYRAMOĞLU

unread,
Sep 7, 2015, 9:52:23 AM9/7/15
to orx...@googlegroups.com
This is exactly what I'm trying to solve with cmake. One build configuration for all targets from all hosts. I'll try to come up with a solution that satisfies both your "single zip" requirement for simple beginnings and also my biicode+base repo for larger projects with more ambitious long-term goals.

My purpose is to be able to forget all about the plumbing of setting-up an orx project. One place to declare everything, and everything just works.
Reply all
Reply to author
Forward
0 new messages