Project

General

Profile

Coding has started, kind of

Added by quintus over 1 year ago

Dear all,

as you might have noticed by looking at the Activity tab: I have added the first source code to our repository. I spent most of today with finding out how to recursively build Ogre with its dependencies and I think I succeeded. The way I have set things up now should release us from the dependency problems we had with TSC: all dependencies are included in the source code repository, built during the compilation process, and then linked in statically. Exceptions are OS-specific libraries like libx11. Maybe I also build and link them statically at some point, but for now this overcomplicates things and these libraries are present on any system anyway.

So, I think we can say that, today, the first step has been taken. The actual source code I added is simply a hello-world function -- today's work was in the dependencies. Time to get things done.

-quintus


Replies (27)

RE: Coding has started, kind of - Added by quintus over 1 year ago

I was able to get Ogre itself running on top of GLFW. I include a screenshot below. It shows Ogre's tutorial demo running on top of GLFW; the ogre 3D model is a sample model included with Ogre. I have merged everything into the master branch now and removed my experiments branch now that I see more clear through Ogre's architecture. I have also now made the Git archive public for everyone and will probably do the same with our Redmine page as a whole (I will give a further notice on this). You can clone the repository with git:

$ git clone git://git.guelker.eu/rpg.git

To compile the project, follow the instructions in the README. It should be pretty straightforward, albeit a little time-consuming because compiling the dependencies takes a while.

xet7, could you please try building this on Ubuntu and provide a sneak apt commandline that installs all the required dynamically linked dependencies with their development headers (like libx11-dev)?

Here comes the promised screenshot:

Demo screenshot

screenshot.png (391 KB) screenshot.png Screenshot

RE: Coding has started, kind of - Added by xet7 over 1 year ago

This seems to work for me on Ubuntu 20.10 and Mint that is based on 20.04:

sudo apt install build-essential g++ cmake libx11-dev \
libglvnd-dev libxrandr-dev libice-dev libxext-dev \
libsm-dev libxrender-dev libxau-dev libxdmcp-dev \
libicu-dev zlib1g-dev libfreetype-dev automake \
libharfbuzz-dev ragel libxinerama-dev libxcursor-dev \
libxi-dev

RE: Coding has started, kind of - Added by quintus over 1 year ago

Thank you so far already!

Am Freitag, dem 01. Januar 2021 schrieb xet7:

This seems to work for me on Ubuntu 20.10 and Mint that is based on 20.04:

I interpret this as you seeing the ogre? In that case, it is great that
it does work! This means I have been doing it correctly.

sudo apt install build-essential g++ cmake libx11-dev \
libglvnd-dev libxrandr-dev libice-dev libxext-dev \
libsm-dev libxrender-dev libxau-dev libxdmcp-dev \
libicu-dev zlib1g-dev libfreetype-dev automake \
libharfbuzz-dev ragel libxinerama-dev libxcursor-dev \
libxi-dev

There are some things here that I think can be removed. Can you retry
with the following two packages uninstalled:

  • libfreetype-dev
  • libharfbuzz-dev

Harfbuzz and freetype are built as dependencies in the compilation
process. These two are probably the most hairy dependencies being built,
because they are interdependent. The build system thus builds freetype
actually twice, but that is not something you need to care about. Just
tell me if you can compile the `rpg' executable successfully without
their development headers.

The line contains more X11 libraries than I actually use, but they are
probably needed for compiling the depencendies. The same goes for
automake (which pulls in autoconf); I forgot that the dependencies of
course do use autotools to a large extend and thus need it available.

-quintus

RE: Coding has started, kind of - Added by quintus over 1 year ago

Am Freitag, dem 01. Januar 2021 schrieb xet7:

ragel

Oh, and also try if you can remove ragel from the commandline. I am
not aware of it being used anywhere. I do not have that package
installed on my own system, though I would be surprised if it is needed.

-quintus

RE: Coding has started, kind of - Added by xet7 over 1 year ago

Mint did require ragel. Here is running on Mint natively:

And here is running at Ubuntu KVM VM at my server, via virt-manager:

RE: Coding has started, kind of - Added by xet7 over 1 year ago

At Ubuntu, after removing libfreetype-dev libharfbuzz-dev ragel:

checking whether the linker accepts -Bsymbolic-functions... yes
checking for native Win32... no
checking whether gcc is Clang... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for icu-uc... yes
checking for freetype2 >= 12.0.6... no
configure: error: FreeType support requested but libfreetype2 not found
make[2]: *** [deps/CMakeFiles/harfbuzz.dir/build.make:109: deps/harfbuzz-prefix/src/harfbuzz-stamp/harfbuzz-configure] Error 1
make[2]: Exiting directory ”/home/wekan/repos/rpg/build”
make[1]: *** [CMakeFiles/Makefile2:253: deps/CMakeFiles/harfbuzz.dir/all] Error 2
make[1]: Exiting directory ”/home/wekan/repos/rpg/build”
make: *** [Makefile:84: all] Error 2

RE: Coding has started, kind of - Added by xet7 over 1 year ago

At Mint, after removing libfreetype-dev libharfbuzz-dev ragel:

make[4]: Making `install' in `gendict'
make[4]: Making `install' in `escapesrc'
make[3]: Making `install' in `data'
pkgdata: cd ../lib/ && /usr/bin/install -c libicudata.a /home/wekan/repos/rpg/build/deps/lib/libicudata.a
make[3]: Making `install' in `extra'
make[4]: Making `install' in `scrptrun'
make[4]: Making `install' in `uconv'
[ 57%] Completed 'icu'
[ 57%] Built target icu
make: *** [Makefile:84: all] Error 2

