# Testing Orx.

Greets!

I'm but a newcomer here as in coding and game dev as a whole, but i'm willing to learn. Searching for a 2d engine able to concretize my rpg/adventure game, i've been impressed by Orx. But, least i could say, is that it's not so user friendly: haven't been able just to start the machine...

With git installed, i comanded the git clone for the expected output and a checked conectivity. But then, there are two setup in my root folder, wich i had to find with cortana, and when clicked, i got what seems to be the output expected, though only for a few seconds, without bein able to read the final part, and noth... Don't know what's an $ORX variable, or where's that orx/code folder. Don't know if i have the Orx source, dependencies, and newly created build project, don't know if i can compile Orx with your favourite IDE to get a working orx.dll and .lib, .dylib or .so (depending on platform), and how... So maybe orx is too much for my meagre knowledge and skill, or maybe it's just a dificult first step? ## Comments • edited November 2018 Hi Syl and welcome here! So, let's see if we can help you with the setup. I have to admit developing in C/C++ comes with finicky setups however we've tried to smooth it up as much as we could with orx. Did you get a chance to check the wiki's section about the setup/initial clone? I believe @sausage wrote a detailed guide for it: http://orx-project.org/wiki/en/guides/beginners/main Don't hesitate to let him know if you see parts that can be made more beginner friendly as that's the whole point of that document. The original setup can be summarized as: 1- clone orx's repository 2- run setup.bat on windows and setup.sh on linux/osx 3- build orx This is a one time thing. You can then use orx directly. Of course, if you decide to update it, you'll need to also compile it but you won't have to re-run setup yourself, so only steps #1 and #3 for updates. Now, let's check the details. With git installed, i comanded the git clone for the expected output and a checked conectivity. But then, there are two setup in my root folder, wich i had to find with cortana, and when clicked, i got what seems to be the output expected, though only for a few seconds, without bein able to read the final part, and noth... Don't know what's an$ORX variable, or where's that orx/code folder. Don't know if i have the Orx source, dependencies, and newly created build project, don't know if i can compile Orx with your favourite IDE to get a working orx.dll and .lib, .dylib or .so (depending on platform), and how...

