Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Minarus (Working title, c++/SDL/OpenGL/TBB)  (Read 2736 times)

Deneidez

  • Bay Watcher
    • View Profile
Minarus (Working title, c++/SDL/OpenGL/TBB)
« on: January 27, 2010, 11:02:54 am »

Some of you maybe already know that I am working on some sort of secret or less secret game project. Working title of the game is Minarus. Game is basically supposed to be some sort of mixture of Oblivion, Dwarf Fortress and UnReal World. That would be something like first person wandering in the world that really 'lives' and where you could make your own houses, stuff etc. There are also some ideas about politics(heavily influenced by The Guild game series) etc..

What I have done already:

- Designed game system core (How menus & such work etc.)
- 3D engine (Skeleton of fully working 3D engine. I will add features when I need them.)
Spoiler (click to show/hide)
- Partly designed game mechanics(As much as I could design as some features might change them anyway.).
Spoiler (click to show/hide)

Next thing to do:
- Design and code fractal world generator that uses given seed.

Something about current phase:
Spoiler (click to show/hide)

As you can see project is far from complete and at this point its just closed source fun project. Sources however might be available for download some day, but for now its all closed source.

Ask just about anything, give ideas if you wish etc.
« Last Edit: January 29, 2010, 01:57:55 am by Deneidez »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #1 on: January 27, 2010, 12:48:19 pm »

Sounds promising, and a lot like the long-term secret project I just revealed here ;)

I loved the Guild, although there were quite a few gameplay issues.

I'm curious to your progress, as I'm in exactly the same stage as you...
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

alfie275

  • Bay Watcher
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #2 on: January 28, 2010, 01:51:19 am »

So it's sort of like Wurm?
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

Deneidez

  • Bay Watcher
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #3 on: January 29, 2010, 02:03:03 am »

So it's sort of like Wurm?
Something like wurm, but mine is singleplayer and I was thinking about some sort of survival concept too where you must have basic things you need for living.

(Well, designing fractal world gen for n cores wasn't that hard actually. Next thing would be coding. :) )
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #4 on: January 29, 2010, 06:15:08 am »

(Well, designing fractal world gen for n cores wasn't that hard actually. Next thing would be coding. :) )
Really? What scale, what features did you implement, and how did you do it?
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Deneidez

  • Bay Watcher
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #5 on: January 29, 2010, 08:14:01 am »

(Well, designing fractal world gen for n cores wasn't that hard actually. Next thing would be coding. :) )
Really? What scale, what features did you implement, and how did you do it?
(I haven't implemented it yet just designed.)

Uhm... Lets see if I can explain it...

I assume you know how diamond-square works.

Basically when you have one fractal gen you don't need more, because you can use it to do just about all stuff you need. For example you can use it to make landscape and use them in 3D(Thats pretty basic use for diamond-square). Next you can use same generator to make more 'landscapes' and use them for example to show vegetation or amount the trees etc. What I am planning to do first is two generated 'landscapes' one is for landscape and another for trees.

Ok, then the algorithm.

1. One thread makes random numbers from the given seed(These are stored into areas that can be calculated separately. See below.).
2. When theres enough random numbers for current diamond-square 'zoom' phase(First phase is 2x2, second 4x4 and so on.) n threads do the rest of the calculations. The calculations are done the way that theres no need for locks & stuff. How? Uhm... For each area theres only need to calculate middle point, upper point and point that is on the right(trivial). How to make it thread-safe? Lets use 2x2 to show how does it go.

First of all you can't use same numbers from same area that is one zoom level above area you are calculating(Too confusing? Read on, I hope it will make sense in one point.).

One zoom level above 2x2 looks like this

0

So no calculations can be done parallel. They have to be done like this in 2x2(1=calculating values).

10->01->00->00
00->00->10->01

Next will be 4x4(Lets split the areas that can be calculated separately.).

2x2 looks like this and its one zoom level above 4x4

0|0
----
0|0

So 4x4 can be done like this

10|10->01|01->etc.
00|00->00|00->
-------->-------->
10|10->01|01->
00|00->00|00->

Next 8x8...

etc.

It might not be the best way to do it, but I wasn't looking for optimal way to do it yet. :)
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #6 on: January 29, 2010, 08:34:18 am »

Ah, you designed the basic algorithm. I was more wondering how you made sloped rivers, river deltas, slow height transitions, interesting features, liquid and air erosion and below-ground stuff ;)

I've seen the lighthouse3D tuts you linked, but they're hard to implement in the quasi-voxel engine I'm working on. I just abandoned the generating part to work on the loading/saving of the terrain, right now its just a boring particle-dropper, unfit for multithreading.

Also, have you already looked at multithreading options? Will you/are you be using openMP, pthreads or Windows threads? Personally, I'm leaning towards openMP for the client, and pthreads for the server, but each implementation has its own benefits and drawbacks.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Deneidez

  • Bay Watcher
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #7 on: January 29, 2010, 08:47:19 am »

Ah, you designed the basic algorithm. I was more wondering how you made sloped rivers, river deltas, slow height transitions, interesting features, liquid and air erosion and below-ground stuff ;)

I've seen the lighthouse3D tuts you linked, but they're hard to implement in the quasi-voxel engine I'm working on. I just abandoned the generating part to work on the loading/saving of the terrain, right now its just a boring particle-dropper, unfit for multithreading.

Also, have you already looked at multithreading options? Will you/are you be using openMP, pthreads or Windows threads? Personally, I'm leaning towards openMP for the client, and pthreads for the server, but each implementation has its own benefits and drawbacks.
Nope, just making basic stuff and trying to make it work on multicores. I will make weather engine later.

For multithreading just like topic says I will use TBB( http://www.threadingbuildingblocks.org ). Everything I have done is pretty much crossplatform. Developing will be done on debian, but I have multiboot with windows and I have been looking for mac(My parents have mac tho). So I can compile for those three platforms at least.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Minarus (Working title, c++/SDL/OpenGL/TBB)
« Reply #8 on: January 29, 2010, 05:38:06 pm »

Ah, that's what TBB was. Nope, in my Quest For MultiThreads I hadn't encountered that one yet. Looks promising, I'm going to check it out.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))