{"assets":[],"author_link":"author\/killedbyapixel\/","author_name":"KilledByAPixel","cat":"LD #34","categories":["LD #34"],"comments":[],"epoch":1450132200,"event":"LD34","likes":8,"metadata":{"p_key":"83238","p_author":"KilledByAPixel","p_authorkey":"0","p_urlkey":"293976","p_title":"Berry Thorny \u2013 LD34 Compo Postmortem","p_cat":"LD #34","p_event":"LD34","p_time":"1450132200","p_likes":"8","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1449792000","event_key":"31","event_name":"LD34"},"source_url":"2015\/12\/14\/berry-thorny-ld34-compo-postmortem\/","text":"<p>Ludum Dare 34\u00a0had\u00a0two themes \u201cGrowing,\u201d and \u201cTwo button controls\u201d. I tried to hit both making a 2 button controlled infinite runner with a vine growing in front of you.\u00a0This was my first time using Unreal for a game jam, and\u00a0tried doing many other things differently this time.<\/p>\n<h3><strong><a href=\"http:\/\/ludumdare.com\/compo\/ludum-dare-34\/?action=preview&amp;uid=2075\">Play and Rate Berry Thorny<\/a><\/strong><\/h3>\n<p><iframe allowfullscreen=\"\" frameborder=\"0\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/hBbJy3v8Zbo?feature=oembed\" width=\"500\"><\/iframe><\/p>\n<h1>Postmortem<\/h1>\n<p>Going into the Compo I had some specific goals in mind\u2026<\/p>\n<ul>\n<li>Use Unreal Engine 4, my first time using it in a game jam.<\/li>\n<li>Do all programming in blueprint to\u00a0practice visual scripting.<\/li>\n<li>Add music, planning to use Figure for iPhone.<\/li>\n<li>Hooking up Unreal to ToritseSVN, my first time connecting the two.<\/li>\n<li>Make a game that would work on mobile.<\/li>\n<\/ul>\n<p>Proud to say that I accomplished all those goals and more with my entry. Though I struggled initially and wasted much time trying to solve issues with Unreal.\u00a0What\u2019s funny about Unreal is that some stuff is super easy but other stuff takes way longer you\u2019d expect.<\/p>\n<h2>Friday \u2013 Concept<\/h2>\n<p>I liked\u00a0theme this time around, thinking about how to combine\u00a0two\u00a0different themes was really fun. Two button controls works perfectly with my idea of making a mobile game. For growing I wanted to experiment with organic looking procedural level generation using spline meshs. I started by scribbling down about 10 possible game ideas. My best idea at the time involved 3 or more splines that you flip between using\u00a0two\u00a0buttons,\u00a0maybe you are spiraling around the splines. I wasn\u2019t fully sold on the idea though and wanted to sleep\u00a0on it before starting any actual development.<\/p>\n<div class=\"wp-caption alignnone\" id=\"attachment_524519\" style=\"width: 560px\"><img alt=\"IMG_0039-1024x768\" class=\"wp-image-524519 size-large\" height=\"413\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/IMG_0039-1024x768-550x413.jpg\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/IMG_0039-1024x768-300x225.jpg 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/IMG_0039-1024x768-550x413.jpg 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/IMG_0039-1024x768.jpg 1024w\" width=\"550\"\/><p class=\"wp-caption-text\">Doodle I made late Friday night with my spline idea.<\/p><\/div>\n<h2>Saturday \u2013 Procedural level generation<\/h2>\n<p>I must have been thinking a lot in my sleep because I woke up with a completely new and fairly complete\u00a0idea, racing along\u00a0a tube shaped object, using the two button controls to rotate around. Something like the map in f zero where it\u2019s a tube shape, but as an infinite runner. I decided to keep it simple and not try\u00a0too experimental of an idea since I was trying a new game engine.<\/p>\n<div class=\"wp-caption alignnone\" id=\"attachment_524522\" style=\"width: 560px\"><img alt=\"F-Zero GX - One of the best gamecube games\" class=\"size-large wp-image-524522\" height=\"413\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/fzero_screen001-550x413.jpg\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/fzero_screen001-300x225.jpg 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/fzero_screen001-550x413.jpg 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/fzero_screen001.jpg 640w\" width=\"550\"\/><p class=\"wp-caption-text\">F-Zero GX \u2013 One of the best gamecube games<\/p><\/div>\n<p>I started a new\u00a0blank project with starter content. My first goal was getting the procedural generation working. A few weeks ago I followed\u00a0a pretty cool <a href=\"http:\/\/infinite runner in unreal\">infinite runner in unreal tutorial in unreal<\/a>. I recommend that tutorial for a first introduction to Unreal.\u00a0For my idea it\u00a0needed\u00a0do\u00a0work much\u00a0differently in order\u00a0to generate the level along\u00a0random spline. Also I couldn\u2019t rely on physics since there is no collision generated from spline meshes and it would probably be too bumpy anyway so I started from scratch for the player movement and controls.<\/p>\n<div class=\"wp-caption alignnone\" id=\"attachment_524523\" style=\"width: 560px\"><img alt=\"2 PM - Experimenting with level generation\" class=\"size-large wp-image-524523\" height=\"345\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00002-1024x643-550x345.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00002-1024x643-300x188.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00002-1024x643-550x345.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00002-1024x643.png 1024w\" width=\"550\"\/><p class=\"wp-caption-text\">2 PM \u2013 Experimenting with level generation<\/p><\/div>\n<p>I use TortiseSVN for all my home brew projects and heard that it had direct support in Unreal. It was fairly simple to hook and worked well, at least in this simple test case.<\/p>\n<p>The level\u00a0generation took almost all day on Saturday. There were\u00a0some things from the content example project that helped me figure out how to work with spline meshes. I started out by\u00a0generating a bunch of random spline curves and creating\u00a0spline meshes for each section. This took a long time because of various issues I ran into with spline meshes. It would be nice to be able to visualize a spline mesh in game but I couldn\u2019t find a way. I also had a problem with them twisting into a singularity and had to limit the maximum random angle that could be applied.\u00a0I seemed to mostly have fixed it by limiting the maximum angle, but need to experiment with it more to figure out what exactly is\u00a0going on.<\/p>\n<div class=\"wp-caption alignnone\" id=\"attachment_524525\" style=\"width: 560px\"><img alt=\"Twist in spline mesh\" class=\"size-large wp-image-524525\" height=\"553\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/twist-550x553.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/twist-298x300.png 298w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/twist-550x553.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/twist.png 555w\" width=\"550\"\/><p class=\"wp-caption-text\">Twist in spline mesh<\/p><\/div>\n<p>For the spline mesh I started using the pipe shape from the UE starter content. That worked well enough for testing but I wanted to smooth the normals to be\u00a0more round. I tried making a cylinder BSP by extruding it into a few intermediate sections and converting it to a static mesh, but that also caused lighting issues and bad UVs. I have never used Blender before but heard it was free so I downloaded it and set about making a simple cylinder. I found the interface to be extremely confusing and was constantly clicking on things accidentally that I would have to undo. Somehow after well over an hour I managed to make the cylinder, the UVs still don\u2019t wrap properly but it\u2019s good enough.<\/p>\n<p>I spent a while messing around with the procedural generation, tweaking different variables that control how much it bends and stuff. I originally planned to have the track go straight up like a beanstalk, but noticed\u00a0that it looked cooler when you could see the sun and horizon.<\/p>\n<div class=\"wp-caption alignnone\" id=\"attachment_524528\" style=\"width: 560px\"><img alt=\"7 PM - Player movement down the track\" class=\"size-large wp-image-524528\" height=\"305\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s1-1024x568-550x305.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s1-1024x568-300x166.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s1-1024x568-550x305.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s1-1024x568.png 1024w\" width=\"550\"\/><p class=\"wp-caption-text\">7 PM \u2013 Player movement down the track<\/p><\/div>\n<p>With the level generation working I moved on to player movement. I wasn\u2019t able to use physics for this game because the spline mesh doesn\u2019t actually have collision. So the player\u00a0moves along the spline automatically using controls to change the roll component. I started with a first person perspective, but after experimenting I noticed that seeing the player in front of the camera feels much better and\u00a0helps\u00a0players understand their collision size.<\/p>\n<p>One problem with the splines in Unreal is there\u2019s no built in way to remove a point from the front of the spline. I need to remove the parts of the spline behind the player as they went along. So I wrote a function that dumps the spline into an array, clears the spline, then dumps it back minus\u00a0the front node, pretty sloppy but it worked.<\/p>\n<p>I also added some obstacles to avoid that are randomly placed around the mesh, a score\u00a0display, and damage the player when they hit something. I like to have at least the basic gameplay in by the second night.<\/p>\n<div class=\"wp-caption alignnone\" id=\"attachment_524529\" style=\"width: 560px\"><img alt=\"Midnight - Made the player a rolling ball and added obstacles\" class=\"size-large wp-image-524529\" height=\"311\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s2-1024x579-550x311.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s2-1024x579-300x170.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s2-1024x579-550x311.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/s2-1024x579.png 1024w\" width=\"550\"\/><p class=\"wp-caption-text\">Midnight \u2013 Made the player a rolling ball and added obstacles<\/p><\/div>\n<p>Before going to sleep I crammed in a bunch more stuff\u00a0like a\u00a0high score save\u00a0and blue pickups that give health.<\/p>\n<h2>Sunday \u2013 Making it fun and polish<\/h2>\n<p>I began the day by adding\u00a0polish to make it feel more like a complete game. Generated a bunch of random sounds in BFXR. Added camera shake when you collide. Added a start and end screen. Play tested and did a full tweak pass.<\/p>\n<p>I spent a while working on materials for stuff, finding\u00a0it very slow to iterate in the Unreal material editor. The preview window would sometimes take a minute to update after making a tiny change and applying the material to stuff in the game took several minutes. I ended up just making modifications to the default materials. The thorn and berry materials was originally the default steel material but I added some code to make them emissive and colored. I also made a simple dot material for the pickup particle system.<\/p>\n<p>The destruction effects were made by taking the cone and donuts meshes and making them into destructible meshes. I have them set to listen for overlap events from the player and apply a damage event with physics impulse. For the berry powerup I created a particle system from scratch. For collisions I just used the default explosion effect and default smoke when you die, and didn\u2019t get a chance to tweak them. I also enabled depth of field and played with other visual settings and colors for a while.<\/p>\n<p>I used Figure on iPhone to make the music. This is a great little program for making music quickly. I made a few\u00a08 bar loops, then picked\u00a0the best one and improvised with\u00a0it in a live performance, changing around which tracks are played and adding tweaks\/filters. I spent maybe two hours the most making the music. I also hooked up the music to speed up with the player movement and slow down when you take damage.<\/p>\n<p>With only a few hours left in the jam I still didn\u2019t have a jump mechanic. I really wanted\u00a0do something when you press both buttons at once, kind of a way to sneak in a third button. So I added the yellow donuts you jump over. They work similar to the cones but are oriented differently. The jump physics were\u00a0done from scratch, using\u00a0a timeline to control the height.<\/p>\n<p>Towards the end of the compo I had some time left so I added a bit of a difficulty ramp so it starts out straighter with a few less obstacles. As I was making some final tweaks and play\u00a0testing and I had a few last minute scares. One where I noticed a major kink in the road caused by setting the max spline rotation too high. Another where I had lowered the start point to increase the initial fog density and that caused the yellow donuts to not show up, weird stuff. Thankfully\u00a0I managed to fix those bugs and check it all in before the deadline.<\/p>\n<div class=\"wp-caption alignnone\" id=\"attachment_524530\" style=\"width: 560px\"><img alt=\"3 PM - Better gameplay with heath bar and pickups\" class=\"size-large wp-image-524530\" height=\"309\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00027-1024x576-550x309.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00027-1024x576-300x169.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00027-1024x576-550x309.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/12\/ScreenShot00027-1024x576.png 1024w\" width=\"550\"\/><p class=\"wp-caption-text\">3 PM \u2013 Better gameplay with heath bar and pickups<\/p><\/div>\n<h2>What went right<\/h2>\n<ul>\n<li>Unreal is a pretty fun engine to work with, but some seemingly simple things can often be difficult to figure out.<\/li>\n<li>Using TortiseSVN with Unreal worked really well, though I didn\u2019t need to do anything advanced.<\/li>\n<li>I really tried hard to keep things simple and it worked out well.<\/li>\n<\/ul>\n<h2>What went wrong<\/h2>\n<ul>\n<li>Converting BSPs to static meshs in Unreal has some bugs and is very limited.<\/li>\n<li>Blender is a very difficult and non-intuitive program to use, I spent over an hour\u00a0trying to make a simple cylinder shape and still messed up the UVs.<\/li>\n<li>Making material changes in Unreal was an extremely slow process with changes sometimes taking over a minute just to preview then\u00a0when I save a change it wanted to rebuild all the shaders in the project. This seems like it really needs to me improved by Epic.<\/li>\n<li>Made what I thought was a harmless change at the last minute and almost broke a major component of my game.<\/li>\n<li>I don\u2019t like how big my project is, just the final zip file is over 100 meg.<\/li>\n<\/ul>\n<p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/postmortem\/\" rel=\"tag\">postmortem<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/unreal\/\" rel=\"tag\">unreal<\/a><\/p>","time":"December 14th, 2015 10:30 pm","title":"Berry Thorny \u2013 LD34 Compo Postmortem","title_was_empty":false}