Right, once you did your clone with git, it should end up in a folder named orx, wherever you decided to clone it. In the root of that folder, there's the setup.bat/setup.sh file that you ran. It usually only take a few seconds to run, all it does is download the external dependencies, create the build projects and set the ORX environment variable (the famous $ORX you've mentioned). Now would be a good time to ask what is your OS? Windows? Linux? OSX? Depending on your OS, you have a few choices of IDEs/compilers. On Windows, most people use Visual Studio. On OSX, it'd be XCode. They're both supported but we also support Makefile, Codelite and Code::Blocks, on all three OSes. In order to build orx, you need to go to where you cloned orx (where setup is). In there, you navigate to code/build/<your_os>/<your_ide>. You'll find the projects to build orx there for all the mentioned systems above. In order to build orx, open the project file, and compiled the following configurations: Release, Profile and Debug. It will compile in about 30 secs for each configuration and you're all done. Now you can create a new project by running init.bat/init.sh in orx's root folder (next to setup). Ex: on windows: init c:\MyOwnProject  on linux/osx ./init.sh ~/MyOwnProject  That will create a folder named MyOwnProject and prepare all the files to build it. All there's left to do is compile it (it should find orx automatically by using the environment variable ORX, that we've seen earlier). If you struggle with any of these steps, don't hesitate to poke us on the chat directly, there should always be someone around to help you: https://gitter.im/orx/orx Good luck! • Hi Syl! So you mentioned cortana, so you would mean you are using windows. Your choices are to use Visual Studio (might be easier for a beginner) or you can go down the mingw/gmake/codelite way. We're keen to help you out if the guides are not working for you. If we can improve these for beginners, that would be great. At the end of the day, orx will be a great choice for your rpg. You'll have quite a fast, full featured engine at your disposal. • Thxs you both! Well, dunno what went wrong, but my init don't initialize anything... So, to sumarize, i got the orx repository, then clicked the windows setup, saw for a few sec something like a 'compile'? scrolling in that black window... I assume that orx was built? Then i've been to code/build/windows/vs2017  to find but an orx.sln solution visual studioamong other vcxproj files... Clicked it to start a VS2017 process: To have my computer restart. So returned to my orx root, clicked the init, but for noth... Nothin happens.. But at least, my vs2017 folder changed: So... • So apparently you didn't have the C++ part of VS2017 installed, hence the download on Visual Studio side. You can now open orx.sln and compile the 3 configurations I mentioned earlier: • Release • Profile • Debug For init.bat, you can't click on it, you need to open a command line in the folder where it is and type init <path\to\your\new\project>. I guess I could make a version for people who want to run it by double clicking it where it'll ask you to enter the path at that moment. I'll look into it this week. • Erh... How do i compile those 3 configurations? Opened orx.sln, to get that: • Sorry I'm on my phone and it's 3AM here so I'll just point you to the wiki. I believe we have pages that cover that with screenshots. @sausage can probably give you more details too. • I'll take over while iarwain is sleeping Just to be clear, init.bat is for generating your own templates to make a game with orx. The orx.sln will allow you to compile the orx libraries for use in a game. That is the first step. Using the orx libraries in your init created template is the second step. But to answer your question "How do i compile those 3 configurations? " Notice in your screen shot you are about to compile Debug and in 32 bit (win32). I can't read the french (sorry) but select Rebuild All from your build menu. • Specifically, you first need to compile the orx library with visual studio. This guide will help you do that: http://orx-project.org/wiki/en/orx/tutorials/visualstudio/cloning_and_building_orx_on_visual_studio Next you need to make a project to use those libraries. The guide to help you do that is here: http://orx-project.org/wiki/en/tutorials/creating_your_own_project • Ok, managed the orx library, but how do I cd (what is it?) my way into the orx folder to try out the input.bat? • Ok so once you have all three configs compiled, it means you have three versions of the orx library built, orx.dll, orxp.dll, and orxd.dll. One is for release mode, one is for debugging and one is good for profiling. You can find where they got built by looking in: \orx\code\lib\dynamic However, you can just leave them there. When you make a project of your own, the project will know how to find these libraries (that's what the$ORX environment variable is for).

You can now also check out the \orx\code\bin folder and try the orx.exe test program and see how the "playground" app runs on your computer.

• Ok, that bounce everywhere! But how to start the init? Where do I type it?

• Cool, so now, open a command prompt and cd to your \orx folder and type:

init.bat c:\temp\MyFirstGame
(assuming you have a c:\temp folder)

A visual studio project should be created at: C:\Temp\MyFirstGame\build\windows\vs2017

Open the MyFirstGame.sln

Compile it, and run. You should see a spinning orx logo. This is your new project to use to make a game in.

• Sorry, i open the command prompt, type the comand, but it says that init.bat isn't recognized... and I don't know what you mean by 'cd' to my \orx folder...

• cd is the command to change directory, ie. navigate through the folders.
Here are more details: https://ss64.com/nt/cd.html

You need to run the init command from inside orx's root folder, otherwise windows can't find it. I'll see if I can make a change tonight to make it interactive, ie. have a prompt asking you where you want to create your project so that you can simply run it by double clicking it in the explorer.

• I actually made an interactive version of init tonight but I'm encountering some difficulties with github.
I'll let you know when it's ready to pull.

• Cheers! But for my knowledge, how do you run the init from inside the orx folder?

• Let's say you cloned orx into c:\workspace\orx
When opening the command line, you'd need to type cd c:\workspace\orx to navigate there.
If it's on a different drive, you'd also need to switch drive.
For example, let's say you cloned orx into d:\projects\orx
In the command line you'd need to first switch drive by typing d: followed by return, then the cd command: cd e:\projects\orx

There are many more examples in the link I've pasted before: https://ss64.com/nt/cd.html

When the new init will be available to you, you'll be able to double-click it, then you'll be prompted to type the name of the project you want to create (you can either use a relative path or a full one).

• Also, don't hesitate to come talk to us directly on https://gitter.im/orx/orx if you need more immediate support, there's usually always someone around.

• It should be safe to pull the git repository. You don't need to recompile anything and you should be able to double-click init.bat now.