RE: Coding has started, kind of - Added by quintus over 1 year ago

Thank you again.

You have uncovered an error in the build configuration I wrote. I
misused the --with-sysroot option to configure. It did not limit the
search path to the dependencies directory; in fact it appearently did
nothing. What was happening on your system was that the subprojects
detected the host system's freetype and harfbuzz headers, but then
linked to the libraries compiled. That's a recipe for desaster; header
and library of possibly different versions! It only worked for you by
accident.

I have now changed the approach and pass the LDFLAGS and CFLAGS
environment variables directly to the autotools-based external projects,
along with PKG_CONFIG_LIBDIR to catch projects using pkg-config.

Please retry with my most current changes on master. If all goes well,
neither of libfreetype-dev, libharfbuzz-dev, ragel is needed.

-quintus

RE: Coding has started, kind of - Added by SiggyPop over 1 year ago

Hi, ;>)

nice to hear that the code(ing) finally starts! As with the moon landing: A small step, but a big one for humanity! ;) lol
I wasn't idle either - I put a lot of notes on paper that still needs to be worked out. And since Quintus noted that the game shouldn't just be in a gloomy mood, I toyed with the idea of incorporateing The Lydian Mode. More of it soon...
Hope you have all survived the holidays well - was a bit quiet this year... but also does good.
"A guat's Nei's!" - as we tend to say in Bavaria, lol.

  • SiggyPop.

// lol - have seen this ugly monster recently in a tutorial... typical for Ogre3D

RE: Coding has started, kind of - Added by xet7 over 1 year ago

quintus wrote in RE: Coding has started, kind of:

Please retry with my most current changes on master. If all goes well,
neither of libfreetype-dev, libharfbuzz-dev, ragel is needed.

After your changes, now it does build without those 3 dependencies on Ubuntu and Mint.

BR,
xet7

RE: Coding has started, kind of - Added by quintus over 1 year ago

xet7:

After your changes, now it does build without those 3 dependencies on Ubuntu and Mint.

Thank you, xet7! I will adapt the README accordingly. This means we now have a starting point.

SiggyPop:

lol - have seen this ugly monster recently in a tutorial... typical for Ogre3D

Nice to know, an interesting co-incidence. I would be overly happy if you ever reached that quality in your models, but of course I will gladly accept anything inferior as well. Remember that we can start with simple models and improve over time -- time we have a lot.

Hope you have all survived the holidays well - was a bit quiet this year... but also does good.
"A guat's Nei's!" - as we tend to say in Bavaria, lol.

Thank you, I hope everything went well for you as well. Even though I live now in Bavaria, I still have problems in understanding the language at some times! I am sure it will improve over time. And yes, I had no problems in changing years.

-quintus

RE: Coding has started, kind of - Added by SiggyPop over 1 year ago

  • I'll do my best! ;)

Here's a link to the game "book of unwritten tales" - it's made with ogre3d, so that you can see, what awaits us:

https://www.youtube.com/watch?v=LmC6-q_T8f0

in the second half of the clip you see a two-headed ogre, hehe - the above monster reminded me of it, lol. :D
A very funny game - i've ripped it through several times. A good inspiration, I think...

  • SP.

RE: Coding has started, kind of - Added by quintus 11 months ago

