Ludeon Forums

RimWorld => General Discussion => Topic started by: dustindps on October 14, 2013, 11:22:47 PM

Title: Engine Used?
Post by: dustindps on October 14, 2013, 11:22:47 PM
Did a search, sorry if repost. What engine was used to make Rimworld? What Language?
Title: Re: Engine Used?
Post by: GC13 on October 14, 2013, 11:39:45 PM
It uses the Unity engine. And from some guesses in the IRC channel today, it's assumed to be written in C#.
Title: Re: Engine Used?
Post by: Tynan on October 14, 2013, 11:43:11 PM
Unity and C#.

I don't use most of the Unity gameplay object and component system, though, because it is too heavy for the thousands of objects in RimWorld. The object framework is custom-coded and fixed-timestep.
Title: Re: Engine Used?
Post by: dustindps on October 15, 2013, 05:34:40 PM
Awesome! I didn't know that Unity was a good 2D engine.
Title: Re: Engine Used?
Post by: Ewan K on October 19, 2013, 09:37:15 PM
Quote from: Tynan on October 14, 2013, 11:43:11 PM
Unity and C#.

I don't use most of the Unity gameplay object and component system, though, because it is too heavy for the thousands of objects in RimWorld. The object framework is custom-coded and fixed-timestep.

Interesting. Which parts of the component system do you use?
Title: Re: Engine Used?
Post by: Tynan on October 19, 2013, 10:41:24 PM
Sound emitters. That's about it, really. The rest of the game is rendered out of a root object that calls every other method in my engine-within-an-engine.
Title: Re: Engine Used?
Post by: Noxmutagen on October 20, 2013, 04:06:37 PM
Quote from: Tynan on October 19, 2013, 10:41:24 PM
Sound emitters. That's about it, really. The rest of the game is rendered out of a root object that calls every other method in my engine-within-an-engine.

What other games do this? Dwarf Fortress?
Title: Re: Engine Used?
Post by: Tynan on October 20, 2013, 04:21:45 PM
No, DF is coded from scratch. I don't think it even has sound.
Title: Re: Engine Used?
Post by: Noxmutagen on October 20, 2013, 04:25:08 PM
so is your engine the one calculating the shots and stuff in combat?
Title: Re: Engine Used?
Post by: Tynan on October 20, 2013, 04:28:53 PM
Yes, of course. It took a long time to get all that stuff working.
Title: Re: Engine Used?
Post by: Noxmutagen on October 20, 2013, 04:56:30 PM
Quote from: Tynan on October 20, 2013, 04:28:53 PM
Yes, of course. It took a long time to get all that stuff working.

