{"author_link":"\/users\/redpanda","author_name":"redpanda","author_uid":"redpanda","comments":[],"epoch":1493414106,"event":"LD38","format":"md","ldjam_node_id":28941,"likes":10,"metadata":{"p_key":"91852","p_author":"redpanda","p_authorkey":"1002646","p_urlkey":"304770","p_title":"Hibernaculum - A Ludum Dare 38 Postmortem","p_cat":"LDJam ","p_event":"LD38","p_time":"1493414106","p_likes":"10","p_comments":"0","p_status":"WAYBACK","us_key":"1002646","us_name":"redpanda","us_username":"redpanda","event_start":"1492732800","event_key":"69","event_name":"LD 38"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD38","removed_author":false},"_superparent":9405,"_trust":1,"author":2646,"body":"![ld38-1.png](\/\/\/raw\/65a\/z\/2ade.png)\n\nHibernaculum is a simple game where to progress to next level you need to collect all the puzzle pieces and solve a riddle. The player can move only left or right, and is stuck in a snow globe.\nThankfully the player also controls the rotation of the world, so one can position the world as best suited for the player character.\n\n**Go to our page [HERE](https:\/\/ldjam.com\/events\/ludum-dare\/38\/hibernaculum) to play the game and share any feedback!**\n\nBut, how did the development go? Well, today I am going to answer that question from my perspective.\n\n# The bad stuff\n\n![Screenshot_2017-04-24_03-22-28.png](\/\/\/raw\/65a\/z\/2adf.png)\n\nAs always, nothing can go 100% smoothly. Some bad stuff happened, and we should learn from it.\n\n## Character controller\n\nI rewrote the character controller 3 times during the the whole jam. The last one I didn't even use and reverted back to 2nd version. So why?\n\nThe 1st version's problem was ground detection. It was physically-based, used `Rigidbody` and a trigger under the player model to check if it's grounded. It worked great on flat ground, but on the hills\/angled terrain the jumps were multiplied. The problem was of course that the trigger was still detecting ground on the angled terrain even when the player was visibly in air. Adding `OnCollisionStay()` event listener to calculate the terrain's angle helped a bit, but in the end it transformed into a hack and still didn't work properly. I _think_ that the problem was in the accuracy of the single collider. Maybe if I'd use a raycasting technique and cast few rays in different directions from the feet of the player it would work better.\n\nBut instead of doing that, I remembered that Unity provides a `CharacterController` class and so I decided to rewrite and use it. After few failed attempts to simply reuse 3rd person controller from Unity's Standard Assets, I wrote it from scratch. Now `CharacterController` is not physically-based, but in the end it didn't matter. I faked the smooth jump with a timer and tweaked all the values till it felt nice. It worked.\n\nSo why did I rewrote it, and went back to it again? Well I thought Unity is broken or something, the `CharacterController` controller (that redundancy) could slide on top of colliders. Wait what? Yeah. After wasting hours trying to tweak the controller and messing with colliders I decided to rewrite it again. Thankfully in the middle of a rewrite I had an epiphany. It wasn't the controller problem. It was because my world was constrained `Rigidbody`. After changing the world to simply be a bunch of colliders everything worked!\n\n**So what's the lesson here?**\n\n1. Know your tools. If I knew better how `CharacterController` and `Rigidbody` interact with each other, I wouldn't have this problem;\n2. Don't reinvent the wheel. Especially for game jams and alike;\n3. The problem in complex systems may not always be in the last thing you changed. If that piece interacts with other pieces, maybe those other pieces can't handle the new thing.\n\n\n![char-controller-test-scene][img4]\n\n## Puzzle design\n\nSo even though we designed our game pretty good and considered many things, we didn't think enough about puzzles. Even though they were like the next main mechanic after the world rotation.\nWe decided on few possible puzzle ideas, and that player needs to collect pieces in the world and that's that. No actual puzzle design. We just sort of went with _\"we'll figure it out as we'll go\"_. Now, sometimes that works, but I think if we'd settle on few puzzle ideas before hand we'd need not to rush in the end with riddle idea because implementing puzzles just wasn't happening with that little time left and no clear idea.\n\n**So the lesson here is:** PLAN, PLAN and one more time PLAN ahead.\n\n## Unity + Linux = \ud83d\udc94\n\nAt least on Arch Linux.\n\n1st of all, I _**really**_ appreciate that Unity does the Linux version of the Editor at all. But it's not yet fully ready to be used in production.\nI won't go too deep into this coz it's not that exciting anyways. Here some examples of what happened to me while I was developing Hibernaculum:\n\n* Freezes;\n* Crashes;\n* `OnGUI` redraw errors inside the editor;\n* Placing objects in the scene instead moved the previously selected object to that place.\n\n**Lesson here:** test your development environment before actually using it to develop stuff.\n\n## Unity + git = \ud83d\ude15\n\nMissing materials, empty models, scene merging... Sounds annoying yet? I did everything internet said to set up Unity for git, except the _\"don't use git and Unity\"_ part. I guess they were right. I don't know why, and how those things happened, and frankly I don't want know. But it was very annoying. I think it was `.meta` files, and git incorrectly merging them? I'll need to test this more if I want to use Unity and git. But maybe, just maybe, I should learn another version control software. Broaden my horizon so to speak.\n\n**Lesson:** Know your tools. (x2) and Test your development environment before actually using it. (x2)\n\n# The good stuff\n\n![ld38-2.png](\/\/\/raw\/65a\/z\/2ae0.png)\n\n## The idea\n\nThis is pretty awesome, I am usually either simply _okay_ with my idea, or don't like it in the end. This time the core idea was simple and unique enough. Even though it provided some difficulties in regards to level design (the whole \"things should only be placed where player could reach them aka tangent of the circle\"), I think it's pretty unique and cool one.\n\n## Teamwork \ud83e\udd1d\n\nSo this was the first time I worked in a team for Ludum Dare, and my first time Jamming not doing Compo. This means I could ignore all areas I am not good at, since I had the amazing talent of @Quaternius for Art and Music, and focus on coding. The Jam also offers more time which is always nice.\n\nWorking in a team is also why we picked a nice idea in the end. We brainstormed together and threw tons of ideas into the mix. Then we talked about our ideas in more detail to each other, and then rated them. In the end we had 2 ideas to choose from and we rated them again more in depth. That was the best brainstorming session I ever had.\n\n## Goals\n\nI know I said that we didn't have clear and defined goals for puzzles, but everything else was there from the beginning. It's very refreshing to have a plan for Ludum Dare and simply stick to it. Even though we cut a lot of content in the end, and of course the whole puzzle fiasco, we had a clear idea of what the game is from the get go.\n\n### Asset Store\n\nUnity's Asset Store is amazing. I was trying to code the shaders for the game, but we didn't like them and it was getting too complicated (I am not that good with shaders, let alone whole Unity's shader model), so getting onto Asset Store and finding what we liked for free was very liberating. Now, we could only do it because it was Jam, not Compo, but still it was nice.\n\n# Conclusion\n\n![ld38-7.png](\/\/\/raw\/65a\/z\/2ae1.png)\n\nIn the end, it all was very nice experience. Especially considering I didn't want to participate at all and was demotivated at the time. But @Quaternius did the right call, and made me do it, and for that I am grateful.\n\n\n","comments":2,"comments-timestamp":"2017-04-28T21:38:26Z","created":"2017-04-28T21:09:13Z","files":[],"files-timestamp":0,"id":28941,"love":10,"love-timestamp":"2017-05-22T02:35:29Z","meta":[],"modified":"2017-05-22T02:35:29Z","name":"Hibernaculum - A Ludum Dare 38 Postmortem","node-timestamp":"2017-04-28T21:15:06Z","parent":15940,"parents":[1,5,9,9405,15940],"path":"\/events\/ludum-dare\/38\/hibernaculum\/hibernaculum-a-ludum-dare-38-postmortem","published":"2017-04-28T21:15:06Z","scope":"public","slug":"hibernaculum-a-ludum-dare-38-postmortem","subsubtype":"","subtype":"","type":"post","version":70952},"node_metadata":{"n_key":"28941","n_urlkey":"304770","n_parent":"15940","n_path":"\/events\/ludum-dare\/38\/hibernaculum\/hibernaculum-a-ludum-dare-38-postmortem","n_slug":"hibernaculum-a-ludum-dare-38-pos","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"2646","n_created":"1493413753","n_modified":"1495420529","n_version":"70952","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/38\/hibernaculum\/hibernaculum-a-ludum-dare-38-postmortem","text":"![ld38-1.png](\/\/\/raw\/65a\/z\/2ade.png)\n\nHibernaculum is a simple game where to progress to next level you need to collect all the puzzle pieces and solve a riddle. The player can move only left or right, and is stuck in a snow globe.\nThankfully the player also controls the rotation of the world, so one can position the world as best suited for the player character.\n\n**Go to our page [HERE](https:\/\/ldjam.com\/events\/ludum-dare\/38\/hibernaculum) to play the game and share any feedback!**\n\nBut, how did the development go? Well, today I am going to answer that question from my perspective.\n\n# The bad stuff\n\n![Screenshot_2017-04-24_03-22-28.png](\/\/\/raw\/65a\/z\/2adf.png)\n\nAs always, nothing can go 100% smoothly. Some bad stuff happened, and we should learn from it.\n\n## Character controller\n\nI rewrote the character controller 3 times during the the whole jam. The last one I didn't even use and reverted back to 2nd version. So why?\n\nThe 1st version's problem was ground detection. It was physically-based, used `Rigidbody` and a trigger under the player model to check if it's grounded. It worked great on flat ground, but on the hills\/angled terrain the jumps were multiplied. The problem was of course that the trigger was still detecting ground on the angled terrain even when the player was visibly in air. Adding `OnCollisionStay()` event listener to calculate the terrain's angle helped a bit, but in the end it transformed into a hack and still didn't work properly. I _think_ that the problem was in the accuracy of the single collider. Maybe if I'd use a raycasting technique and cast few rays in different directions from the feet of the player it would work better.\n\nBut instead of doing that, I remembered that Unity provides a `CharacterController` class and so I decided to rewrite and use it. After few failed attempts to simply reuse 3rd person controller from Unity's Standard Assets, I wrote it from scratch. Now `CharacterController` is not physically-based, but in the end it didn't matter. I faked the smooth jump with a timer and tweaked all the values till it felt nice. It worked.\n\nSo why did I rewrote it, and went back to it again? Well I thought Unity is broken or something, the `CharacterController` controller (that redundancy) could slide on top of colliders. Wait what? Yeah. After wasting hours trying to tweak the controller and messing with colliders I decided to rewrite it again. Thankfully in the middle of a rewrite I had an epiphany. It wasn't the controller problem. It was because my world was constrained `Rigidbody`. After changing the world to simply be a bunch of colliders everything worked!\n\n**So what's the lesson here?**\n\n1. Know your tools. If I knew better how `CharacterController` and `Rigidbody` interact with each other, I wouldn't have this problem;\n2. Don't reinvent the wheel. Especially for game jams and alike;\n3. The problem in complex systems may not always be in the last thing you changed. If that piece interacts with other pieces, maybe those other pieces can't handle the new thing.\n\n\n![char-controller-test-scene][img4]\n\n## Puzzle design\n\nSo even though we designed our game pretty good and considered many things, we didn't think enough about puzzles. Even though they were like the next main mechanic after the world rotation.\nWe decided on few possible puzzle ideas, and that player needs to collect pieces in the world and that's that. No actual puzzle design. We just sort of went with _\"we'll figure it out as we'll go\"_. Now, sometimes that works, but I think if we'd settle on few puzzle ideas before hand we'd need not to rush in the end with riddle idea because implementing puzzles just wasn't happening with that little time left and no clear idea.\n\n**So the lesson here is:** PLAN, PLAN and one more time PLAN ahead.\n\n## Unity + Linux = \ud83d\udc94\n\nAt least on Arch Linux.\n\n1st of all, I _**really**_ appreciate that Unity does the Linux version of the Editor at all. But it's not yet fully ready to be used in production.\nI won't go too deep into this coz it's not that exciting anyways. Here some examples of what happened to me while I was developing Hibernaculum:\n\n* Freezes;\n* Crashes;\n* `OnGUI` redraw errors inside the editor;\n* Placing objects in the scene instead moved the previously selected object to that place.\n\n**Lesson here:** test your development environment before actually using it to develop stuff.\n\n## Unity + git = \ud83d\ude15\n\nMissing materials, empty models, scene merging... Sounds annoying yet? I did everything internet said to set up Unity for git, except the _\"don't use git and Unity\"_ part. I guess they were right. I don't know why, and how those things happened, and frankly I don't want know. But it was very annoying. I think it was `.meta` files, and git incorrectly merging them? I'll need to test this more if I want to use Unity and git. But maybe, just maybe, I should learn another version control software. Broaden my horizon so to speak.\n\n**Lesson:** Know your tools. (x2) and Test your development environment before actually using it. (x2)\n\n# The good stuff\n\n![ld38-2.png](\/\/\/raw\/65a\/z\/2ae0.png)\n\n## The idea\n\nThis is pretty awesome, I am usually either simply _okay_ with my idea, or don't like it in the end. This time the core idea was simple and unique enough. Even though it provided some difficulties in regards to level design (the whole \"things should only be placed where player could reach them aka tangent of the circle\"), I think it's pretty unique and cool one.\n\n## Teamwork \ud83e\udd1d\n\nSo this was the first time I worked in a team for Ludum Dare, and my first time Jamming not doing Compo. This means I could ignore all areas I am not good at, since I had the amazing talent of @Quaternius for Art and Music, and focus on coding. The Jam also offers more time which is always nice.\n\nWorking in a team is also why we picked a nice idea in the end. We brainstormed together and threw tons of ideas into the mix. Then we talked about our ideas in more detail to each other, and then rated them. In the end we had 2 ideas to choose from and we rated them again more in depth. That was the best brainstorming session I ever had.\n\n## Goals\n\nI know I said that we didn't have clear and defined goals for puzzles, but everything else was there from the beginning. It's very refreshing to have a plan for Ludum Dare and simply stick to it. Even though we cut a lot of content in the end, and of course the whole puzzle fiasco, we had a clear idea of what the game is from the get go.\n\n### Asset Store\n\nUnity's Asset Store is amazing. I was trying to code the shaders for the game, but we didn't like them and it was getting too complicated (I am not that good with shaders, let alone whole Unity's shader model), so getting onto Asset Store and finding what we liked for free was very liberating. Now, we could only do it because it was Jam, not Compo, but still it was nice.\n\n# Conclusion\n\n![ld38-7.png](\/\/\/raw\/65a\/z\/2ae1.png)\n\nIn the end, it all was very nice experience. Especially considering I didn't want to participate at all and was demotivated at the time. But @Quaternius did the right call, and made me do it, and for that I am grateful.\n\n\n","title":"Hibernaculum - A Ludum Dare 38 Postmortem","wayback_source":[]}