I would like to give a short status update. I have updated some dependencies (notably, Ogre itself changed its versioning scheme and I upgraded thus from version 1.12 to version 13) and I added the Bullet physics library as a dependency. Currently I am looking into ticket #25 and for this purpose have experimented further with Blender and the blender2ogre plugin. I was able to successfully export .scene files from Blender and my modelling skills slowly improve. If you compile and run current master, you will see a new test area with a slope and two small houses. This is in preparation of adding game physics.

That exporting .scene files was successful is actually an important fact. Since our game areas will mostly be designed in Blender, it is required to export them as a whole, not just each model on its own. This is exactly what .scene files are for, which contain the entirety of a Blender world in a .blend file converted to Ogre's .scene format (which on the Ogre side is loaded with the DotScene plugin, which I also enabled in the build CMake files for Ilmendur). This chain works fine with my simple test files so far.

-quintus

RE: Coding has started, kind of - Added by SiggyPop 11 months ago

Sounds good! ;)

RE: Coding has started, kind of - Added by quintus 6 months ago

A quick update about what I’m doing. With the most recent commit it is possible to move the player placeholder around finally. The movement is very clumsy, but please bear with me. It is my first time I try to move around a 3D object by joystick input. It’s not much, but it is progress. However, this state is not smooth enough yet to go forward and begin building areas.

RE: Coding has started, kind of - Added by SiggyPop 6 months ago

Coool - w. 3 os, Quintus - my saying, lol. :D
I'm happy about every progress - so you don't lose the joy!

  • Then all we have to do is create a character and put him in the scene. I've read that you can also use chars created with "make human" in Blender. Let's see - maybe I can create a dummy for you. So keep up the good work! Cya soon!

SP.

(I also have new ideas. - For example, I would like to include the diminished chord for dark scenes - I think that sounds appropriate. Worked out a connection with the minor chord - good for the dungeon.)

RE: Coding has started, kind of - Added by quintus 6 months ago

So, the movement is now much improved. It’s now possible to steer a cube around with one of the gamepad joystick and rather freely moving the camera with the second joystick. It still has some rough edges, but I’m confident now that the implementation is on a good way. I attach a video of the current state of affairs so you can actually judge the progress I tell here. In the video, I move said cube around and play a little with the camera.

-quintus

cube.mp4 (17.3 MB) cube.mp4 Moving the cube around
cube.webm (4.2 MB) cube.webm WebM variant

RE: Coding has started, kind of - Added by sydney 6 months ago

Nice! Thanks for sharing your progress. That looks awesome.

-Sydney

RE: Coding has started, kind of - Added by SiggyPop 6 months ago

Hiya, :)

Nice to see that something is still going on. That also motivates me to keep going.

  • SiggyPop.

RE: Coding has started, kind of - Added by Denerio 5 months ago

There is great progress being made in this project, very nice. I am very impressed that we actually have a working 3D world now which becomes better and better.

Denerio

RE: Coding has started, kind of - Added by quintus 4 months ago

Progress. I got a UI library (Dear Imgui) to work. As it turns out, Ogre has built-in support for that one, it just needed to be turned on in the compilation options for Ogre. Below is a screenshot of Imgui showing it’s demo window on our test 3D scene.

Demo UI screenshot

For the less technically inclined: this means I can now start programming the menu system, i.e. everything that requires text on the screen.

-quintus

ui.png (749 KB) ui.png Demo UI screenshot

RE: Coding has started, kind of - Added by xet7 4 months ago

Great progress quintus ! :)

RE: Coding has started, kind of - Added by Denerio 4 months ago

That is actually very nice, it makes things much easier.

Denerio

RE: Coding has started, kind of - Added by quintus 3 months ago

I present... The gamepad configuration menu. It is not finished yet, but selection of the gamepad, the steering and camera axes does work.

Screenshot:

Screenshot

Believe me, getting this right is finicky. Most of this menu is a large invisible table, except for the comboboxes above and the “Save Configuration” button below, whose positions and sizes are manually calculated from the table’s determined size. Since Imgui requires building the table row by row rather than column by column, this complicates the menu’s internal code quite a bit, as it is necessary to distinguish between player 1’s configuration on the left, and player 2’s configuration on the right side. Also, even if it looks as if there are only 2 columns at first glance, if you properly inspect the picture, you will find that actually, this table has no less than 15 columns!

I made the used symbols with Inkscape. Improvements welcome.

-quintus

joyconfig.png (52.8 KB) joyconfig.png Screenshot Joyconfig menu
(1-25/27)