so unity supports adding in your own custom engines? kinda like how nvidia PhysX engine doesnt come with sound, and you gotta actually buy their own sound engine on TOP of the physics engine, so you plugged your own engine in using C#? Did it support C++ or is there limitations to Unity? just wonderin.
Title: Re: Engine Used?
Post by: deadmeat3gaming on July 23, 2015, 08:14:34 PM
Quote from: dustindps on October 15, 2013, 05:34:40 PM
Awesome! I didn't know that Unity was a good 2D engine.
Unity is probably better for the 2D than 3D games
Title: Re: Engine Used?
Post by: Tynan on July 23, 2015, 09:01:09 PM
(http://i116.photobucket.com/albums/o31/raynotisick/ThreadNecromancer.jpg)
Title: Re: Engine Used?
Post by: Toggle on July 24, 2015, 04:08:35 AM
Quote from: Tynan on July 23, 2015, 09:01:09 PM
(http://i116.photobucket.com/albums/o31/raynotisick/ThreadNecromancer.jpg)

Invalid card! This is the 1st page of the thread, not the 2nd.
Title: Re: Engine Used?
Post by: JuliaEllie on July 24, 2015, 07:08:15 AM
Quote from: Z0MBIE2 on July 24, 2015, 04:08:35 AM
Quote from: Tynan on July 23, 2015, 09:01:09 PM
(http://i116.photobucket.com/albums/o31/raynotisick/ThreadNecromancer.jpg)

Invalid card! This is the 1st page of the thread, not the 2nd.

The card is valid. "page other than the first" refers to forum page not thread page.
Title: Re: Engine Used?
Post by: milon on July 24, 2015, 07:11:45 AM
^ You need to keep up on the rulesets. The newest revision clarifies this better than the last. It's about the threads page (ie General Discussion) rather than the number of pages within the thread itself. Fact!
</NecroNerd>

Edit - Darn it, got ninja'd
Title: Re: Engine Used?
Post by: GamerGuy on July 24, 2015, 03:34:14 PM
Quote from: Z0MBIE2 on July 24, 2015, 04:08:35 AM
Quote from: Tynan on July 23, 2015, 09:01:09 PM
(http://i116.photobucket.com/albums/o31/raynotisick/ThreadNecromancer.jpg)

Invalid card! This is the 1st page of the thread, not the 2nd.
*Facepalm*
Title: Re: Engine Used?
Post by: TheGentlmen on July 25, 2015, 01:53:59 AM
Quote from: GamerGuy on July 24, 2015, 03:34:14 PM
Quote from: Z0MBIE2 on July 24, 2015, 04:08:35 AM
Quote from: Tynan on July 23, 2015, 09:01:09 PM
(http://i116.photobucket.com/albums/o31/raynotisick/ThreadNecromancer.jpg)

Invalid card! This is the 1st page of the thread, not the 2nd.
*Facepalm*

Update your cards for once... your all outdated.

(http://s24.postimg.org/tjnteqz91/thread_necromancer_card_3.jpg)
Credit to me for gimping (you know, photoshoping... but for gimp... no? Just me?) rimworld over Ubunto.
Title: Re: Engine Used?
Post by: TheGentlmen on July 25, 2015, 11:25:02 AM
Tynan, I few questions...

Do you use the unity built in colliers for calculating if within melee range or simply check if the deference between (X1+Y1)-(X2+Y2) is greater than -z but smaller than z, where z is the range?

Why do you make an engine-in-an-engine, to be more specific why did you use root calls? Wouldn't the Unity Update function suffice, with a little clever usage of Script Execution Order Settings
(http://docs.unity3d.com/Manual/class-ScriptExecution.html)?

Why did you make your own object system? Wouldn't gameobjects with dozen or so reused scripts/one grand script work to? Who does yours be more efficient than gameobjects? Or did I misunderstand what you said?

Do you use the Image component or Sprite Component or a custom one for rendering out the pawns/world? How about the UI?

How does the day-night cycle work? How do the 2d images have shadows? Are they custom made or is their a setting I've not noticed?

Title: Re: Engine Used?
Post by: Toggle on July 25, 2015, 03:17:06 PM
Ubuntuuuuu.
Title: Re: Engine Used?
Post by: TheGentlmen on July 25, 2015, 03:21:25 PM
Quote from: Z0MBIE2 on July 25, 2015, 03:17:06 PM
Ubuntuuuuu.
Os & U... no difrence... just ignore it.
Title: Re: Engine Used?
Post by: Toggle on July 25, 2015, 07:34:13 PM
Quote from: TheGentlmen on July 25, 2015, 03:21:25 PM
Quote from: Z0MBIE2 on July 25, 2015, 03:17:06 PM
Ubuntuuuuu.
Os & U... no difrence... just ignore it.

Nah I just said that because I use it too.
Title: Re: Engine Used?
Post by: TheGentlmen on July 25, 2015, 09:46:37 PM
Quote from: Z0MBIE2 on July 25, 2015, 07:34:13 PM
Quote from: TheGentlmen on July 25, 2015, 03:21:25 PM
Quote from: Z0MBIE2 on July 25, 2015, 03:17:06 PM
Ubuntuuuuu.
Os & U... no difrence... just ignore it.

Nah I just said that because I use it too.

Who said i used it?
Title: Re: Engine Used?
Post by: Toggle on July 26, 2015, 08:17:51 PM
Ah, nah I was confused when you said "Credit to me for gimping (you know, photoshoping... but for gimp... no? Just me?) rimworld over Ubunto." I guess you meant ubuntu was previously there and now it says rimworld?
Title: Re: Engine Used?
Post by: Devon_v on July 27, 2015, 05:07:07 PM
Actually, both cards are invalid because Resurrect is not an MtG action or trigger. :)

"Return target thread from the graveyard to the battlefield" is the correct wording.


Tynan used Unity because it was an affordable multi-platform foundation. It was designed for 3D games using perhaps a few hundred objects, so he wrote his own object handlers to deal with thousands of objects, while eliminating the need to track z-coordinates for anything. The main benefit was that he didn't have to write I/O, graphics and sound for three OSs, and the game could theoretically be ported to Android and iOS someday.

Shadows on 2D objects is just math. If you look closely you'll notice that there are only two or three actual shadow shapes, and they're just extended across the ground plane according to the mathematical position of the sun, which Tynan actually bothered to calculate correctly accounting for latitude and axial tilt.
Title: Re: Engine Used?
Post by: puddlejumper448 on July 27, 2015, 07:09:48 PM
Quote from: TheGentlmen on July 25, 2015, 01:53:59 AM
Update your cards for once... your all outdated.

(http://s24.postimg.org/tjnteqz91/thread_necromancer_card_3.jpg)
Credit to me for gimping (you know, photoshoping... but for gimp... no? Just me?) rimworld over Ubunto.

(http://i.imgur.com/pKl6Bki.png)
Title: Re: Engine Used?
Post by: TheGentlmen on July 27, 2015, 10:38:26 PM
Quote from: puddlejumper448 on July 27, 2015, 07:09:48 PM
Quote from: TheGentlmen on July 25, 2015, 01:53:59 AM
Update your cards for once... your all outdated.

(http://s24.postimg.org/tjnteqz91/thread_necromancer_card_3.jpg)
Credit to me for gimping (you know, photoshoping... but for gimp... no? Just me?) rimworld over Ubunto.


(http://i.imgur.com/pKl6Bki.png)
I need that... give me a minute.
Title: Re: Engine Used?
Post by: Tynan on July 27, 2015, 10:56:17 PM
Thank you Devon for covering some of the questions there :)

RIMWROLD - Ok I laughed pretty hard at this one.
Title: Re: Engine Used?
Post by: TheGentlmen on July 27, 2015, 11:08:47 PM
(http://s17.postimg.org/h2dcnw533/thread_necromancer_card_3.jpg)

Edit: Just great... I spelt it as RimWrold instead of RimWorld... can't be bother to change it...
Title: Re: Engine Used?
Post by: StorymasterQ on July 27, 2015, 11:36:57 PM
I legit read that as RIMWLOLD for some reason.
Title: Re: Engine Used?
Post by: Segrog on July 27, 2015, 11:44:24 PM
Everything above is why I love the Rimworld community.
Title: Re: Engine Used?
Post by: TheGentlmen on July 27, 2015, 11:51:35 PM
Quote from: Devon_v on July 27, 2015, 05:07:07 PM
Actually, both cards are invalid because Resurrect is not an MtG action or trigger. :)

"Return target thread from the graveyard to the battlefield" is the correct wording.


Whta's a ' MtG action or trigger'? Help me and my fellow noobs understand your big words! ;D

Quote from: Devon_v on July 27, 2015, 05:07:07 PM
Tynan used Unity because it was an affordable multi-platform foundation. It was designed for 3D games using perhaps a few hundred objects, so he wrote his own object handlers to deal with thousands of objects, while eliminating the need to track z-coordinates for anything. The main benefit was that he didn't have to write I/O, graphics and sound for three OSs, and the game could theoretically be ported to Android and iOS someday.


What would be the greatest performance hog when having thousands of objects? If its is rendering them could he not just use occlusion culling?

From my (very limited) experience in C++ writing I/O, graphics and sound for one OS is painful enough.  :'( I totally do agree with his decision to use a game engine.

Android Rimworld sounds nice... Other than the fact it will lag your phone to death... I volunteer to test it out!

Quote from: Devon_v on July 27, 2015, 05:07:07 PM
Shadows on 2D objects is just math. If you look closely you'll notice that there are only two or three actual shadow shapes, and they're just extended across the ground plane according to the mathematical position of the sun, which Tynan actually bothered to calculate correctly accounting for latitude and axial tilt.

Never noticed that...  :P
Title: Re: Engine Used?
Post by: Matthiasagreen on July 28, 2015, 10:30:40 AM
Quote from: TheGentlmen on July 27, 2015, 11:51:35 PM
Quote from: Devon_v on July 27, 2015, 05:07:07 PM
Actually, both cards are invalid because Resurrect is not an MtG action or trigger. :)

"Return target thread from the graveyard to the battlefield" is the correct wording.


Whta's a ' MtG action or trigger'? Help me and my fellow noobs understand your big words! ;D


MtG stands for Magic the Gathering, the card game this card is mimicking. Essentially, the word resurrect wouldn't be used because it doesn't mean anything as a direct quote. The wording would have to be different in order to make sense to the game.
Title: Re: Engine Used?
Post by: kaptain_kavern on July 28, 2015, 10:55:53 AM
The quote is referring to the act of responding to a very old post on the forum, not from anything within the game ;)

The first one was more explicit i found.

(http://i116.photobucket.com/albums/o31/raynotisick/ThreadNecromancer.jpg)
Title: Re: Engine Used?
Post by: TheGentlmen on July 28, 2015, 12:05:25 PM
(http://s30.postimg.org/ptyugbxg1/thread_necromancer_card_3.jpg)

Done whining now? ;D
Title: Re: Engine Used?
Post by: Cimanyd on July 28, 2015, 03:04:42 PM
I saw "Rimwrold" immediately, but I've only now noticed, after seeing it about five times, that the one Tynan originally used says "signifigantly".
Title: Re: Engine Used?
Post by: Devon_v on July 30, 2015, 12:33:42 PM
Quote from: TheGentlmen on July 28, 2015, 12:05:25 PM
(http://s30.postimg.org/ptyugbxg1/thread_necromancer_card_3.jpg)

Done whining now? ;D

No, because rage isn't a game mechanic either. ;p


Occlusion culling is the process of working out what portions of the scene are visible so you can save time by not rendering stuff that will be covered up anyway. It's generally only applicable to 3D scenes where the point of view is arbitrary. In a 2D game all you really have to do is not render anything more than a few tiles outside of the window. Rimworld does this, you can see it if you scroll around mountains when the sun is low in the sky and watch the shadows pop in and out. I believe the issue with the Unity functions is that they are not fast enough to be called thousands of times a cycle without lagging the game. A Rimworld map contains a LOT of cells, which can contain a lot of terrain, objects, and pawns. Various functions need to sift through this data to work out the current game state and update pawn behaviors appropriately.  Internally, Rimworld is kinda a huge spreadsheet, so it's best handled by functions built for the task.
Title: Re: Engine Used?
Post by: TheGentlmen on July 30, 2015, 06:33:49 PM
Quote from: Devon_v on July 30, 2015, 12:33:42 PM
Quote from: TheGentlmen on July 28, 2015, 12:05:25 PM
(http://s30.postimg.org/ptyugbxg1/thread_necromancer_card_3.jpg)

Done whining now? ;D

No, because rage isn't a game mechanic either. ;p


Occlusion culling is the process of working out what portions of the scene are visible so you can save time by not rendering stuff that will be covered up anyway. It's generally only applicable to 3D scenes where the point of view is arbitrary. In a 2D game all you really have to do is not render anything more than a few tiles outside of the window. Rimworld does this, you can see it if you scroll around mountains when the sun is low in the sky and watch the shadows pop in and out. I believe the issue with the Unity functions is that they are not fast enough to be called thousands of times a cycle without lagging the game. A Rimworld map contains a LOT of cells, which can contain a lot of terrain, objects, and pawns. Various functions need to sift through this data to work out the current game state and update pawn behaviors appropriately.  Internally, Rimworld is kinda a huge spreadsheet, so it's best handled by functions built for the task.

No trust me its a mechanic.... here's a quote from the devs!

Quote from: Generic Magic the Gathering Dev on December 31, 1969, 07:00:02 PMRage is a new mechanic which affects Rimwrold(Hehe) Forum Users in version A.Generic.Version.Number of Magic the Gathering, If you use certain cards(like this one) you get some rage. Also 50% of the damage you receive & give add to your rage. After reaching a certain amount of rage you get a special card. Its removed 5% of your health & doubles your damage for the rest of the game. It also lowers the damage you receive by 5% for the rest of the game too! These affects stack (Yes, you can get 32x damage!)!

This is counteracted by the Rimwrold Forum User having nearly no damage at the start of the game... (Cause it takes time for trolls to actually hurt you... every time you think about the amount of time the trolls wasted you get hurt. It hurts more the longer your times been wasted.)

They also have a ton of Hp.

----------------

All jokes aside, I do thank you for your time answering many of my questions.
Title: Re: Engine Used?
Post by: MrWiggles on July 30, 2015, 08:44:27 PM
Quote from: Tynan on October 20, 2013, 04:21:45 PM
No, DF is coded from scratch. I don't think it even has sound.
It has background music, and just the one track. The opening cinematic also had sound.
Title: Re: Engine Used?
Post by: kaptain_kavern on July 31, 2015, 10:03:53 AM
Fortunately DF has a strong modder community too and Tada here come's [Soundsense](http://dwarffortresswiki.org/index.php/Utility:SoundSense)