tag:blogger.com,1999:blog-58754767129791138912024-03-06T00:23:02.856-03:00HugoBDesignerUnknownnoreply@blogger.comBlogger58125tag:blogger.com,1999:blog-5875476712979113891.post-83632573765706134362021-07-10T19:40:00.000-03:002021-07-10T19:40:00.341-03:00In-depth look at Simile Thoughts<div style="text-align: justify;"></div><p style="text-align: justify;"> <span> If you've seen my previous post, you might be wondering if I've abandoned Paperboy. Don't worry, I have not. I've just come to the – slightly late – realization that, before diving deeper into making a full-scale game, I should probably finish the one project I had been working on for years. So I put Paperboy aside for a little bit and focused heavily on finishing Simile Thoughts, a mappack for Mari0. This is what I'll be covering today.</span></p><p style="text-align: justify;"><span> <span> Before anything else, however, I highly encourage you to take a look – and read –</span> </span>into the mappack's main post, over on the Stabyourself.net forums. <a href="https://forum.stabyourself.net/viewtopic.php?f=12&t=5451" target="_blank">Here's the post in its full glory</a>. It covers a lot of what I'll talk about in this postmortem, and also has a few pictures of some of the levels if you're curious about the overall looks of the project, since I won't be covering every single level here. If you intend on playing this mappack, I highly recommend doing so <i>before</i> reading this blog post, as it will contain spoilers for some of the puzzles.<br /></p><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://forum.stabyourself.net/viewtopic.php?f=12&t=5451" target="_blank"><img border="0" data-original-height="896" data-original-width="1600" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCYPC_AgcyUaho8_veCeSxGA9N0kenuzjBx_eVyAyqw4GG0aO6CvZgGs18vZx-BcqBiPLwJINdTCh98ijIrBsfSSpCXp4gylomNzcUmaKyCCxtSHgq5jpoM4kw6b3EXZzhDuLnP_50VjM/w640-h358/Poster.png" width="640" /></a></div><br /><span><a name='more'></a></span><p style="text-align: justify;"><span> <span> Simile Thoughts is a project that started in roundabout April of 2018 (that is the earliest I can trace any file that directly relates to the project). The intent was to create a spiritual successor to <a href="https://forum.stabyourself.net/viewtopic.php?p=130609#p130609" target="_blank">Hollow Purpose</a>, my previous Mari0 mappack. Both mappacks are designed under the same core idea: instead of a traditional, tileset-based, sidescrolling mappack, both would have their puzzles set in a single, static screen, and make use of the custom background to act as the playable area.</span></span></p><p style="text-align: justify;"><span><span><span> <span> </span></span>For Hollow Purpose, the single screen <i>was</i> the imposed limitation (as that was the theme of the contest it was made for), and the custom background was the solution I found to make it as flexible as I could. For Simile Thoughts, I wanted to take this idea and expand upon it. It provided many advantages over its sidescrolling counterparts, such as greater reliability with mouse interactions, and infinite freedom with the visuals (as opposed to being locked to a tileset). It was also the perfect creative outlet to explore new puzzle ideas and make as much use of any given space as I could, which, in turn, led to more ambitious, creative puzzles with far more element reuse.</span></span></p><p style="text-align: justify;"><span><span><span> <span> </span></span>From the very beginning, my idea was to make this a mappack with 16 puzzles and 4 world themes. The challenge was then to conceive of new ideas to make those puzzles. And there was a catch: all of that had to be done with the constraints and limitations of <a href="https://stabyourself.net/mari0/" target="_blank">Mari0 1.6</a>, which, while the latest officially released version as of writing, is extraordinarily outdated when compared to community-maintained mods and updates, such as the official beta versions of <a href="https://forum.stabyourself.net/viewtopic.php?f=8&t=4634" target="_blank">Mari0: Special Edition</a>, the fan-made mod <a href="https://forum.stabyourself.net/viewtopic.php?f=13&t=3636" target="_blank">Alesan's Entities</a>, or the community-driven <a href="https://github.com/Mari0-CE/Mari0-Community-Edition" target="_blank">Mari0: Community Edition</a> (coincidentally hosted by yours truly). For context, Mari0 1.6 was released back in 2012!<br /></span></span></p><p style="text-align: justify;"><span><span><span><span><span> <span> </span></span></span></span>The limitations of Mari0 1.6 were almost unbearable at times. The simplest things could not be achieved as trivially as with any of the alternate/modded versions of Mari0. Some examples: fizzlers in 1.6 are permanently on, they cannot be toggled; lasers are always deadly; cubes always auto-respawn; there are no logic gates besides the NOT gate, and the NOT gate cannot be turned invisible. The list goes on and on, but the question remains: if that version was so restricting, why stick to it?</span></span></p><p style="text-align: justify;"><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span>There were a few reasons. The first, and most important reason, was because of a shift I had seen in the Mari0 map-making community. Everyone was moving on from 1.6 way too quickly, in favor of versions with new entities, animated tiles, and everything customizable. While there is nothing wrong with that – I myself have made use of all of those new toys on several occasions – it did rub me off as overlooking the potential held by those already-existing features. I had seen plenty of mappacks, even for 1.6, which had "custom elements" be the focus of the gameplay, but very few mappacks using the existing mechanics, with their intended purposes, in new and innovative ways. So that was something I wanted to change. I wanted to create a mappack that 2012/2013 me would have loved to play. One that didn't require any mods, or learning new mechanics, or getting used to new features. Just a pure, vanilla mappack that really tried to squeeze out the usefulness of the early features.</span></span></p><p style="text-align: justify;"><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span>The second reason was that I wanted to turn this into a visual design challenge. I wanted to see how fancy I could make these levels with only the techniques and tools described previously. If you take a look at <a href="https://forum.stabyourself.net/viewtopic.php?f=12&t=3156" target="_blank">Pop A Portal</a>, a mappack I made back in 2013, you'll see how overly simplistic and limited the visual design was. Even if you ignore the dated graphics, the limited tileset meant that every level felt "samey". Similar tile patterns, similar vegetation, similar overall atmosphere. I wanted to do away with that. I wanted something as fresh as playing Portal 2 for the first time: every chamber is a new visual experience, even when the underlying elements are mostly the same. I wanted to enter a chamber and see pink flowers, or a fancy wall art, or some dilapidation that responded to the environment. I wanted each chamber to have its own impact, its unique mark, its own DNA. So that's exactly what I did with Simile Thoughts.</span></span></p><p style="text-align: justify;"><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span>The third and final reason was that I wanted to push myself creatively, and explore my own creative solutions to all these limitations. Given that I presently intend to seek work in the game development industry, I found it important to get used to dealing with seemingly impossible to overcome challenges and restrictions. I didn't allow myself to modify the game, I didn't allow myself to have scrolling levels, and perhaps most importantly, I wanted players both new and old to the game to have a good time, so I didn't allow myself to assume the player to be completely acquainted with the game. In doing so, I spent a long time sketching a number of ideas and prototypes, classifying them by their element usage and difficulty, and building a gradual difficulty curve whilst also making sure the gameplay was consistent in each world.</span></span></p><p style="text-align: justify;"><span><span><br /></span></span></p><p style="text-align: justify;"><span></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6G4opKzGqobtfgS5T6ggybWR6icU_K3AzUy6uLhyphenhyphencHjzealocl5d7Cen-xbGCyaGhX5ExXf0IT91E-CXKNPlRUWU9DWhTa90pZoxKTbtVHC-QDl7sahM_mkuFK35610Nu3GCZEeHRv0/s2048/20180420_003947.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH6G4opKzGqobtfgS5T6ggybWR6icU_K3AzUy6uLhyphenhyphencHjzealocl5d7Cen-xbGCyaGhX5ExXf0IT91E-CXKNPlRUWU9DWhTa90pZoxKTbtVHC-QDl7sahM_mkuFK35610Nu3GCZEeHRv0/w640-h480/20180420_003947.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Early sketches and rough ideas. Most of them didn't make the cut into the final mappack.<br /></td></tr></tbody></table><span><br /><span></span></span><p></p><p style="text-align: justify;"><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span>This project ended up giving me a lot of insight into what I should prioritize when designing levels. By laying a clear set of goals, I was able to jot down which features were important to tutorialize, which mechanics needed to be introduced better, which element combinations had potential, and so on. By being so restricted in puzzle size, I was able to efficiently determine which puzzle ideas were or were not doable, which moves were the most interesting, and most importantly, how to make as much use of any given space as possible. While early levels were more "spacious" and with fewer moving parts, the later chambers had tighter layouts, with more gameplay happening at any given section.</span></span></p><p style="text-align: justify;"><span><span><br /></span></span></p><p style="text-align: justify;"><span></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieRyxYms4uxnwGVvJIOC9J3dOCvoAgGs61vME5Gm3wScN_TdC0WA0smojnShpsdxZEai0zwoEdADORD8Ukf7Bw15CCc6TlI3HcwCZJQW6_8RE1mnKL1fU6TvU-697zIr3KZAFk1JbwK1w/s2048/20180602_210806.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieRyxYms4uxnwGVvJIOC9J3dOCvoAgGs61vME5Gm3wScN_TdC0WA0smojnShpsdxZEai0zwoEdADORD8Ukf7Bw15CCc6TlI3HcwCZJQW6_8RE1mnKL1fU6TvU-697zIr3KZAFk1JbwK1w/w640-h480/20180602_210806.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">As is customary with any large-scale project of mine, my whiteboard was completely overtaken. The stars represent the level's difficulty; beneath them the core puzzle element from each test. Those were the metrics that would later determine the final order of the puzzles.<br /></td></tr></tbody></table><p></p><p style="text-align: justify;"><span><br /></span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span>Some of those sketches were of fully-visualized puzzles, which in turn became playable prototypes, while many were snippets of puzzle ideas or simple concepts that would later have puzzles constructed around them or be merged together with other ideas. This stage was extremely experimental, and it's where puzzles saw the most change – from small layout tweaks to complete overhauls of core ideas and moves. It was also during this phase that many new ideas came about, as experimenting with the mechanics in-game led to new and interesting discoveries that were later forged into their own puzzles.</span></span></p><p><span></span></p><p><span><br /></span></p><p></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='640' height='358' src='https://www.blogger.com/video.g?token=AD6v5dyQHlBnaIsfBay3EFZEM6WKqf0smxKo0w9T2wqzyZyhxgaf5OZdhFiuOkU2GZcibbGz5xOpCU7L1lOsbWEY2g' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><div style="text-align: center;">Earliest available video of what then became puzzle 4-1, nickname "Pink".<br /></div><div><span><br /></span><p></p><p><span><br /></span></p><p style="text-align: justify;"><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> As time went on, I kept on taking notes of each idea that could be worked into a Mari0 puzzle. Eventually, I had all 16 puzzles I needed, with a few backup puzzles and ideas – which, incidentally, helped save a lot of time later on. It then became the optimization phase of the project.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p style="text-align: justify;"><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span>The next challenge was making sure every puzzle was consistent and reliable. </span></span></span></span></span></span></span></span></span></span></span></span></span></span>A big problem I've encountered with my previous mappacks was that players would often try to beat the levels in unpredictable ways, often times by simply not understanding what was expected of them. With Simile Thoughts, I wanted to make every room as readable as I could. Superfluous elements were removed, crucial moves were narrowed down and emphasized, and the layouts were adjusted so that all moves were easy to execute and worked every time. Plenty of puzzles had mechanics or ideas that relied too heavily on precise coordination, timing, or sometimes even luck, and those were cut away. Other puzzles had moves that were too tight to execute, or had too narrow a timing window, and those were improved and optimized as best as I could. For example: in the video above, the portal surface directly over the faith plate was lowered by a block, so that reaching the platform with the button became an effortless task.</span></span></p><p style="text-align: justify;"><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span>With all this "cleaning up" done, it was finally time to get working on the visuals. I rearranged and reorganized levels based on a number of criteria that were fundamental to the flow of gameplay. The first criteria was perceived difficulty. Hollow Purpose, in its limited scope, had no room for introducing ideas and puzzle elements in an organic fashion. As a result, most players spent far more time in each of its two levels than they would have had the mappack taken its time as Simile Thought did. So the first few puzzles were the easiest, while the last few ones were the toughest. Moreover, with each chapter, the initial puzzle would be slightly easier than the previous chapter's final test, giving the player some mental rest, whilst also providing them with space to process the new environments and sets of puzzle elements.</span></span></p><p style="text-align: justify;"><span><span><br /></span></span></p><p style="text-align: justify;"><span></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggp6w7SxF78pINLToh1M_QazFheCUi27tRFpJKbPdxi0WWRdUfAxQvfKH9AX1QJCXfImtDhuEWylNs020B1R0S9I8x7XgoGzLfokNKzU7C-1xhcxdYdVAy12Y5iYcwbGtDotVYv2CL2ig/s700/Difficulty_Graph.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="450" data-original-width="700" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggp6w7SxF78pINLToh1M_QazFheCUi27tRFpJKbPdxi0WWRdUfAxQvfKH9AX1QJCXfImtDhuEWylNs020B1R0S9I8x7XgoGzLfokNKzU7C-1xhcxdYdVAy12Y5iYcwbGtDotVYv2CL2ig/w400-h257/Difficulty_Graph.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Illustrative graph, meant to represent the general approach towards difficulty across each world and level.<br /></td></tr></tbody></table><span><br /><span><br /></span></span><p></p><p style="text-align: justify;"><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>On top of the visuals, each world would offer a unique set of puzzle elements and tools that would match that world's theme. Which meant that deciding the themes and their order could only happen when the 16 levels were more or less set in stone. Not only did I have to sort levels by their difficulty, I also had to group them together by puzzle elements, such that they made sense in conjunction. I had a few potential themes in mind, and eventually found a sequence of levels that worked well enough for them.</span></span></p><p style="text-align: justify;"><span><span><br /></span></span></p><p style="text-align: justify;"><span></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia6oaLda0AYwkLa4DmzoJC3xhOk3o2icI4snyr5tE58dE2BQymveEyemeSNPI6i61-5ZMGhO74La3S3aqBMQdJiV6Y-1SPpgL1rEKgx5Cqjbz8tkU6ZLnSFgZBofqALcSNj8NJewJk0pk/s850/WorldsOrder.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="300" data-original-width="850" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia6oaLda0AYwkLa4DmzoJC3xhOk3o2icI4snyr5tE58dE2BQymveEyemeSNPI6i61-5ZMGhO74La3S3aqBMQdJiV6Y-1SPpgL1rEKgx5Cqjbz8tkU6ZLnSFgZBofqALcSNj8NJewJk0pk/s320/WorldsOrder.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Original draft for world themes and puzzle ordering. Interesting to note is that the first puzzle designed ended up becoming 4-1, the same level in the earlier video.<br /></td></tr></tbody></table><span><br /><span></span></span><p></p><p style="text-align: justify;"><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>With the puzzles designed and sorted, and with the themes chosen, it was finally time to get the graphics part going. With me so far? Because this was September of 2018, a mere five months after the conception of this project. I didn't know it at the time, but I was just getting started, and was about to enter the toughest, most time-consuming phase of the development.</span></span></p><p style="text-align: justify;"><span><span><br /></span></span></p><p style="text-align: justify;"></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib71DTA_VR1lg68pu45OgL3gG-J9nMzg37YvqjqtPvZ42nIHEjkReSgMRb5gcPN_3xee1BUrc4cHM9MYIyAdC4FTyIEcXeC93jdpvCYZ4dgzK0yiYQM_UuwVi1sht-BSV8MRZLNroxbAc/s1349/PaintDotNet_2018-09-11_04-55-33.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="580" data-original-width="1349" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib71DTA_VR1lg68pu45OgL3gG-J9nMzg37YvqjqtPvZ42nIHEjkReSgMRb5gcPN_3xee1BUrc4cHM9MYIyAdC4FTyIEcXeC93jdpvCYZ4dgzK0yiYQM_UuwVi1sht-BSV8MRZLNroxbAc/w640-h276/PaintDotNet_2018-09-11_04-55-33.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">1-1, humble beginnings...<br /></td></tr></tbody></table><br /><span><br /></span></div><div style="text-align: justify;"><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>It turns out that making the levels as highly detailed as they turned out to be is a process that takes months, since I had to be constantly reiterating, tweaking, testing and adjusting the visuals through various layers and blending modes until it looked acceptable. Moreover, once I was happy with the results, I then had to start the process all over again for all subsequent levels. The bulk of the work took place mainly at the first level of each chapter, with the other levels being "easier" in that most of the assets and creative decisions were already made and could just be "copied over" (and, by "copied over", I of course mean manually copied and pasted for each tile, and adjusted according to each level). Yet, even after all levels in a given chapter were finished, I continued coming back to them, either to improve on their visuals or to adjust for changes in layout.</span></span></p></div><div style="text-align: justify;"><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>On top of that, I was working a full-time job at the time, and had to proceed with most of the development in my lunch breaks. Moreover, I also worked on several projects in parallel while developing Simile Thoughts. While I only had roughly half an hour to work on it per day, it was actually a great way to keep the project going at a steady pace, since most of the work at this point required very little "preparation" or mental effort, and could, for the most part, be picked up and left off at any given point.</span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>When working on the visuals, one aspect I tried to be very cognizant about was contrast. I wanted to ensure that the foreground and background elements were easily distinguishable, and I constantly worried about clarity of layout. I wanted players to be completely clear on what they could or could not interact with, which areas represented safety or danger, and where the goal was. I kept the foreground with higher contrast and darker colors, and the background with more muted, softened, lighter textures.</span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>Another important aspect was clarity in connections. I used a variety of techniques to get around the limitations imposed by the antline system in Mari0 (antlines are the little dotted blue lines that connect elements together and change color according to their power status). In some places, I used fake, "deactivated" antlines in the background to communicate branching lines (which are not available in this version of Mari0) or to cross over gaps that are offset of the entity's default grid. In others, I broke off large gaps or used cables where the longer antlines would otherwise visually clutter the level or cause confusion.</span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>Finally, one of the key visual aspects I kept in mind at all times was color palette. I wanted each individual world to have its own, unique, instantly recognizable palette. I wanted players to be able to tell from afar in which world they were just by looking at it. Given the four distinct themes, it was a relatively easy task. I ended up taking many, many creative liberties to ensure the colors were interesting and distinct enough – that's why the third world, inspired by Portal 2's "Art Therapy" style, actually looks like it's nighttime, when the original theme did not. I gave each world a primary and secondary color. The primary color would be the most recognizable, the one you see when you zoom far out from the levels. The secondary color would provide contrast between foreground and background, or increase the level of detail within the given set of tiles and textures.<br /></span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>For the "Night Therapy" theme, I wanted each level to bear a unique piece of wall art. I often times felt that Portal 2's "wall art" pieces were interesting, but sorely lacking in variety, colors and dynamism, so I took it upon myself to make each level have its own artistic identity. In one level, you're soaring through a rainbow. In another, you might be walking past some snowfall, while a little snowman watches you idly.</span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>Likewise, for the "Overflowered" theme, I wanted to expand upon Portal 2's "Overgrown" theme, by introducing more variety in types of vegetation, such as new vines, colorful flowers, mushrooms and more. Each level in this theme bears its own secondary color, as well as its own focal "nature" theme. In one level, you walk over sand and past cacti. In another, you have red flowers and huge mushrooms.<br /></span></span></p><p><span><span></span></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4E4ebW5jL5MNRsaHtTIdYiQvMczUDKLp0XvuBObYd0GmE5de9MW2iegL9To_mani2pkUPn2wccHaNdZLwHyFjkZdwK3VCOye7A6zp36F3rNkCAgUyOiUtZyareOpfU1b2pEN8o_lgZEw/s839/SimileThoughtsPalette.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="486" data-original-width="839" height="370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4E4ebW5jL5MNRsaHtTIdYiQvMczUDKLp0XvuBObYd0GmE5de9MW2iegL9To_mani2pkUPn2wccHaNdZLwHyFjkZdwK3VCOye7A6zp36F3rNkCAgUyOiUtZyareOpfU1b2pEN8o_lgZEw/w640-h370/SimileThoughtsPalette.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Each world's unique color palette, as well as World 4's per-level secondary color.<br /></td></tr></tbody></table><span><span><br /> </span></span><p></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>This period of lunch break development occupied the vast majority of the project's runtime. Cut ahead to January of 2021. Now that I no longer had a full-time job, I could dedicate myself more thoroughly to Simile Thoughts' development. I managed to finish all the important levels, leaving only minor things such as transitions and ending incomplete. I figured it was high time to get the mappack playtested by someone else, before I was ready to call it a wrap.</span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>I got myself a playtester already familiar with Mari0, and right away he found tons of exploits with varying degrees of severity. Some were a quick fix, others required major relayouting. However, unfortunately, three of the mappack's puzzles were completely unsalvageable. I had no choice but to create three brand new puzzles from scratch. Thankfully, I had kept all of those "extra puzzles" I mentioned earlier in the planning phase, which ended up saving me a lot of work. I managed to make use of two of those puzzles, and used one of those "ideas sketch" as part of a larger, brand new final chamber.</span></span></p><p><span><span> </span></span></p><p><span><span></span></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8530wjj0sBSjt95DDEpP-Z7qIZ6DV16zTeEPgaTCDfjEFwhQeWUCyIVFp7liOPGAo-JKXds-ULF-SIMHVj8h32TG29x4zGI_tieH18iDWOd6kVz2Q0h4obqPAHnOWAQUhVQKFpAQ2mZY/s2618/OldVsNewPuzzles.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1202" data-original-width="2618" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8530wjj0sBSjt95DDEpP-Z7qIZ6DV16zTeEPgaTCDfjEFwhQeWUCyIVFp7liOPGAo-JKXds-ULF-SIMHVj8h32TG29x4zGI_tieH18iDWOd6kVz2Q0h4obqPAHnOWAQUhVQKFpAQ2mZY/w640-h294/OldVsNewPuzzles.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span>Comparison between the old,
discarded levels, and the new levels that replaced them. The World 2
puzzles had to be reshuffled to accommodate the new level's easier
difficulty. World 4 levels kept their individual themes and some assets,
but still had to be mostly remade.</span></td></tr></tbody></table><span><span> </span><br /><span><br /></span></span><p></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>Remaking those levels, as well as designing those previously-mentioned transitions and end level graphics, cost me a few extra months of work. After facing some scheduling complications, I was encouraged by a friend to release the mappack, and resolve potential breaks and exploits as they happened. And so with that, Simile Thoughts finally went public! I did have a few players find new exploits, which were swiftly patched, and I had to content myself with using some royalty-free music in order to speed up the release, but I can finally put this project to rest now!</span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>As for the future of Simile Thoughts, it is uncertain. As of writing, the mappack hasn't received much feedback or playthroughs. I had plans for working on a mod that would introduce many quality of life features, graphical overhauls, sound replacements, and just generally make the gameplay as smooth as possible for both new and old players. However, since there hasn't been any demand for such a mod, working on it would entail a lot of time and effort that could be spent better in continuing the development of Paperboy.</span></span></p><p><span><span> </span></span></p><div class="separator" style="clear: both; text-align: center;"><span><span><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='640' height='358' src='https://www.blogger.com/video.g?token=AD6v5dy0KjBiHtxrNhedxWIdjqd9ONtNjTK6LbVNvJpZTTfCT-bX57epI6jBqm4xQ9RqoKIiANIJ-pHIhvztrwfpJQ' class='b-hbp-video b-uploaded' frameborder='0'></iframe></span></span></div><div style="text-align: center;"><span><span>Preview of how far I had gotten with the mod project. Keep in mind that this version was a prototype, and would have to be rewritten from scratch, were there to be a demand.</span></span><br /></div></div><div style="text-align: justify;"><p></p><p><span><span> </span></span></p><p><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span><span> <span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>If you've read it this far, thank you very much! Simile Thoughts was a passion project of mine, and I'm incredibly proud of how it came out. I have acquired many new skills in pixel art and level design that will be of great value for my future projects. I hope to see you in my next blog post!<br /></span></span></p></div><div><p></p><p></p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-2214123469728983872021-03-20T13:23:00.001-03:002021-03-20T18:19:33.703-03:00Paperboy Devlog<div><p style="text-align: justify;"> <span> Well hello again! It's been a while, hasn't it? I suppose it's always a while in-between posts. I could go on about what I've been doing these past few years, or how my life has changed, or how a certain virus has caused a certain worldwide situation, but to be completely frank, not much has changed for me personally. I've been working on the odd project here and there, playing around with different games, programs, drawing styles; exploring music, poetry and a lot more. However, none of those were activities I deemed worthy of a blog post.</span></p><p style="text-align: justify;"><span><span> </span>Enter <b>Paperboy</b>. This is a game idea I've had for two years now, and which my recent lack of employment has made me want to <i>finally</i> take seriously. Long story short, Paperboy is an isometric 3D puzzle game in which the goal is to deliver newspaper to people's doors. Silly premise? Absolutely, but that's by design. The core idea came from a casual conversation between some friends and I, in which we discussed "liquid fizzlers" - picture Portal 2's fizzlers, but behaving as a stream affected by physics. My mind fixated on garden hoses and sprinklers, to which I thought "why not lean in on that?" Thus Paperboy was born. The idea of a newspaper delivery boy navigating gardens and patios, trying to get a pile of newspaper to the front door of houses was both charming and comical, and starkly contrasted the seriousness and "realism" of most of my other game ideas.</span></p><p style="text-align: justify;"><span><span> </span>All mechanics, obstacles, hazards, and overall themes and level design choices were conceived from the premise of delivering newspaper through gardens. Water became a threat to papers. Flower patches became obstacles for the player. Fences, gates, crates, they all became navigational assets. Levels could take on the form of pompous mansions with lush gardens, or concrete patios with mud pools and wet cement.</span></p><p style="text-align: justify;"><span><span> </span>With such a simple, yet flexible premise, what took so long to get started?</span></p><p style="text-align: justify;"><span><span></span></span></p><a name='more'></a><p style="text-align: justify;"><span> </span>The first thing I did with this concept was draw out potential game mechanics. I explored their application in puzzles, and how to best represent their behavior within the style and setting of the game. I needed a prop to allow the player to safely block off jets of water, so wooden crates came into the picture. I needed something that could move on its own after being set up in a position, so a lawn mower was sketched. Slowly, new ideas and behaviors started taking shape. Then the player movement set was conceptualized. How would the player navigate the world? How would they interact with props? Same for the block of paper they have to carry around.</p><p></p><p style="text-align: justify;"></p><div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9_m4JVE-6X55L8cmnHCvZI7WykLYVSwSnApLzKfkNGgBbD2SEiU_Jh0YTMVXH0OJMw7smnrXnF02WdfF2Jp7hFvH6Gt5l19J7tFq0aGvx8kwxoHPRWcxzitYt390Bl6jE18EKafqJquk/s2048/IMG_20210314_120333869.jpg"><img border="0" data-original-height="2048" data-original-width="2048" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9_m4JVE-6X55L8cmnHCvZI7WykLYVSwSnApLzKfkNGgBbD2SEiU_Jh0YTMVXH0OJMw7smnrXnF02WdfF2Jp7hFvH6Gt5l19J7tFq0aGvx8kwxoHPRWcxzitYt390Bl6jE18EKafqJquk/w320-h320/IMG_20210314_120333869.jpg" width="320" /></a></div><span><br /></span><p></p><p style="text-align: justify;"><span><span> </span>After a lot of that was thought up, I started sketching down some ideas. I used my lunch breaks at work to scribble down level ideas and general mechanics and moves I deemed interesting.</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNTpf0BxXt9CqriiyWI8clWh6mWEutCWW3gXKRtHSa-LOALn8NZYP75Nu0OKENvNleZKEgZUkgzpFcwogscx2p4wndNMTyb_xvIRlgtNshuxb7ywyl3iFfT8Mq_kl0tzT9FrtNlKnFZw/s2048/IMG_20210314_120146083.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="2048" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxNTpf0BxXt9CqriiyWI8clWh6mWEutCWW3gXKRtHSa-LOALn8NZYP75Nu0OKENvNleZKEgZUkgzpFcwogscx2p4wndNMTyb_xvIRlgtNshuxb7ywyl3iFfT8Mq_kl0tzT9FrtNlKnFZw/s320/IMG_20210314_120146083.jpg" /></a></div><span><br /></span><p></p><p style="text-align: justify;"><span> <span> </span>I needed more than that though. I wanted to get a hands-on experience. It was time to prototype. Given the 3D nature of the game, this was going to be a challenge. You see, I've only ever made games with the <a href="https://love2d.org/" target="_blank">Love2D</a> engine and, as the name suggests, that is a 2D engine, so not exactly the most appropriate for my 3D plans. The other platform I've made games in was <a href="http://www.puzzlescript.net/" target="_blank">Puzzlescript</a>, the scripting language that gave birth to <a href="https://hugobdesigner.blogspot.com/2017/10/in-depth-look-at-filler.html" target="_blank">Filler</a>. To make it easier to get a feel for the game, I started prototyping a simplified, top-down 2D variant in Puzzlescript.</span></p><p style="text-align: justify;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC-xaNzgQw0_wfG5EGe5UX0hntYcarudy5QBm-1XmRIpJdiGNCkNUPmzxBZXeiN6mac6yBvCOFY2olRNYecY4GUY1N9pLXYsI2tJCaXhXI2KOvtAuccO1H8WSzamm7phNTNfaiCVOl9vM/s450/2021-03-14_13-01-48.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="450" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC-xaNzgQw0_wfG5EGe5UX0hntYcarudy5QBm-1XmRIpJdiGNCkNUPmzxBZXeiN6mac6yBvCOFY2olRNYecY4GUY1N9pLXYsI2tJCaXhXI2KOvtAuccO1H8WSzamm7phNTNfaiCVOl9vM/s320/2021-03-14_13-01-48.gif" /></a></div><br /></div><div><div style="text-align: justify;"><p><span><span> </span>Needless to say, that turned out to be a waste of time. Not only was Puzzlescript far too limited in its scope to be useful for prototyping this particular game, but the 2D grid-based nature of it meant that I was putting a lot of effort into adapting 3D behavior for a 2D environment, which ultimately completely changed how the game was being approached. It was not a good way to prototype, so I abandoned the idea after a while.</span></p></div><p></p><p style="text-align: justify;"><span><span> </span>I knew that this game would only work in 3D. Some of the core mechanics involve climbing ledges, hopping over fences, or dropping down one-way stairs. While those mechanics could be simulated in 2D, it'd be a much weaker substitute, not to mention levels would have to be designed with specific vantage points in mind, which would severely hinder the level design flexibility. I had to face the facts: it was time to learn a new game engine.</span></p><p style="text-align: justify;"><span><span> </span>The first engine I gave a try was Corona SDK (now renamed to <a href="https://solar2d.com/" target="_blank">Solar2D</a>). I was introduced to it by a work colleague who thought I might be interested in it since it is Lua-based. I gave it a try and quickly became disappointed. The development kit required online registration upfront, just to get started, the documentation wasn't up-to-date, there was little to no 3D functionality, and the killer: it was entirely focused on mobile development. Sure, it <i>had</i> desktop compatibility, but it was not at all the focus. For me, Paperboy was always a game that would work well <i>both</i> on desktop and on mobile, but desktop was the priority.</span></p><p style="text-align: justify;"><span><span> </span>The second engine I had in mind was <a href="https://unity.com/" target="_blank">Unity</a>. I knew Javascript and was willing to learn C#, not to mention that Unity is pretty much the go-to game engine these days. There was plenty of documentation and tutorials, so it shouldn't be an issue. I knew the learning curve would be a bit steep, but before I even started, something caught my eye. A YouTube video comparing the Unity engine to Godot. After digging around, I learned more about this new "Godot" engine. It seemed very promising, and it had both 2D and 3D development environments, plus its own scripting language, so I put Unity aside and gave Godot a go.</span></p><p style="text-align: justify;"><span><span> My endeavors with <a href="https://godotengine.org/" target="_blank">Godot</a> were, unfortunately, less than ideal. Attempting to approach the engine with a fixed goal in mind might not have been the best strategy, as I was constantly trying to adapt my usual work methods into this completely new and foreign environment. After only a few days of working on it, I realized I was setting myself for disappointment. Sure, I was making use of most of the features and resources the engine provided, but in a very hacky and roundabout way. I realized I had to learn the engine properly first, by approaching it with an openness that was simply incompatible with attempting to make a serious game.</span> I saw two possibilities: either put Paperboy on the back burner and dedicate some time to actually studying the engine, or start in an environment I'm familiar with, prototype the game, then eventually consider porting it to an engine that might offer the tools I needed.</span></p><p style="text-align: justify;"><span><span> </span>And thus, the Love2D prototype was born!</span></p><p style="text-align: justify;"><span><span> </span>The first step was to have a solid base code. I wasn't sure - I'm <i>still</i> not sure - if I was going to move to a different engine or eventually stick to the Love2D project, so I figured the safest approach was to have reliable and flexible code to work with. A few days into writing my base code, the <a href="https://itch.io/jam/love2d-jam-2021" target="_blank">2021 LÖVE Jam</a> was announced, which was a motivator for me to keep refining it to a point where, even if I made a different game, I could still use that base. It was a huge success! The base code, not my jam participation, which had me quitting midway through due to falling ill. For the second time.</span></p><p style="text-align: justify;"></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMEuo3uxuWZduqOC3TRLlC8_cmHeeq3JyBQ6seMyoQbibZXKu1KGZXFkvuL_3Q2c6cYOUTf9a7q7ISUpRtLzXmZk6jDhrMqCZi4-9pr9UZXbeqP4-cHqhqz0X7X-AY83auw8TRfph8B-8/s800/love_2021-02-21_10-23-53.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="600" data-original-width="800" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMEuo3uxuWZduqOC3TRLlC8_cmHeeq3JyBQ6seMyoQbibZXKu1KGZXFkvuL_3Q2c6cYOUTf9a7q7ISUpRtLzXmZk6jDhrMqCZi4-9pr9UZXbeqP4-cHqhqz0X7X-AY83auw8TRfph8B-8/s320/love_2021-02-21_10-23-53.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">This is as far as my entry went.<br />Remember the placeholder chocolate player.<br /></td></tr></tbody></table><br /><p style="text-align: left;"><span><span> </span>While my jam entry flopped, the code I had written for it was quite handy for speeding up the development process of the base code. A couple days after getting well again, I was comfortable enough to get started on the actual Paperboy game.</span></p><p></p><p style="text-align: justify;"><span><span> </span>There is, however, the elephant in the room: I'm still trying to develop a 3D game in a 2D engine. So first I had to figure out how to do 3D stuff by hand. Which I did, in about a week. After many iterations, calculations and approaches, I finally got a working isometric renderer in Love2D.</span></p><p style="text-align: justify;"><span></span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi80FT8OqXuttQS9_jhNjgvKGIka0OJmmlP0ZXckHCDoWgykuNxOPCrmJ9MwFcCOg-qev9Vu4oK1pzhqxyuwZVhAIhWsEqiHSe3KTXTQPw9PAPVyvTAMvUXNVnT0gtCHTrIpVtR0vqMsNY/" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="455" data-original-width="455" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi80FT8OqXuttQS9_jhNjgvKGIka0OJmmlP0ZXckHCDoWgykuNxOPCrmJ9MwFcCOg-qev9Vu4oK1pzhqxyuwZVhAIhWsEqiHSe3KTXTQPw9PAPVyvTAMvUXNVnT0gtCHTrIpVtR0vqMsNY/" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Chocolate man makes his triumphant return!<br /></td></tr></tbody></table><p></p><div class="separator" style="clear: both; text-align: center;"></div><span><br /></span></div><div><div style="text-align: justify;"><p><span><span><span><span> </span></span>And that's where</span> I'm at now. I could go on about the entire process of trying to figure out the math and rendering of 3D isometric graphics, but it's rather uninteresting for this type of devlog. It was, however, a very fun process, and I learned a lot on the way. In fact, a lot of the work I did could comfortably suit a different isometric game, as I haven't <i>actually</i> started with any of the game-specific logic. As a matter of fact, I might end up releasing the "engine" on its own at some point, just not now.</span></p></div><p></p><p style="text-align: justify;"><span><span> </span>One final thing: in order to make good use of all this investment and dedication, I'm also taking the time of development to get acclimated to a new work environment (the Atom IDE, which is a world away from the good ol' Notepad++ I'm so used to), as well as getting used to managing a GitHub repository. That way, regardless of the future of this project, I'll always have the source code to consult and share, especially since it houses all of the base code for any generic isometric 3D game someone might want to make.</span></p><p style="text-align: justify;"><span><span> </span>So, if all I've gotten so far is a base code, why have I decided to divulge it in a blog post after more than 3 years of silence? Well, there are a few reasons...</span></p><p style="text-align: justify;"><span><span> </span>Firstly, I'm just proud of what I've gotten so far. From the outside it might not look like much, but this code is efficient and flexible enough to let me experiment with various things at once. For instance, I've completely rewritten my <a href="https://github.com/HugoBDesigner/love.gradient" target="_blank">Gradient Library</a> to make it self-contained, faster, more dynamic, as well as cleaning up the code and making it compatible with the latest version of LÖVE. I've also written a simple but effective gamestate system to manage state transitions, as well as coded up some cool animated intros.</span></p><p style="text-align: justify;"><span></span></p><div class="separator" style="clear: both; text-align: center;"><span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0VCKE8ctxMPSsbWUFhvtTZaoC21D8e17dS-9tQAQO7hTwf8ww4m7P4Tvi0m2YRaoUPugdEjX9CbognawnIjZWADvdHLSvQWFS4UsYVaWEczVEY41lYKJLWfaJOASbENDvRSnMWCKxx9I/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="300" data-original-width="400" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0VCKE8ctxMPSsbWUFhvtTZaoC21D8e17dS-9tQAQO7hTwf8ww4m7P4Tvi0m2YRaoUPugdEjX9CbognawnIjZWADvdHLSvQWFS4UsYVaWEczVEY41lYKJLWfaJOASbENDvRSnMWCKxx9I/" width="320" /></a></span></div><span><br /></span></div><div style="text-align: justify;"><p><span><span> </span>Secondly, it's a venture into the unknown. I've made several game things based on stuff I'm familiar with (Mari0 modding, for instance). By making a game from scratch without having a previous base to work from, I believe I have a lot more to learn and discover. Moreover, I have more control over every aspect of the game, from how it's rendered to how it's structured. I can find where its strengths and weaknesses are, where optimization is needed, and where I can add my own touches.</span></p></div><div style="text-align: justify;"><span> </span></div><div style="text-align: justify;"><span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIL3Fvcz4rB-_MLTIYu3VKLqi4g6O3NMVYxzrLg5uQR_mmIKbVwHLDM7srrts_VUIrkvk7m36sMzRGBet78p2q4IUa76yMZDwwaszsRWBDVSe9s5ugNRJn_2tX4a-bJuKaLLZbyOHzE-g/" style="margin-left: auto; margin-right: auto;"><img alt="" data-original-height="300" data-original-width="800" height="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIL3Fvcz4rB-_MLTIYu3VKLqi4g6O3NMVYxzrLg5uQR_mmIKbVwHLDM7srrts_VUIrkvk7m36sMzRGBet78p2q4IUa76yMZDwwaszsRWBDVSe9s5ugNRJn_2tX4a-bJuKaLLZbyOHzE-g/" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Framerate before and after several depth-sorting optimization tweaks.<br /></td></tr></tbody></table><br /></span><p><span> <span> </span>Thirdly, and perhaps most importantly, it is a public assertion of commitment. Paperboy is a project that might seem small and unimportant, but much like Filler, it's the type that I want to see through in its completion. It's an opportunity to tackle a game that is neither so small as to be a one-off experiment</span>, nor so large as to be daunting and hard to manage. But mostly, it's a way to push myself to finish a game. For all the ideas and doodles and experiments, Filler is, to this day, the <i>only</i> game project I've ever <i>actually</i> published (that isn't a modification/expansion of an existing game). I know myself well enough to realize that any bigger project would end up on a shelf (or, in my case, a plastic folder on a cabinet). So Paperboy seems like the ideal opportunity to try and publish another game. A bit bigger, a bit more ambitious, but still within reach.</p></div><div style="text-align: justify;"><p><span> </span>So, over the coming weeks, I plan on continuing to work on Paperboy, prototyping game mechanics and levels, and keeping you guys updated through devlogs. I won't set a schedule or frequency of posts, especially since most of the work I'll do will be effectively invisible. But I do believe it's due time you guys get another game. Stay tuned, and I'll see you guys in my next devlog.</p></div><div><p></p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-13289540848426851602017-10-15T20:50:00.002-02:002023-03-26T02:12:06.745-03:00In-depth look at Filler<div style="text-align: justify;">
<span> </span>Why hello there reader! I know, I know, I know... it's been a while. But don't think I've been sleeping on the job. Though it's been over a year since my last post, I've been working really hard on a lot of different projects. I plan on giving this blog a well-deserved overhaul soon, and keep you guys up to date on my recent projects. But I couldn't let this very opportunity pass by: my first publicly-released game, <b>Filler</b>.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.puzzlescript.net/play.html?p=dead21bf09bebb91c128eb27629affcb" target="_blank"><img border="0" data-original-height="637" data-original-width="793" height="321" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ26w4H2Qflqn5Fd-uN2Z4ThzOintLyPfItH5cjvzjnWmVeCVmsYmrU6byOBbklqlb_cecSld6miiUq7C44DShdq647IXRDZ3lnxOhHuc_p8U_3J6Id1ePURslrmuYJASzC94q0uYxID4/s400/chrome_2017-10-15_13-18-41.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span> </span>The mechanics and goals of the game are incredibly simple: fill all the empty spots, reach the target at the end. So, you might be thinking: "With such a simple concept, I bet Hugo pulled that out of his bottom in a couple days". Weeeeeeeeell, make that roughly 4 years. It all began a long, long time ago...</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<a name='more'></a><br />
<br />
<div class="separator" style="clear: both; text-align: justify;"><span> </span>This story started when I was about 16. Back then, I was just getting started on the internet and didn't have much to do on a computer. However, whenever I <i>did</i> get on a computer, I'd make the most out of whatever tool I had at my disposal, no matter how simple they were, or whether they were even designed for such ends. For example, with a cheap webcam and MS Paint, I'd make fake pictures of "twins" of myself, or even stop motion out of a Santa Claus toy. In PowerPoint, I'd make fake computer interfaces, or mouse maze games. Then I got to Excel...</div>
<div class="separator" style="clear: both; text-align: justify;">
<span> </span>The reason why Excel was so different for me was that, even though I didn't know at the time, it had the right tools to kickstart me into game development: a grid-based interface, formulas to manipulate numbers and user input, mouse-activated macros and even programming itself via Basic. After a bit of experimenting with basically no prior knowledge of programming, I somehow managed to put together the very first version of Filler (called "Filling In" back then). It had 5 very simple levels and a very rough interface, but the game was functional!</div><div class="separator" style="clear: both; text-align: justify;"> </div><div class="separator" style="clear: both; text-align: justify;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqZOC4VzMt2c7mfFzxjdIzhIRe07uog05FwrCxPTrMpMMfjBY-jx0A6BUkyxkjD-EYdLSmUh7q7wOAggVVEdbU7FOgpgwGIKNOrViHXegmJ71nl6rIhHlhRg54wExIgNzTgG9h141r9NcasdOi0H-Wi9GYlQLZBSB67rKr0v5G5yp-P0JCwA7d1hPG/s785/firefox_2023-03-26_01-14-59.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="446" data-original-width="785" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqZOC4VzMt2c7mfFzxjdIzhIRe07uog05FwrCxPTrMpMMfjBY-jx0A6BUkyxkjD-EYdLSmUh7q7wOAggVVEdbU7FOgpgwGIKNOrViHXegmJ71nl6rIhHlhRg54wExIgNzTgG9h141r9NcasdOi0H-Wi9GYlQLZBSB67rKr0v5G5yp-P0JCwA7d1hPG/w400-h228/firefox_2023-03-26_01-14-59.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The very first version of Filler, running on Microsoft Excel<br /></td></tr></tbody></table><br /> </div>
<div style="clear: both; text-align: left;">
<div style="text-align: justify;">
<span> </span>After that, I just... moved on. I didn't think much of it, as was the case with most of my childhood/teenage experiments. I'd work on them, then try something else. Then in 2016, I decided I wanted to work on a small game to release as my first. I knew I wanted it to be a puzzle game, to have simple mechanics, and to be easy enough to be made relatively quickly. I didn't want to spend years into my first project. I wanted something simpler that would both kickstart my game dev endeavors and provide me quick feedback before I could move on to bigger projects. Then, after looking through my folders, filled with hundreds of papers with sketches, notes, plans and projects, the memory of a silly puzzle game I had made years prior came up.</div>
</div>
<div style="clear: both; text-align: left;">
<br /></div>
<div style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8e9E1UqPxyJ8gzgb0dxiBEB63bqbpQLx9TXA8uSf2WSrMm_CQ6GuGvNWijM_n5FRZ8wL0sf_rtMPY6iEjQ_ZivmgI_y05bcpC6P4sS2zOf1u8kGNpzZijs30_SNmjP29zwDBiS5s-w4I/s1600/love_2016-09-04_14-28-43.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"><img border="0" data-original-height="400" data-original-width="400" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8e9E1UqPxyJ8gzgb0dxiBEB63bqbpQLx9TXA8uSf2WSrMm_CQ6GuGvNWijM_n5FRZ8wL0sf_rtMPY6iEjQ_ZivmgI_y05bcpC6P4sS2zOf1u8kGNpzZijs30_SNmjP29zwDBiS5s-w4I/s320/love_2016-09-04_14-28-43.png" width="320" /></a><br />
<div style="text-align: justify;">
<span> </span>For the second half of 2016 and the first half of 2017, I was determined to shine a new light on that old, but interesting, project of mine. I knew from the start that there would probably be dozens of games similar to this, especially given how simple of a concept it was. But I also knew that, as long as the final product was fun to play, original in some aspects, and visually appealing, it'd still work out for me. I started it simple, with a simple grid, simple tiles, and no puzzle elements. However, I made the sorry mistake of prioritizing aesthetics over gameplay, and that came back to bite me. I spent most of my time trying to fix visual glitches or trying to improve aesthetics, and that happened for several months. The project had become so frustrating to work with, with so many bugs and such a lack of optimization, not to mention the lack of proper gameplay, that I abandoned it altogether. Below, you can see what it looked like shortly before I left it to collect dust.</div>
</div>
<div style="clear: both; text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFCzZIYZHUqBBr6QnoOtmrQaA7B7wSq4_0z5QJ1MnqLWwxiYp9JU3_XCm1eBor4hF68uK0nGsHxDPx59EK0EWQSqd0_r3HrLZsExA_EcwqPCG70pvDhkgJtL21ULvpRz3mfJ6wR2miCRU/s1600/FillerOld_3.gif" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="400" data-original-width="400" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFCzZIYZHUqBBr6QnoOtmrQaA7B7wSq4_0z5QJ1MnqLWwxiYp9JU3_XCm1eBor4hF68uK0nGsHxDPx59EK0EWQSqd0_r3HrLZsExA_EcwqPCG70pvDhkgJtL21ULvpRz3mfJ6wR2miCRU/s320/FillerOld_3.gif" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Half-working level editor showcase</td></tr>
</tbody></table>
<span id="goog_1127821023"></span><span id="goog_1127821024"></span><br />
<div style="text-align: justify;">
<span> </span>Even then, I had some of the core ideas for Filler: multiple targets, walls, and I had just started working on synchronized players. But alas, it was doomed for a long time.</div>
<br />
<div style="text-align: justify;">
<span> </span>Skip ahead a few months, and I get formally introduced by user quat to <a href="http://www.puzzlescript.net/" target="_blank">PuzzleScript</a>, a web-based, minimalistic, 2D game engine. I didn't give it much credit at first, but then I started playing more and more games made with it, and started to see its true potential. Out of curiosity, I decided to poke around making a game. I chose Filler, but I didn't have big plans for it. I just wanted to give it a quick shot, nothing too serious. Maybe spend a week at most, and never touch it again. But me being me, I should have known better...</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge47W8uCRK-ArgX6fZlizj3gPYM98fg_rMWGTza-3c8zBEzkSlG-jogjTWPJfOiI7Gbvl3Jz4dnN0RnDJj-xm1IsWyzt5PRhTqCo6BoOqMOLYeo8ow2wgL6KulpGTn2AvD02gcL_IpC0k/s1600/2017-10-15_15-21-47.gif" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="278" data-original-width="278" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge47W8uCRK-ArgX6fZlizj3gPYM98fg_rMWGTza-3c8zBEzkSlG-jogjTWPJfOiI7Gbvl3Jz4dnN0RnDJj-xm1IsWyzt5PRhTqCo6BoOqMOLYeo8ow2wgL6KulpGTn2AvD02gcL_IpC0k/s200/2017-10-15_15-21-47.gif" width="200" /></a></div>
<div style="text-align: justify;">
<span> </span>I started with the main mechanic: moving player that leaves a trail behind, and must "consume" the empty tiles it passes by. It wasn't as easy as I first thought, but I still managed to do that with a few workarounds. Then I coded in targets, which were incredibly straightforward. Then I came up with crossroads, and the coding difficulty spiked. I couldn't just have them be required to be passed by twice. I had to consider all edge cases: the player entering vertically and leaving horizontally, the player blocking its path before entering it, multiple crossroads side-by-side, the direction through which the player entered first, blocking adjacent crossroads when one of them got blocked, etc. As you can probably imagine, I got quite carried away, and before I knew it, I was spending weeks tweaking that game.</div>
<div style="text-align: justify;">
<br /></div>
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" data-original-height="223" data-original-width="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkN-yreACRLlDR760_xibAnWJcSntjvqjFVHj1WXVdI2Na-EbxbZgzC-hjSz-2zUyVKiApTteUMHMUSsfBNIy3ZjD61CBkbhxzhLqB7FVdLGxTGFICre7R6bXbg7js-pjlcfv5tLTTVDA/s1600/chrome_2017-07-17_12-39-34.png" style="margin-left: auto; margin-right: auto;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Having to consider all possible states, fails<br />and outcomes was quite the challenge</td></tr>
</tbody></table>
<br />
<div style="text-align: justify;">
<span> </span>The more puzzle elements I came up with, the harder the challenge became. But given how easy it was to work with PuzzleScript, I wasn't hindered by it: I was encouraged. I wanted to keep working on it more and more, and more and more ideas came along. Most of them I ended up dismissing for being either too convoluted, too simple or just that other ideas could be worked as such. One such example was having buttons and doors: the player would have to pass by a button before they could pass through the door. But that turned out to act more like "forcing a path" than being a clever mechanism. In the end, I decided that the current set of elements was more than good enough to allow for enough flexibility and interesting puzzles.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHsOG7G56n_h6QAP80g0DuwC4Mz2FjWG2L3FMj3rjILCK0idegJTmwD_8tyBlM0vN-jWsKWbpJs76z0fjQSpSssQdASEtg5UjAV-R0gCqwW9Rhtl3L0uTwHT7HjsUFAlRJIuelsIEWf8Y/s1600/chrome_2017-10-15_15-54-10.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="370" data-original-width="369" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHsOG7G56n_h6QAP80g0DuwC4Mz2FjWG2L3FMj3rjILCK0idegJTmwD_8tyBlM0vN-jWsKWbpJs76z0fjQSpSssQdASEtg5UjAV-R0gCqwW9Rhtl3L0uTwHT7HjsUFAlRJIuelsIEWf8Y/s200/chrome_2017-10-15_15-54-10.png" width="199" /></a></div>
<div style="text-align: justify;">
<span> </span>Targets were the first. They were present in the Löve2D project, and still served a vital <i>goal</i> in the game, as they could be used both as ways of alternative solutions, and as ways to masquerade the actual solution. However, I tried my hardest not to abuse said features, limiting myself to using multiple goals mainly if there were two or more solutions I was happy with, and if the one solution planned was easily given away by its target.</div>
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhivBSaYO5Bkl5CvnbAEAjcUCzxAkgQXr_KujMWQCCfAH5u5b0f9TvvJJI0cm7Ff73Qjoinr8xyTrakWgnUdpFnjqz5YKLq4M4XgGMCB_68SIEKwyHZ0bUp_qssfPIFl2_LrqsuUCJbss/s1600/chrome_2017-10-15_16-28-18.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="378" data-original-width="437" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhivBSaYO5Bkl5CvnbAEAjcUCzxAkgQXr_KujMWQCCfAH5u5b0f9TvvJJI0cm7Ff73Qjoinr8xyTrakWgnUdpFnjqz5YKLq4M4XgGMCB_68SIEKwyHZ0bUp_qssfPIFl2_LrqsuUCJbss/s200/chrome_2017-10-15_16-28-18.png" width="200" /></a></div>
<div style="text-align: justify;">
<span> </span>Walls were also planned since the previous attempt at making Filler. They too serve two purposes: the first and most obvious one is blocking the player from walking in a certain axis between two tiles, which is quite useful for preventing unintended solutions and forcing certain paths; The second use is making "unidirectional" gates, if you want the player to only move horizontally or vertically.</div>
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLbDaso_8p8eWaL-D3LldfodqswNfrZ2qqpU-79B5acw9g18z4Mokv33X0qixS_vqs-bQEiA9ykcULt7z9TMa7lQhcv6v56Bh3Zvnzn4bBFqCE6XLgTCFfvwkV1ckXVo_09AHZ68AzrgA/s1600/chrome_2017-10-15_17-20-11.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="370" data-original-width="369" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLbDaso_8p8eWaL-D3LldfodqswNfrZ2qqpU-79B5acw9g18z4Mokv33X0qixS_vqs-bQEiA9ykcULt7z9TMa7lQhcv6v56Bh3Zvnzn4bBFqCE6XLgTCFfvwkV1ckXVo_09AHZ68AzrgA/s200/chrome_2017-10-15_17-20-11.png" width="199" /></a></div>
<div style="text-align: justify;">
<span> </span>I'm not entirely sure where the idea for crossroads came from, but I knew they'd be an amazing new addition to Filler. They could be used in a wide variety of manners, to bring all sorts of interesting puzzles, from "knottingly" confusing to overly simplistic. I tried hard not to make levels where there are dozens of them strewn across and overwhelming the player. In the few levels where <i>there are</i> a lot of them, I tried making sure the actual solution was simpler than it might have seemed at first glance, giving the player a greater sense of achievement.</div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUNeajBeDQnzEVu5T6ECQmQxZPGA9au8d26GmwCFa-kCpFxfEJFRfVgt-BTS_SgyKVkgQouWkdhEex1lzQVlgB0iEHHOSib4d4oCtkH-lQNyL_9nT2_GJ5pf-YNJZ-DPTvj6syMgyCW4M/s1600/chrome_2017-10-15_18-24-47.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="402" data-original-width="401" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUNeajBeDQnzEVu5T6ECQmQxZPGA9au8d26GmwCFa-kCpFxfEJFRfVgt-BTS_SgyKVkgQouWkdhEex1lzQVlgB0iEHHOSib4d4oCtkH-lQNyL_9nT2_GJ5pf-YNJZ-DPTvj6syMgyCW4M/s200/chrome_2017-10-15_18-24-47.png" width="199" /></a></div>
<div style="text-align: justify;">
<span> </span>Portals were kind of an interesting concept. Obviously I didn't come up with them on my own, they were inspired by Portal, but I knew that, in order for them to work for this game, they'd have to be more than just take the player from point A to point B. Not only do we now get multiple distinct pairs of portals, there is also a new mechanic that I'm going to cover below.</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ4TkiSnV1C2iQS_Y3g7mqvKk5kWxiSs-4wmiLybJoq6LODLNSU21fyGr9mzWGOD_QQJ6ajYbRWofoVeQBqJIFC1pqx7MZmGtG0VI0WEjDBJm_dPZ5Q7ZWViFmLUWHn1E0ghyM39iRP4I/s1600/chrome_2017-10-15_19-00-00.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="511" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ4TkiSnV1C2iQS_Y3g7mqvKk5kWxiSs-4wmiLybJoq6LODLNSU21fyGr9mzWGOD_QQJ6ajYbRWofoVeQBqJIFC1pqx7MZmGtG0VI0WEjDBJm_dPZ5Q7ZWViFmLUWHn1E0ghyM39iRP4I/s200/chrome_2017-10-15_19-00-00.png" width="200" /></a></div>
<div style="text-align: justify;">
<span> </span>Unsurprisingly, ice is also one of the most versatile puzzle elements. It works exactly as you'd expect - and like you've probably seen in many puzzle games. If you move through it in a direction, you won't stop until you hit something that blocks your way, or if there's an empty tile ahead. That brings a lot of possibilities: together with crossroads, the player can cross large chains in a single move. By themselves, might require the player to pre-block their path before sliding through. They can also be an obstacle when they force you somewhere you don't want to go.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZcVjUJqBTMs33YqIk8WQrAfhAuIQizJznroxSLqqIKoJp3wyzQXSTKYKHfIxPXt-8zOj2Vw4zc6xFKswEfBsv_q820lRP9PvQcS3zSJMr6EZt2u-XWbrvJ7wqu4oR-K2Nx_1f1CUiuHU/s1600/chrome_2017-10-15_19-27-37.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="400" data-original-width="344" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZcVjUJqBTMs33YqIk8WQrAfhAuIQizJznroxSLqqIKoJp3wyzQXSTKYKHfIxPXt-8zOj2Vw4zc6xFKswEfBsv_q820lRP9PvQcS3zSJMr6EZt2u-XWbrvJ7wqu4oR-K2Nx_1f1CUiuHU/s200/chrome_2017-10-15_19-27-37.png" width="171" /></a></div>
<div style="text-align: justify;">
<span> </span>Players were planned for the Löve2D version, but when I tried implementing them, most of the game fell apart. Luckily for me, PuzzleScript's way of handling players allowed me to have that feature with only minor tweaks to the code. They offer a unique way of thinking around a puzzle in that, not only do you want both players to reach the goal, you also control both at once. So while at a certain keypress, one player might be pressing against a wall, the other player could be moving around in a different part of the puzzle. That allows for a plethora of different mechanics, such as one player blocking the other, both crossing the same crossroad, etc.</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSI2rm6VShOJArZfsAqQo2JoSTelnjb1yhFfRGPU7r8h6IVO62sEKFbWcqHkO2KFPZKuAYbiJEyWl9vBXvpuX0Gxwk6vD2_jx8n5hK2uzHkScwwL9Wn3j-hwEe1DUe5JIc5g3vCofBTiM/s1600/chrome_2017-10-15_19-26-23.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="511" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSI2rm6VShOJArZfsAqQo2JoSTelnjb1yhFfRGPU7r8h6IVO62sEKFbWcqHkO2KFPZKuAYbiJEyWl9vBXvpuX0Gxwk6vD2_jx8n5hK2uzHkScwwL9Wn3j-hwEe1DUe5JIc5g3vCofBTiM/s200/chrome_2017-10-15_19-26-23.png" width="200" /></a></div>
<div style="text-align: justify;">
<span> </span>Portal splitting/rejoining was more of a "happy accident". There was nothing in the code preventing more than 2 portals of the same color, so the logical question was "what if I have 3 portals"? While I had to tweak the rejoining mechanic, the splitting worked completely on its own, and I decided to implement it with the "Players" levels. When a player enters one of three portals, two players come out the other portals. Likewise, if two players enter the same portal color simultaneously, a single player leaves the third portal. A perfect fit for the final chapter.</div>
<br />
<br />
<br />
<div style="text-align: justify;">
<span> </span>And that about concludes our tour through Filler. If you want to give it a try, you can play it for free on your browser <a href="http://www.puzzlescript.net/play.html?p=dead21bf09bebb91c128eb27629affcb" style="font-weight: bold;" target="_blank">RIGHT HERE</a>. You can also check out the <a href="https://groups.google.com/forum/?hl=en#!topic/puzzlescript/bUXjCSwqoLg" target="_blank">original post</a> on the PuzzleScript forums for the solution to all the puzzles.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.puzzlescript.net/play.html?p=dead21bf09bebb91c128eb27629affcb" target="_blank"><img border="0" data-original-height="600" data-original-width="800" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCcwwpsRm1xkSP0UY2O0FUJReGhbphI0duJwaFTZNhx5lleevS-A9dlpfxCPO5BdRV97c5IF7IPZvTcd0jiUOv1VYj4T-wwClHZ4RNY_CHGYPNniX1uBdMYsJ_lqkzYjETxBs-Jiyl3LY/s400/FillerCover.png" width="400" /></a></div>
<br />
<br />
<div style="text-align: justify;">
<span> </span>As for the future of Filler, I am probably not done with it. Although it was mostly a failure, I still want to give the Löve2D version one last shot. I want to gather what I've learned while working on the PuzzleScript version and apply to it, making it more accessible to people, be it platform-wise, design-wise or map-making-wise.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span> </span>I've mentioned this before but I gotta reiterate: many, many thanks to <a href="https://twitter.com/DemonArisen" target="_blank">Demon Arisen</a> and <a href="https://twitter.com/hankymueller13" target="_blank">HankyMueller</a> for all of their help with this game. Without them, it would have taken maybe twice as long to publish, and I might have even missed out on some bugs that they found, as well as have missed some of their great suggestions and, naturally, their very well-designed puzzles.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span> </span>That is all for me for today though. I will <i>try</i> to post in less than a year. In fact, I've got quite a few projects to show, but with a new job under my belt, it's quite hard to balance my free time. I also want to give this blog a long, long due revamp, as well as get a domain. But either way, I hope to see you again really soon. Thanks for the read!</div><div style="text-align: justify;"> </div><div style="text-align: justify;"><hr></hr></div><div style="text-align: justify;"> </div><div style="text-align: justify;"><span> </span>Hello there! I'm Hugo from 2023 (<i>the futuuuure!!! </i>), letting you know that this post has been updated from its original 2017 version, since I have <i>finally</i> found the original file for the aforementioned Excel version of Filler (or "Filling In", as it was called back then). That revealed to me that the original concept came about much later than I originally had assumed: though it might be wrong, the file dates back to 2013, when I was 16 to 17 years old, instead of 12 years old like I originally assumed.</div><div style="text-align: justify;"> </div><div style="text-align: justify;"><span> </span>Additionally, back at the Brazil Game Show (BGS) event of 2022, and with the help of a tutor, I remade the first chapter of Filler entirely on GameMaker Studio 2, over the course of 2 otherwise <i>very busy</i> days. It wasn't a serious commitment, rather it was just a silly excuse to learn a bit more about the engine, but I still had a lot of fun with it.</div><div style="text-align: justify;"><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnYIdP3kwLeAiCzkPzeqQGfW8jHSx6jjXGiG7PB7A8DB5R3N0-YrxuhAh9Uxn3oJokeNhns5vQ4sFhjL_38hGA-IKaMvrCfmVC45GfMhEkYwrdyXIO4wyNFeAnU4bK0zFZ4zru8xofOlPTcDBvHlKTkrWe_g5VUZqFKiNeCfITb9-7fmPTHVYNcg50/s800/Runner_2023-03-26_01-29-48.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="800" data-original-width="770" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnYIdP3kwLeAiCzkPzeqQGfW8jHSx6jjXGiG7PB7A8DB5R3N0-YrxuhAh9Uxn3oJokeNhns5vQ4sFhjL_38hGA-IKaMvrCfmVC45GfMhEkYwrdyXIO4wyNFeAnU4bK0zFZ4zru8xofOlPTcDBvHlKTkrWe_g5VUZqFKiNeCfITb9-7fmPTHVYNcg50/s320/Runner_2023-03-26_01-29-48.png" width="308" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Filler, now with 83% fewer levels and 95% fewer graphics!<br /></td></tr></tbody></table></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><span> </span>Nevertheless, it was a fun little journey into my early game dev adventures! I'm really happy with the final version of the game – even if I had to tweak the last level after several complaints – and I'm very thankful for everyone who played and shared this game! It's a project that is still very near and dear to me, and I hope that I can play around with it again in the future, even if in another format. I don't want to make promises – anyone who's read even a couple of posts from this blog should know that – but I do have one last use for this silly little lines game.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><span> </span>Thank you very much for reading, and I'll see you in the next one!<br /></div>
</div>
<div style="text-align: left;">
</div>
Unknownnoreply@blogger.com9tag:blogger.com,1999:blog-5875476712979113891.post-3619271442041078312016-09-07T23:39:00.000-03:002019-04-23T19:27:47.822-03:00In-depth look at Minigame Simulator<div style="text-align: justify;">
Well, here we are again! After a mere 2 years, I've finally got to a point where I can proudly present my Minigame Simulator! Why this long, you ask? Well, it wasn't always like this, of course, and it <i>definitely</i> didn't take that long. So in this post, I'll guide you through the creation of this "emulator", as well as its functionality!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
It started way back around August of 2014. I've had this idea of making a game that could play other games within it, like those old "Minigame consoles" (of which, of course, I own one):</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCQrcKSWRNIreBF4pu66tH3nYaI0Qv4w81KfGMPsAI65VOJXOR-diLymbZEY1H1HJp_rvK-a2RnSjAgD-23PfwTwc8JJexyI2q5CjHDkACR9ddq5EZHHLkmWhWpjc5gGWBeyE0sWZCGzk/s1600/Wv0zKei.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCQrcKSWRNIreBF4pu66tH3nYaI0Qv4w81KfGMPsAI65VOJXOR-diLymbZEY1H1HJp_rvK-a2RnSjAgD-23PfwTwc8JJexyI2q5CjHDkACR9ddq5EZHHLkmWhWpjc5gGWBeyE0sWZCGzk/s320/Wv0zKei.jpg" width="240" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Picture from LÖVE Forum user <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&u=134300" target="_blank">lost_RD</a>.<br />
Pretty similar to the one I have in real life.</td></tr>
</tbody></table>
<br />
<div style="text-align: justify;">
What I had in mind for this project was ambitious, but it had to start small. And I mean <i>small</i>. This is what version 0.1 looked like:</div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMssE_gPqnV04jF-hl9zEuGfUkqYuus2PeICFb2lM3Y82KfLrgoDEE4LRygv98inecRyRRtKfvWLISHX4LHdpsPyG5UAFgwNPQq9qkcvzyErhqNLHPdqioB5WrEBB3eoL3eg0L8hiTTSk/s1600/L%25C3%2596VE+0.8.0_2016-09-07_21-55-18.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMssE_gPqnV04jF-hl9zEuGfUkqYuus2PeICFb2lM3Y82KfLrgoDEE4LRygv98inecRyRRtKfvWLISHX4LHdpsPyG5UAFgwNPQq9qkcvzyErhqNLHPdqioB5WrEBB3eoL3eg0L8hiTTSk/s320/L%25C3%2596VE+0.8.0_2016-09-07_21-55-18.png" width="160" /></a></div>
<div style="text-align: justify;">
It was only the bare bones of what I planned for this. It's not obvious from this picture only, but version 0.1 didn't have anything! All it did was play the Snake game, and a pretty lame first version for that matter. Pause and Settings didn't work, and you couldn't change games. There was no secondary screen for score, level, etc, and the skin was that, no changing.</div>
<div style="text-align: justify;">
However, right on this first "sketch" (can barely even call that a "Simulator", to be fair), I've started paving the ground for what I planned. I started setting up multiple game loading, preparing custom skins, etc. With this, came version 0.2. We already had pausing, settings and customizable skins. I've also updated the game to LÖVE 0.9.1 (version 0.1 was made for 0.8.0).</div>
<div style="text-align: justify;">
After 0.2, I kept working on it. But the more things I added, the more complicated it got. Massive bugs emerged, the game became super laggy, so I paused development on it for a while. I tried updating it a few times along these two years, but other projects started taking priority, and this started falling behind.</div>
<div style="text-align: justify;">
It wasn't, however, until a couple months ago, that I decided to pick up the pieces of what I've left behind, shake off the dust, untwist the knots, and polish up what I had in order to add it to my <a href="http://hugobdesigner.blogspot.com/p/portfolio.html" target="_blank">Portfolio</a>.</div>
<div style="text-align: justify;">
</div>
<a name='more'></a><br />
<div style="text-align: justify;">
What I left behind was pretty good already: I had a working menu, two custom skins, customizable settings per game, and a decent documentation of how to make games and sets. However, bugs and lagginess was still present. I also had a lot of things I wanted to add but never had the time or motivation to do so.</div>
<div style="text-align: justify;">
I've started working on a small game called "Filler" (for now, may change it later), but I decided that, before I release that, I should finish this, since I've made a lot of progress with the project, and leaving it behind again would be a massive waste of work and time. So for a couple days I picked this up seriously, trying to clean the code, add missing features, test the heck out of it, and make sure it runs as smoothly and bug-free as possible. And that's what I've accomplished! I still have a few features I want to add here and there, but for the time being, this project is pretty much finished! It has all of the main features I wanted for it, documentation for people to create their own content, and I've also updated it to LÖVE 0.10.1!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
But now, let's go through all that's available for the general user:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;"><b>Screens:</b></span></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUQEn8jsb7lszBrZ-zLb_VmKh4-1rWkmIz1eO00-FVoOC9eStrCWK8hiv66If0k3KtWYRP3YgozEczZfIyq_GfCe5Obv9QCvjQyOwV1HjP1i6TB367leY21h2RE-v7-aLtWDto9T6TF_A/s1600/screens.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUQEn8jsb7lszBrZ-zLb_VmKh4-1rWkmIz1eO00-FVoOC9eStrCWK8hiv66If0k3KtWYRP3YgozEczZfIyq_GfCe5Obv9QCvjQyOwV1HjP1i6TB367leY21h2RE-v7-aLtWDto9T6TF_A/s320/screens.png" width="160" /></a></div>
<div style="text-align: justify;">
This is the area where the player, obviously, sees what they're interacting with. The main screen is where the game will be drawn, as well as the menu and settings screens. Any other screens are optional, and depend on the custom set you're using (not all sets may contain secondary screens, and some may contain one with completely different functions and purposes).</div>
<div style="text-align: justify;">
In the default set, we have, besides the main screen, the side screen. It provides the following information: your score, the highscore for the selected game, how many lives you have, time left, current level, current speed and progress through the level.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;">Controls:</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRI2vlf4C7H8TZ52r0aasg7x8jiZ3A4gzjz-aF_vzufvdI5tRfst0wraP27SHUfpp9cPWCYG4jeRpKcUzY6AB_C_7dVWZT5yjnbjSqV6dOY5jb_rN7M66ER6jy53RbllqXH1cAYrWbhis/s1600/controls.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRI2vlf4C7H8TZ52r0aasg7x8jiZ3A4gzjz-aF_vzufvdI5tRfst0wraP27SHUfpp9cPWCYG4jeRpKcUzY6AB_C_7dVWZT5yjnbjSqV6dOY5jb_rN7M66ER6jy53RbllqXH1cAYrWbhis/s320/controls.png" width="160" /></a></div>
<div style="text-align: justify;">
The controls are pretty straight forward: up, down, left and right for controlling your character, or whatever the game offers, a "big" button for any additional action, pause, for pausing the game, and settings, for configuring the game options, the skin options, or for leaving the game and returning to the menu.</div>
<div style="text-align: justify;">
You can use these controls both with a mouse and a keyboard, and they can be fully configurable in custom sets: you can change their position, size, and even shape, as well as add exclusive buttons, not present in the default set! You can also choose which keys trigger which button, if you desire.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;">Menu Screen:</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhICzvrSTuzd6gmmoDtIpwjdSPgYTrbT9MM4rpZ_F9RUm_bFpZwaenUwcI1s-JZBQmkMOsWXp7uPsQH8eWKwx65axzNj2Z4RAa7UlvwJSks6REnCO9eAlV9y1Z7z1K-83cWPbhTXnRiO5A/s1600/menu.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhICzvrSTuzd6gmmoDtIpwjdSPgYTrbT9MM4rpZ_F9RUm_bFpZwaenUwcI1s-JZBQmkMOsWXp7uPsQH8eWKwx65axzNj2Z4RAa7UlvwJSks6REnCO9eAlV9y1Z7z1K-83cWPbhTXnRiO5A/s320/menu.png" width="160" /></a></div>
<div style="text-align: justify;">
This is the screen you see when you first open the Simulator, or as soon as you quit a game. In it, you have a variety of options and functions. First and foremost, this is where you select your game. By default, you can choose between "Snake", "Tetris" and "3D Cube Demo", but if you've installed/created any other game, it should show up in there too. It also shows the game's creator underneath.</div>
<div style="text-align: justify;">
Then, next to the game icon, you can configure the game's speed and select a level (you can only choose levels you have unlocked already, so there is no way of "skipping ahead" in the game. Additionally, you have access to the "Settings" screen, even though it can be accessed at any given time through the "Settings" button.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;">Settings Screen:</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2g207qJJIKuZgvdwCqx8djs7La9kzYKYurTWdOmNlc_4GVsh8tiz9SIALLGTPqCDH2c0mjqvz4IEmpN1yRKf63cUYaDQC5dhycP7tzAQaw5AUFRbFXgTZ75lWkzlinU4k1FAyWUbyrCk/s1600/settings.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2g207qJJIKuZgvdwCqx8djs7La9kzYKYurTWdOmNlc_4GVsh8tiz9SIALLGTPqCDH2c0mjqvz4IEmpN1yRKf63cUYaDQC5dhycP7tzAQaw5AUFRbFXgTZ75lWkzlinU4k1FAyWUbyrCk/s320/settings.png" width="160" /></a></div>
<div style="text-align: justify;">
This is where you can change the default skin settings, as well as custom game settings (if the game supports it). You can change the skin's color by changing its rgb value, change your simulator skin, or return to the menu from within the game.</div>
<div style="text-align: justify;">
Additionally, when the game provides it, you have access to a variety of different custom settings to change the game environment. As an example, the "Snake" game provides the following settings: "Flip snake", which toggles whether or not you can turn your snake around by moving to the opposite direction it's heading, "Snake maximum size", which determines how large the snake gets before you go to the next level, "First person mode", which toggles the camera following the snake's head, and "Directional speeding", which sets speeding up when holding the directional button corresponding to where the snake is going.</div>
<div style="text-align: justify;">
However, these options are not present in other games (except for the skin customization and returning to menu), but they may contain completely different options that best fit them.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: large;">Game Screen:</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8oNIbwYBUetFo4T6cynYCljL4Ss9r5vGXVZQKqzUbq0UG0xMeSGBCA1YPYD9CeVIQ9y8tGHpdEXLlhb4QXHVFuJAEO8l3JU3_BEyhYMT9g2W_u1n2kjYiEdbMkLy5evO-fuLVAdvkkoc/s1600/2016-09-07_23-29-26.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8oNIbwYBUetFo4T6cynYCljL4Ss9r5vGXVZQKqzUbq0UG0xMeSGBCA1YPYD9CeVIQ9y8tGHpdEXLlhb4QXHVFuJAEO8l3JU3_BEyhYMT9g2W_u1n2kjYiEdbMkLy5evO-fuLVAdvkkoc/s1600/2016-09-07_23-29-26.gif" /></a></div>
<div style="text-align: justify;">
This is where the "magic" happens. The game itself, whatever it might be, is displayed in the main screen. Besides playing the game with the directional buttons plus action/big button, you can pause it at anytime with the pause button, or access the "Settings" screen with the Settings button. That way, not only can you return to the menu or change your skin settings, but also change the configurable game properties while you play it, making it easier for you to set up the best environment for yourself!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
And that's about it, guys! If you want more details on how to <i>make</i> games and/or sets, you can have a look at the Reference.lua and Sets.lua files present in the source code for this, or simply check the rest of the source and default set for a better understanding. If you still have any questions or anything to say about this, be it a bug report or a suggestion, feel free to do so via the game's <a href="https://love2d.org/forums/viewtopic.php?f=14&t=78610" target="_blank">Love2D Thread</a>. Do note that making custom screens for a set or making a game require coding, so you need at least a basic understanding of the <a href="https://www.lua.org/manual/5.1/" target="_blank">Lua</a> scripting language, as well as the <a href="https://love2d.org/" target="_blank">LÖVE Framework</a>. Additionally, you will need to check the game's Reference file for a list of available game functions, such as for drawing, detecting buttons, setting scores, lives, etc.</div>
<div style="text-align: justify;">
But that's basically it! Thank you guys for reading, and I see you in my next post!</div>
Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-5875476712979113891.post-10116120079555464702016-07-29T17:10:00.003-03:002021-03-16T08:52:33.137-03:00In-depth look at Pattern Generator<br />
<div style="text-align: justify;">
Hello again. To fulfill my last post's "promise", here I am with a blog post dedicated to my latest finished project: "Pattern Generator". You may be thinking "Hugo, how did you come up with the idea for PatGen? And why did you work so hard on it? What's the point?". To that, I reply "I dunno". Thanks for reading guys, have a good one!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Okay, but seriously now: Pattern Generator was a project I came up with back in late November, 2015. Back then, I was crazy about mazes, thanks to a huge influence from <a href="https://twitter.com/sky_makes" target="_blank">Sky</a> (check them out, they've got some amazing mazes). We made a <strike>few</strike> lot of custom mazes, and every time we wanted a new pattern we had to make it by hand. So I tried solving that issue with a program that would render maze patterns based on your preferences. And thus, Pattern Generator was born!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_F1m4KwxVpZnEfb9K6U5MJs65WKGnsO9Rc43cjbBQ3AIiMvFErW6YhLPCfh0_cCk-TVPBh3d6viXoztesFozEwkze-VIfl3UUYTH5R2JA5U6G2alBvCHLbK3P1mjHuwv_i5TTvXIrP3Q/s400/PatternGenerator.png" width="400" /></div>
<br />
<div style="text-align: justify;">
At first, it was going to be a pretty simple project, just to make maze-pattern-generating easier (mostly for myself). But then I thought "It could be used in many different cases, so why not make it decent, better suited and easier to use?". In that moment, I decided I'd make Pattern Generator a fully-fledged project, that I could put online for others to try without feeling ashamed that it's messy or slow.</div>
<br />
<a name='more'></a><br />
<div style="text-align: justify;">
The first thing I worked on was the preview/pattern generation module. It was somewhat easy, since LÖVE provides us with a tool that is just right for that: <a href="https://love2d.org/wiki/Canvas" target="_blank">Canvases</a>. The downside of that is that some old-school computers don't support them, but this program doesn't work without it.</div>
<br />
<div style="text-align: justify;">
After getting that done, I started working on the user interface. I got a small preview window, but I needed a selection menu for different patterns. I made such a selection menu before, but it was extremely hard and messy, so I coded it from scratch. It took me a good while, but after I got that up and running, I turned it into a library so other users could use it: <a href="https://love2d.org/forums/viewtopic.php?f=5&t=81031" target="_blank">HBDselector</a>.</div>
<br />
<div style="text-align: justify;">
Then came what I consider the hardest part of my code: the color selector. Instead of a regular color selector, I tried a different, original approach, by having the hue, saturation and brightness in a ring shape. This took me probably a little over a week, with the mouse selector and the rgb-hsb-hex input boxes. I do plan on releasing that as a standalone library as well, but that'll be in a further future.</div>
<br />
<div style="text-align: justify;">
A couple weeks later, I got the basic user interface set up. It only had the basic settings programmed (and only the color selector actually interactive), but that was a huge leap from the mostly-code-based version I had. After that, I slowly added the other settings and buttons, to have the program at least user-interactive.</div>
<br />
<div style="text-align: justify;">
Next up was adding custom, pattern-independent settings. It may sound easy, but instead of programming each interface, I had to write a huge algorithm to handle custom settings, because I always had user-coded patterns in mind, so I had to make them as easily programmable as possible, without requiring the user to write their own UI every time they wanted to let you turn a line on or off. Although code-wise it's a mess, it's pretty optimized and handles all sorts of options, such as booleans (on or off), numerical values, values from a list and smaller color pickers.</div>
<br />
<div style="text-align: justify;">
At that point, Pattern Generator was officially finished. I had to fix a few bugs and get it running properly before releasing, but the overall project was done. So that's it, right? The end of it. Well, not quite yet.</div>
<br />
<div style="text-align: justify;">
Months after the initial release, after working some more on my <a href="https://love2d.org/forums/viewtopic.php?f=14&t=78610" target="_blank">Minigame Simulator</a>, I decided I should put a portfolio together (which is now up and running in my <a href="http://hugobdesigner.blogspot.com/p/portfolio.html" target="_blank">Portfolio</a> page), and while looking through some old projects to update and "pretty up", I realized that PatGen could use some updates. Thus my work on it resumed.</div>
<br />
<div style="text-align: justify;">
The first thing I did was updating it to the latest version of LÖVE, so that users could look into the source code and play around with it if they wanted to. Then the first "official" update begun. In it, I made a lot of optimization, UI improvements and bugfixes. For example, a easy to understand error screen, the ability to type in numerical values, settings randomization, canvas templates and a new "Image Repeater" pattern, along a new pattern setting for loading images. I also added a "secret" log saver, which is just to help me in case a user has some problem they can't properly describe.</div>
<br />
<div style="text-align: justify;">
Then immediately after, I made my second update to it, which was mostly a "cleaning up" of the first update, to make the program as optimal and easy to manage as possible, before having it ready for my portfolio. And with that, my work on Pattern Generator was done. I may or may not update it some day, but I finally got it to a state I'm completely satisfied with. You can play around with the executable version and the source version as much as you want to, and if you want to use it to help with a project (either by generating patterns through it or by messing around with the code), feel free to!</div>
<br />
<div style="text-align: justify;">
That's pretty much what I have for the "history" of Pattern Generator. Now we'll see how to actually use it, and what you can do with it...</div>
<br />
<br />
<br />
<b><span face=""helvetica neue" , "arial" , "helvetica" , sans-serif" style="font-size: large;">Main user interface:</span></b><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEGu1dNwS-QoMy0nlfz7n-WmcRmLy99Ys5ymgsiyjLDq5cvuURZssFA5dmiFa80BClf4-nrq_kx4iaGQe5c8fukpfMEdoPTvMB1gUERFE0nb_g30bhzXezPU6IQ1AYl8-El50pjCK20kw/s1600/PatternGenerator_tut1.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEGu1dNwS-QoMy0nlfz7n-WmcRmLy99Ys5ymgsiyjLDq5cvuURZssFA5dmiFa80BClf4-nrq_kx4iaGQe5c8fukpfMEdoPTvMB1gUERFE0nb_g30bhzXezPU6IQ1AYl8-El50pjCK20kw/s400/PatternGenerator_tut1.png" width="400" /></a><br />
<div style="text-align: justify;">
This is the main area from the program. In it, you get the name of the currently-selected pattern, the pattern preview, the pattern selector and the program refresh button. The pattern name varies for each pattern, and that can be customized in user-made patterns. The preview is a small 384 x 256 pixels, just to get a good idea of the pattern itself. For a more appropriate look at the final result, you'll want to use the "Preview/Generate Image" button, which will be discussed later. On the far right is the pattern selector. In it, you can choose between built-in patterns and user-made patterns (if any).</div>
<br />
<br />
<br />
<b><span face=""helvetica neue" , "arial" , "helvetica" , sans-serif" style="font-size: large;">Main actions interface:</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZiPTZB9NDGC_O7P6C4rSalVC16hlVZEGVqi2Tn91BdfNsTK6M-RC6RuKVBFtP1Y5RcQbioNkwlxMmScD4uibxItTWrKOPVpeLTnFDJmSSTSZUQPR8A26JIhgrgAbYi8WJCFfEW-TvWy4/s1600/PatternGenerator_tut2.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZiPTZB9NDGC_O7P6C4rSalVC16hlVZEGVqi2Tn91BdfNsTK6M-RC6RuKVBFtP1Y5RcQbioNkwlxMmScD4uibxItTWrKOPVpeLTnFDJmSSTSZUQPR8A26JIhgrgAbYi8WJCFfEW-TvWy4/s400/PatternGenerator_tut2.png" width="400" /></a></div>
<div style="text-align: justify;">
This is the area you interact with after getting your pattern right. In this area we have four buttons: "Preview/Generate Image", which is where you can see how your pattern will look once you export it, as well as having the option of exporting the pattern with the preview's settings. The "Open images folder" button opens up the folder where all exported patterns go to, so you can save it elsewhere or do whatever you want with it. "Open patterns folder" opens up the folder where you can put user-made patterns if you have one. Lastly, "Reset all settings" removes all user settings from the program, that being pattern settings, canvas settings, etc. It doesn't, however, delete your custom patterns and exported images, so you don't have to worry about that.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span face=""helvetica neue" , "arial" , "helvetica" , sans-serif" style="font-size: large;">Main pattern settings:</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq0ZZWH0Panqb7QSHaOdSPjctTjbtctatrpEw0EJ5hDqU7x1GMeEM9D7qfJDaj3gwR3nZmSWTuc2QFrfjbNiqzswj9kQxcdcbFZ-AN4vClxaa04_iAkSNVphP06IENrytDmKUse5db8as/s1600/PatternGenerator_tut3.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq0ZZWH0Panqb7QSHaOdSPjctTjbtctatrpEw0EJ5hDqU7x1GMeEM9D7qfJDaj3gwR3nZmSWTuc2QFrfjbNiqzswj9kQxcdcbFZ-AN4vClxaa04_iAkSNVphP06IENrytDmKUse5db8as/s400/PatternGenerator_tut3.png" width="400" /></a></div>
<div style="text-align: justify;">
This is the part where you configure your preferences for any and all patterns, regardless of custom settings (which will be discussed later). In it, we have the following options: "Size", which defines the 'scale' of the pattern, "Color", which is the main color of your pattern, "Background", which is the color of the background of your pattern, and "Pattern's width" and "Pattern's height", which define the size (in pixels) of the final rendered image. Additionally, you can choose one of the pre-programmed canvas sizes, which can also be set manually if desired.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span face=""helvetica neue" , "arial" , "helvetica" , sans-serif" style="font-size: large;">Custom pattern settings:</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifDxop7W3fDfIY9uxr2JE08cibCZQlc1eEXYDyh5cz4ab9pmfWhyphenhyphenj9CTQzDL0XNL3K4q2hzWxOBsneB-RPf40-rtBZp32TsXZzImfuX6pYlRafOjXiyix4XWhK2fIxv0u3tKCW9WZdbgc/s1600/PatternGenerator_tut4.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifDxop7W3fDfIY9uxr2JE08cibCZQlc1eEXYDyh5cz4ab9pmfWhyphenhyphenj9CTQzDL0XNL3K4q2hzWxOBsneB-RPf40-rtBZp32TsXZzImfuX6pYlRafOjXiyix4XWhK2fIxv0u3tKCW9WZdbgc/s400/PatternGenerator_tut4.png" width="400" /></a></div>
<div style="text-align: justify;">
In this region, you can configure your preferences for each individual pattern, whenever available. These settings come in the pre-existing patterns, but are also available for user-made patterns, if implemented. These can vary in any level, with all sorts of possible settings, such as numerical values, lists, booleans (on or off), colors and images. These settings act independently of the main settings, and only apply to the selected pattern, as they were made exclusively for them.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span face=""helvetica neue" , "arial" , "helvetica" , sans-serif" style="font-size: large;">Randomization options:</span></b></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn7D0A_W-tIqBWJjucD6Y3RvCtNcZyeHT66FvATu8l3kVgzKDptsorZW_39BP9yFzCBhVPCsX6xXFekQDLwKkDrQ8QYB4cK5A0sQBDa95mmqCJj-ofs_vsRMi3ZTG896UbnWm1DUpjb-8/s1600/PatternGenerator_tut5.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn7D0A_W-tIqBWJjucD6Y3RvCtNcZyeHT66FvATu8l3kVgzKDptsorZW_39BP9yFzCBhVPCsX6xXFekQDLwKkDrQ8QYB4cK5A0sQBDa95mmqCJj-ofs_vsRMi3ZTG896UbnWm1DUpjb-8/s400/PatternGenerator_tut5.png" width="400" /></a></div>
<div style="text-align: justify;">
In this area, you can play around with the generator and let it "do your job for you". In a nutshell, it selects random patterns and settings for you to experiment, so you can see what the program does. Additionally, you can check or uncheck specific randomization settings: random patterns, random size, random colors, random canvas and random pattern settings. So, for example, if you want to change a specific pattern's look, but still export it in the same output size, uncheck "Randomize patterns" and "canvas size", but check "Randomize size", "colors" and "custom settings".</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
So this about concludes our "tour" through PatGen. Lenghty, I know, but hopefully it's thorough. If you're interested in making your own patterns and have at least a basic understanding of <a href="https://www.lua.org/manual/5.1/" target="_blank">Lua</a> and the <a href="https://love2d.org/" target="_blank">LÖVE Framework</a>, feel free to check the program's <a href="https://love2d.org/forums/viewtopic.php?f=5&t=81186" target="_blank">Love2D Thread</a> to have access to an example/tutorial file, or download the source version and dissect my confusing code. Other than that, thank you for reading, see you in the next one!</div>
Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-5875476712979113891.post-31279702430031170362016-07-04T02:27:00.001-03:002017-06-25T02:33:05.917-03:00A Big, Late Update Whoa, what just happened? Where is Hugo's blog, with its ugly textures, trippy background and sidebar cluttered with unfinished projects? Well, to answer your oddly-specific questions: it's gone. I realized it was about time I updated this blog, and made it look not only cleaner, but more professional. If I want to pursue a career that involves graphics and the internet even in the slightest (spoiler: <b><a href="http://hugobdesigner.blogspot.com/p/about.html" target="_blank">I do</a></b>), I might as well just dress up the things related to them. You know what they say, dress up for the job you want, not the one you have.<br />
For quite a long time this blog has been the same. And it's always been a trouble showing it to anyone else. But now, after a good old blogcleaning Sunday, I'm ready to get back on tracks. If you were wondering whether or not I was dead, I wasn't. While I haven't been active on this blog as much as I hoped, I was still active online (if you know <a href="https://twitter.com/HugoBDesigner" target="_blank">where to find me</a>). The reason why I haven't posted much is that I couldn't get any project that I thought was worth making a new post about, and over the last few months, all my projects have been either cancelled or just weren't finished or big enough.<br />
But that has changed, and will hopefully continue changing over the course of the next few months, as I intend to increase more and more my new <b><a href="http://hugobdesigner.blogspot.com/p/portfolio.html" target="_blank">Portfolio</a></b> with all sorts of projects, drawings, games and much more. It took me a while to realize, don't ask me why, but if I want to have any chance in the gaming market, or any market for that matter, I might as well start working more and better on my personal projects.<br />
Do not, however, misunderstand this as turning my blog into an online curriculum. This is still a personal blog with personal projects, and formalities are for the weak. I'll hopefully have more things to show to you guys in the near future. In fact, I'll make a post about my newest finished project, the <a href="https://love2d.org/forums/viewtopic.php?f=5&t=81186" target="_blank">Pattern Generator</a>, which you can also peek into through my Portfolio.<br />
<br />
But that's it for me today guys, hope to see you very soon :)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-69702174924705975192014-12-12T09:45:00.003-02:002018-11-16T02:41:35.912-02:00Making a Simple 2D Physics Engine - Part 3<style type="text/css">
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.all-copy {
-webkit-user-select: all; /* Chrome all / Safari all */
-moz-user-select: all; /* Firefox all */
-ms-user-select: all; /* IE 10+ */
user-select: all; /* Likely future */
}
</style>
<div>
Hello again, guys! I know, once again, this took a while to release, based on the release of the last part, but this time it wasn't due to having a new computer, like last time: it was delayed due to pure laziness and procrastination. So sorry about that...<br />
<br />
If you'd like to see more about the LÖVE Forums' post for this tutorial, just <b><a href="http://love2d.org/forums/viewtopic.php?f=5&t=78886" target="_blank">CLICK HERE</a></b>!<br />
<br />
Although this is the "official" last part of this series of physics tutorials, I want to make smaller, more informal tutorials for different things in a physics engine, like slopes, player movements, triggers, etc. But, without more delay, let's move on to this part of the tutorial!<br />
<b><br /></b><b>This is the part 3 of a 3-part tutorial.</b><br />
<a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine.html" style="font-weight: bold;" target="_blank">Part 1</a><b>: Collision detection/handling;</b><br />
<b><a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine-part-2.html" target="_blank">Part 2</a>: Gravity, friction, speed, masks and other global/local concepts;</b><br />
<b>> <a href="http://hugobdesigner.blogspot.com/2014/12/making-simple-2d-physics-engine-part-3.html" target="_blank">Part 3</a>: Drawing objects and optimizing your engine.</b></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
So click on "Read more" to go to the tutorial!<br />
<br />
<br />
<a name='more'></a><br />
<br />
<span style="font-size: large;"><b>Drawing your object</b></span><br />
<br />
If you're already here, that means that you've most likely set up everything you need for a physics engine, except for drawing the objects. If you're familiar with LÖVE or Lua, you've most likely figured out how to do that, but I still want to show different ways of doing this, in order to make it more efficient or more automatized. The most basic thing you can do to draw your object is by simply adding an image and positioning it wherever the object is:<br />
<br />
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> myObject<span style="color: navy">:</span>init<span style="color: navy">(</span>x<span style="color: navy">,</span> y<span style="color: navy">)</span></td>
</tr>
<tr>
<td> self.x <span style="color: navy">=</span> x</td>
</tr>
<tr>
<td> self.y <span style="color: navy">=</span> y</td>
</tr>
<tr>
<td> self.image <span style="color: navy">=</span> love.graphics.newImage<span style="color: navy">(</span><span style="color: gray">"myObject.png"</span><span style="color: navy">)</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td><span style="color: blue"><b>function</b></span> myObject<span style="color: navy">:</span>draw<span style="color: navy">()</span></td>
</tr>
<tr>
<td> love.graphics.setColor<span style="color: navy">(</span><span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">)</span></td>
</tr>
<tr>
<td> love.graphics.draw<span style="color: navy">(</span>self.image<span style="color: navy">,</span> self.x<span style="color: navy">,</span> self.y<span style="color: navy">)</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
This will make the image follow the object only, without taking into consideration the object size, the image size or the offset (if the image should be centered, for example). Even though this is ideal for most cases (you'll most likely make both the object and its texture the same size), there are some cases where you'll want the object's hitbox to be smaller than its image, or vice-versa. And, unless it is intended for you, your image will put its excesses to the bottom and right:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg147KsUbUxIBOFYcpWKVlxdq7gjzpR2wITqDat2HQdALiDsH38FrWIWk2iK9DNFF9dP71TwuYh0iNYxZ1MaeJ8F5PdSvUga3kjbQwTGRu5AtK_Bf3SZ8kF8SsYC7o1ayTeVn7vpYoSoA0/s1600/002.png" /></div>
<br />
And, in most games, this won't look good, considering that, if your game has gravity, for example, this object will appear to be inside the ground. So you'll have to make a bit of math to position you object's image better in a given hitbox area. There is no fixed rule or ideal method in this case, since it varies a lot depending on what you want, but here's a little function that you can use:<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> myObject<span style="color: navy">:</span>draw<span style="color: navy">()</span></td>
</tr>
<tr>
<td> love.graphics.setColor<span style="color: navy">(</span><span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">)</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> x <span style="color: navy">=</span> align<span style="color: navy">(</span><span style="color: gray">"center"</span><span style="color: navy">,</span> self.x<span style="color: navy">,</span> self.width<span style="color: navy">,</span> self.image<span style="color: navy">:</span>getWidth<span style="color: navy">())</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> y <span style="color: navy">=</span> align<span style="color: navy">(</span><span style="color: gray">"end"</span><span style="color: navy">,</span> self.y<span style="color: navy">,</span> self.heigh<span style="color: navy">,</span> self.image<span style="color: navy">:</span>getHeight<span style="color: navy">())</span></td>
</tr>
<tr>
<td> love.graphics.draw<span style="color: navy">(</span>self.image<span style="color: navy">,</span> x<span style="color: navy">,</span> y<span style="color: navy">)</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td><span style="color: blue"><b>function</b></span> align<span style="color: navy">(</span>mode<span style="color: navy">,</span> pos<span style="color: navy">,</span> objSize<span style="color: navy">,</span> imgSize<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> mode <span style="color: navy">=</span> mode <span style="color: blue"><b>or</b></span> <span style="color: gray">"center"</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--modes can be "start" (top or left), "center" or "end" (bottom or right)</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> mode <span style="color: navy">==</span> <span style="color: gray">"center"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> pos<span style="color: navy">+</span>objSize<span style="color: navy">/</span><span style="color: orange">2</span><span style="color: navy">-</span>imgSize<span style="color: navy">/</span><span style="color: orange">2</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>elseif</b></span> mode <span style="color: navy">==</span> <span style="color: gray">"end"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> pos<span style="color: navy">+</span>objSize<span style="color: navy">-</span>imgSize</td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span> <span style="color: darkgreen">--if it's "start" or not, it's the same</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> pos</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
The function requires 4 variables: <b>mode</b>, which tells the function what alignment you want (start, center or end); <b>pos</b>, which is the object's position (not the image position!); <b>objSize</b>, which is either the width or the height of the object, depending on what axis you want to align; and <b>imgSize</b>, which is either the width or the height of the image (again, based on the axis you're trying to align). This function will return a number, which will be used as the <b>position of the image</b>. To make it clearer, here's a diagram:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX8ZOUh_I2rU3ERvDEwbX2LAxN2lHWC0jsHbSxuiXfQ-nWq7LdxCMPmyQ0Z-SfdS9G6IUwwwahQYL834kOYiSsfAPIIbp7-wWorzntapjDi0vGTqBoa2K7pNs4BWXS_7PdcNkjHCMiGSg/s1600/004.png" /></div>
<br />
For most types of game, the 8th square (counting left-to-right, top-to-bottom) would be the most appropriate, since it centers the image only in the <b>x</b> axis, while keeping the image <b>over</b> the object's hitbox (so the image doesn't gets over the ground).<br />
<br />
Another thing you may want to do is resize the image: in case you <b>always</b> want the image to fit in its hitbox, this is what you'll have to do:<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> myObject<span style="color: navy">:</span>draw<span style="color: navy">()</span></td>
</tr>
<tr>
<td> love.graphics.setColor<span style="color: navy">(</span><span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">,</span> <span style="color: orange">255</span><span style="color: navy">)</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> scaleX <span style="color: navy">=</span> self.width<span style="color: navy">/</span>self.image<span style="color: navy">:</span>getWidth<span style="color: navy">()</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> scaleY <span style="color: navy">=</span> self.height<span style="color: navy">/</span>self.image<span style="color: navy">:</span>getHeight<span style="color: navy">()</span></td>
</tr>
<tr>
<td> love.graphics.draw<span style="color: navy">(</span>self.image<span style="color: navy">,</span> x<span style="color: navy">,</span> y<span style="color: navy">,</span> <span style="color: orange">0</span><span style="color: navy">,</span> scaleX<span style="color: navy">,</span> scaleY<span style="color: navy">)</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
In the case of scaling, at least, there's just this method. In Löve, you can scale an image based on a <b>percentage</b>, thus we need to divide the object's size by the image's size (if it's equal, it'll return <b>1</b>. If the object is smaller, it'll return a number <b>smaller than 1</b>. If bigger, a number <b>bigger than 1</b>). If your framework/coding language uses the width on it's own, instead of percentage, you can simply use the object's dimensions.<br />
<br />
For objects that are drawn often or are based off a spritesheet, I <b>highly</b> recommend using <b><a href="http://www.love2d.org/wiki/SpriteBatch" target="_blank">SpriteBatch</a></b>. It's not so hard to understand, makes your game much faster and you get the same effects. If your coding language/framework can't support them, it's okay, your code will work normally without them.<br />
<br />
<br />
The next thing I'd recommend is checking if an image is on screen and only drawing it if it is. You can use <b><a href="http://www.love2d.org/wiki/Canvas" target="_blank">canvases</a></b> to have this, but my last computer couldn't support them, so I never studied them very much. Also, if you can make your game without canvases/shaders (or making them only <b>optional</b>), it'd be a lot better for you, since a lot of people have computers that still can't support them (like I did). Another thing that you could do, though, is checking the position of the object. Let's consider your game screen to be 800x600 (the default window size in the Löve framework). Let's also consider that the camera is following the player. So, in this example, the camera is at x:200 and y:100.<br />
<br />
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> love.load<span style="color: navy">()</span></td>
</tr>
<tr>
<td> camera <span style="color: navy">={}</span></td>
</tr>
<tr>
<td> camera.width <span style="color: navy">=</span> <span style="color: orange">800</span></td>
</tr>
<tr>
<td> camera.height <span style="color: navy">=</span> <span style="color: orange">600</span></td>
</tr>
<tr>
<td> camera.x <span style="color: navy">=</span> <span style="color: orange">200</span></td>
</tr>
<tr>
<td> camera.y <span style="color: navy">=</span> <span style="color: orange">100</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
After that, it's easy to spot which objects should be drawn or not. In this case, I'm considering ONLY the object's position, so if its texture is <b>bigger than its hitbox</b>, this may not be the solution for you. It shouldn't be hard to fix it for that case, though, but it'll take a bit more of math...<br />
<br />
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_draw<span style="color: navy">()</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj1.x<span style="color: navy">+</span>obj1.width <span style="color: navy">></span> camera.x <span style="color: blue"><b>and</b></span> obj1.x <span style="color: navy"><</span> camera.x<span style="color: navy">+</span>camera.width <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj1.y<span style="color: navy">+</span>obj1.height <span style="color: navy">></span> camera.y <span style="color: blue"><b>and</b></span> obj1.y <span style="color: navy"><</span> camera.y<span style="color: navy">+</span>camera.height <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> obj1<span style="color: navy">:</span>draw<span style="color: navy">()</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
We're pretty much done with the drawing part, but here are some little hints for you:<br />
<br />
<ul>
<li>Avoid big images, as they take too much memory, and some computers can't load big images in games. If you can, make the image as small as possible, or less detailed. If not, split the image into segments and draw they all together.</li>
<li>If you want to draw an image bigger, enlarge it <b>in the program itself, not in the image file</b>!</li>
<li>Load only images you're gonna use. Loading several images and not using some just take up space.</li>
<li>While dealing with repetition (several similar tiles, for example), SpriteBatches are the best option.</li>
<li>If an image can be hidden in a certain moment, do it. Images that don't appear don't need to be drawn, right?</li>
<li>Look up for images in loops. Unless they are <b>really</b> necessary, don't draw an image more than once.</li>
<li>In some cases, you can not draw an object if it behind another one. This is a bit hard, since most times it requires some tricky coding to get, but if you have a really big objects and entities that go behind it, it is preferable that you don't draw the entity behind.</li>
</ul>
<div>
<br /></div>
<div>
Now that we've got drawing out of the way, let's move on to some things you can do to optimize the "physics" part of your engine.<br />
<br />
<br />
<span style="font-size: large;"><b>Delete unused objects</b></span><br />
<br />
May sound a little obvious, but many people have problems with it. Not that deleting objects is hard, but they sometimes overlook it and keep trying to get a source of lag that they're simply ignoring. Deleting objects is important because it gives you more memory to work with. Plus, it's always good to "clean up the trash", if you know what I mean.<br />
<br />
Sometimes, especially for entities like players or enemies or allies, you have a "dead" variable, to confirm the entity is dead and should not interact or be interacted with. But this alone won't make it not count. So a good way of getting rid of entities is on the loop you already have for entities, in your physics.lua file:<br />
<br />
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> delete <span style="color: navy">={}</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--It is always good to have a "to delete" table</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj1.dead <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: blue"><b>not</b></span> delete<span style="color: navy">[</span>m<span style="color: navy">]</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> delete<span style="color: navy">[</span>m<span style="color: navy">]={}</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--'m', in this case, is the name of the object "class".</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--So if you have a box in objects["box"], 'm' will be "box"</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>table.insert</b></span><span style="color: navy">(</span>delete<span style="color: navy">[</span>m<span style="color: navy">],</span> i<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--collision detection, gravity, speed, etc.</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>delete<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i <span style="color: navy">=</span> #v<span style="color: navy">,</span> <span style="color: orange">1</span><span style="color: navy">,-</span><span style="color: orange">1</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--What we're doing here is run a 'for' loop backwards.</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--That means we're checking it's items from the last to the first,</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--which makes deleting more efficient.</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple"><b>table.remove</b></span><span style="color: navy">(</span>objects<span style="color: navy">[</span>m<span style="color: navy">],</span> v<span style="color: navy">[</span>i<span style="color: navy">])</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<b><br /></b>
<b><br /></b>
Another good thing you can do that may be helpful is deleting entities out of the map. In the case of an entity getting outside the map's range, you can always teleport it back, but if you don't care about bringing it back, simply do the same as the code above, but instead of checking for the "dead" variable, check for the entity's position; if it's outside the map, include it in the delete table.<br />
<br />
<br />
<span style="font-size: large;"><b>Ignoring unnecessary collisions</b></span><br />
<br />
Checking several collisions every frame takes a bunch of memory: the more objects you have, the more you need to check for collisions. In some cases, though, if you have a lot of objects and, even after using masks, collision worlds or ignoring static objects you're still having lag, here's a little trick for you: ignore certain collisions. For example: if the object only collides with tiles and you, for example, but you're not even close to it, why check every tile plus you? Make it static until you've got really close - it'll have the same results, but without the whole checking thing.<br />
<br />
Another thing: if you have a tile/grid based game and don't wanna check for collisions on those hundreds of tiles around, you can only check for tiles around the player/object! There's no predefined way of doing this, since it varies for each game you make, but here's a quick way with most games:<br />
<br />
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> checkTiles<span style="color: navy">(</span>obj<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> size <span style="color: navy">=</span> <span style="color: orange">16</span> <span style="color: darkgreen">--If your grid is not 16x16, change this</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Top-left corner tile</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> p1x<span style="color: navy">,</span> p1y <span style="color: navy">=</span> <span style="color: purple"><b>math.floor</b></span><span style="color: navy">(</span>obj.x<span style="color: navy">/</span>size<span style="color: navy">)+</span><span style="color: orange">1</span><span style="color: navy">,</span> <span style="color: purple"><b>math.floor</b></span><span style="color: navy">(</span>obj.y<span style="color: navy">/</span>size<span style="color: navy">)+</span><span style="color: orange">1</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Bottom-right corner tile</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> p2x<span style="color: navy">,</span> p2y <span style="color: navy">=</span> <span style="color: purple"><b>math.floor</b></span><span style="color: navy">((</span>obj.x<span style="color: navy">+</span>obj.width<span style="color: navy">)/</span>size<span style="color: navy">)+</span><span style="color: orange">1</span><span style="color: navy">,</span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>math.floor</b></span><span style="color: navy">((</span>obj.y<span style="color: navy">+</span>obj.height<span style="color: navy">)/</span>size<span style="color: navy">)+</span><span style="color: orange">1</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--If your grid starts on tiles 1-1, add the "+1". If not, remove them.</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> x <span style="color: navy">=</span> p1x<span style="color: navy">,</span> p2x <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> y <span style="color: navy">=</span> p1y<span style="color: navy">,</span> p2y <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> checkCollision<span style="color: navy">(</span>obj<span style="color: navy">,</span> tile<span style="color: navy">[</span>x<span style="color: navy">][</span>y<span style="color: navy">])</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<b><br /></b>
In this case, you can totally ignore checking collision with tiles in the physics updates, since all the necessary tile-checking is here. Also, you'll only call this function with objects that DO collide with tiles. You may also adapt this to your code, not only in the grid size, but also in the way tiles are stored. If you don't have a "tile" table, just get the most convenient way for you to associate tiles with points in the grid.<br />
<br />
<br />
<br />
<span style="font-size: large;"><b>Conclusion</b></span><br />
<br />
I know this doesn't look like much, but there isn't really much to be done in optimizing: it <b>REALLY</b> varies on how your game was made or how things in general work. Besides the things I've already said, here are a few tips:<br />
<br />
<ul>
<li><b>Ignorance is powerful!</b> The more you can ignore objects, the faster your game will run!</li>
<li><b>Invisibility clothes!</b> If your object doesn't need to be drawn, why would it be?</li>
<li><b>Trim out the fat!</b> If deleting something doesn't affect the game, it's because it isn't needed.</li>
<li><b>The size matters!</b> If you can do smaller loops between objects, it'll save you a lot of memory!</li>
<li><b>Repetition is bad!</b> I couldn't find a good pun for this, but really: if you're making the same things in different places, make them all fit in a single one! If you need to do something for every object of a certain type, include it in the main physics loop instead of creating a new one!</li>
<li><b>Simple enough!</b> If something can be simplified or reduced without a significant quality loss, it'll be a lot better! Although quality is a common goal for every game, if you have to choose between graphical/rendering quality and gameplay quality, always choose gameplay. Players emerged in the game's mechanics or focused on the game's objectives will not care for details that were reduced or simplified!</li>
</ul>
<div>
<br /></div>
<div>
I hope you guys enjoyed this tutorial, even though it was shorter and delayed! It may not look like, but I had to put a lot of thought into this part, since optimization can sometimes be tricky (in some cases, it may even cause more lag than the unoptimized version of your game). Also, it is something very, <b>very</b> relative: it can totally work in some games and be completely useless in others.</div>
<div>
<br /></div>
<div>
Also, a little hint I've read from game-makers before: procrastinate optimization! <b>Optimization must not be your main goal!</b> You must optimize your game only after you've finished everything and, even then, only do it if it has some significant impact: if your game runs perfectly fine with a great framerate and just a little of memory usage, why even bother optimizing?</div>
<div>
<br /></div>
<div>
Remember: the key for having a successful game is <b>not</b> having the best graphics, rendering options, sounds, etc., but being <b>the most immersive and entertaining as possible!</b> You don't play Minecraft or Mari0 because of their super realistic graphics, do you?</div>
<div>
<br /></div>
<div>
For the ones that need a little help with organization, here's our little code friend:</div>
<div>
<br />
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
<tr>
<td>29 </td>
</tr>
<tr>
<td>30 </td>
</tr>
<tr>
<td>31 </td>
</tr>
<tr>
<td>32 </td>
</tr>
<tr>
<td>33 </td>
</tr>
<tr>
<td>34 </td>
</tr>
<tr>
<td>35 </td>
</tr>
<tr>
<td>36 </td>
</tr>
<tr>
<td>37 </td>
</tr>
<tr>
<td>38 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_load<span style="color: navy">()</span></td>
</tr>
<tr>
<td> gravity <span style="color: navy">=</span> <span style="color: orange">value</span></td>
</tr>
<tr>
<td> friction <span style="color: navy">=</span> <span style="color: orange">value</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> <span style="color: dodgerblue"><b>each</b></span> object <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> object <span style="color: blue"><b>is</b></span> dead <span style="color: blue"><b>or</b></span> out of the map <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>delete object</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> object <span style="color: blue"><b>is not</b></span> static <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> <span style="color: dodgerblue"><b>each</b></span> object <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> objects <span style="color: blue"><b>are</b></span> on the same mask <span style="color: blue"><b>and</b></span> on the same world</td>
</tr>
<tr>
<td> <span style="color: blue"><b>and</b></span> are <span style="color: blue"><b>not</b></span> the same object <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> objects <span style="color: blue"><b>are</b></span> colliding <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple"><b>detect collision side</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>push objects away from each other</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>apply surface friction</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>reset objects' directional speed</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple"><b>apply gravity</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>apply air friction</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple"><b>filter maximum speed value</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>convert speed to position</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div>
<b><br /></b></div>
<div>
<b><br /></b></div>
<div>
That's it for this tutorial then! Thanks a lot for reading, sorry (again) for the delay, and I see you in my next post! Keep tuned, because smaller tutorials for <b>specific</b> physics features may come anytime!<br />
Also, a small program/game related to this tutorial series is also being developed. It'll let you test how certain methods work in the action (yes, multiple ways of handling physics in a single game!). As soon as it is finished I'll make a new post, but still, keep tuned!</div>
<div>
<br /></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-large;"><b><a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine.html" target="_blank"><<PART 1</a> | <a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine-part-2.html" target="_blank"><< PART 2</a></b></span></div>
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-53354700437499890782014-10-25T01:35:00.000-02:002018-11-16T02:21:13.190-02:00Making a Simple 2D Physics Engine - Part 2<style type="text/css">
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.all-copy {
-webkit-user-select: all; /* Chrome all / Safari all */
-moz-user-select: all; /* Firefox all */
-ms-user-select: all; /* IE 10+ */
user-select: all; /* Likely future */
}
</style>
<div>
Hello again! So, right after publishing the part 1 of this three-part tutorial series, it became extremely well-received and known by people (mostly the LÖVE Forums community and the Stabyourself Forums community). In less than a week, it already became <b>the most visualized post of my whole blog!</b> This was great, and I'm really, <b>really</b>, thankful to all of your kindness. It makes me really glad that I'm helping you all! I was going to take a little more of time until the part 2 release, but seeing that people enjoyed these tutorials, I'm already working on this!<br />
<br />
As for how long it took me to release the part 2, I'm really, really sorry: I've got a new computer, so I had to transfer the tutorial's files AND install a bunch of programs. But don't worry: this won't happen to part 3...<br />
<br />
If you'd like to see more about the LÖVE Forums' post for this tutorial, just <b><a href="http://love2d.org/forums/viewtopic.php?f=5&t=78886" target="_blank">CLICK HERE</a></b>!<br />
<br />
Now, without further ado, let's get to the little details of a 2D physics engine: gravity, friction, speed, masks, collision worlds, dynamic status and other little object-specified or global variables and concepts! Since they're mostly simple to explain, I'm putting them all in this single tutorial, instead of making a single tutorial for the topic, like in part 1. Ready?<br />
<b><br /></b>
<b>This is the part 2 of a 3-part tutorial.</b><br />
<a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine.html" style="font-weight: bold;" target="_blank">Part 1</a><b>: Collision detection/handling;</b><br />
<b>> <a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine-part-2.html" target="_blank">Part 2</a>: Gravity, friction, speed, masks and other global/local concepts;</b><br />
<b><a href="http://hugobdesigner.blogspot.com/2014/12/making-simple-2d-physics-engine-part-3.html" target="_blank">Part 3</a>: Drawing objects and optimizing your engine.</b></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
So click on "Read more" to go to the tutorial!<br />
<br />
<a name='more'></a><br />
<br />
So, now that we've got objects positioning, dimensions and collisions mostly done, we should get something else that is essential to objects: movement. Even though we can create movements for objects pretty easily (as shown in an example from the first tutorial), but when it gets to multiple, independently-moving objects, things can get a bit (or a lot) messy. To make up with that, we can set up a <i>very</i> simple way of handling objects' speeds. Remember how in the last tutorial we set up a class for an object, so we could handle functions and variables very easily? Well, I didn't got deeper into that because it wasn't exactly part of the collision-handling system, but more of variable-setting and optimization.<br />
<br />
<br />
<span style="font-size: large;"><b>Setting up an object's speed</b></span><br />
<br />
Setting up functions in objects makes it so you don't need to calculate similar variables for every object, nor make it in a hard-to-understand way. In the last tutorial, I showcased my two favorite methods of easy object creation: by function call and by classes. So let's get to how we'd set the speed variables (and any other variables related to the object) inside objects like the ones shown in the last tutorial:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> newObject<span style="color: navy">(</span>x<span style="color: navy">,</span> y<span style="color: navy">,</span> width<span style="color: navy">,</span> height<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> self <span style="color: navy">=</span> <span style="color: navy">{}</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> self.x <span style="color: navy">=</span> x</td>
</tr>
<tr>
<td> self.y <span style="color: navy">=</span> y</td>
</tr>
<tr>
<td> self.width <span style="color: navy">=</span> width</td>
</tr>
<tr>
<td> self.height <span style="color: navy">=</span> height</td>
</tr>
<tr>
<td> self.image <span style="color: navy">=</span> myTexture</td>
</tr>
<tr>
<td> self.friction <span style="color: navy">=</span> <span style="color: orange">.98</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Setting up the speed's default values</span></td>
</tr>
<tr>
<td> self.speedx <span style="color: navy">=</span> <span style="color: orange">0</span></td>
</tr>
<tr>
<td> self.speedy <span style="color: navy">=</span> <span style="color: orange">0</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> self</td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
Based on the last tutorial's methods of object creation, it should still be easy to understand how to add these variables to your objects. Unless you're making an object that is already created <b>in motion</b>, all objects should start with their speeds as 0 and 0. The reason why we do this is that, this way, we already define the speed variable and can later set them without having to create them again.<br />
<br />
Setting up the speed is easy. Now we just have to make it have an influence over the object!<br />
<br />
First of all: we want to make the object move based on it's speed, so we have to understand what each speed does to the object:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI_U5lNL9Uy4UyRWSPZIjmTKIbMkxs7tiANCI1BUa0C-U5HD6S-SsdMiNhjGZzKna6SmRq-3FIPuYE2I6y8Pcfuxxw8XiIiO5vyYV22SNAIu_oIpKTRXXW3BTVw5SIbqMTCUrBImKI0vo/s1600/002.png" /></div>
<br />
Of course, you can (and you WILL) combine both speed axis to make the object move diagonally. But the speed itself won't make the object move: when we're drawing it, we're using the <b>x</b> and <b>y</b> variables, right? So, how to convert <b>speed</b> into <b>position</b>?<br />
<br />
The best way to do it is by using <b>dt</b> again. Remember it from the last tutorial? It's what we used for the <i>physics.update</i> function. In resume: if you add <b>dt</b> to a variable with the value of <b>0</b> in every update call, after one second this variable will be 1, in two seconds, 2, etc. This variable is used to keep track of time, and isn't it what speed is about? Distance moved in a certain amount of time? So, we just have to move the object for a distance <b>N</b> (which is the value described in the object's speed) for a single second. So basically you're just setting the distance for the object to travel in a single second, or <b>unities per second</b>. It may sound complicated, but it's <b>very</b>, <b>very</b> simple!<br />
<br />
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> object<span style="color: navy">:</span>update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> self.x <span style="color: navy">=</span> self.x <span style="color: navy">+</span> dt<span style="color: navy">*</span>self.speedX</td>
</tr>
<tr>
<td> self.y <span style="color: navy">=</span> self.y <span style="color: navy">+</span> dt<span style="color: navy">*</span>self.speedY</td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
See? That's all we need! You can set this on the general physics call, instead of doing it per object. This way you make your code more organized and you have less repetitive code to do!<br />
<br />
So, on your physics_update function, just set the object's position right after the collision! This is not a rule, you can still set this before, you can experiment with it and see which options suits your needs better!<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--This is the collision checking code!</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> n<span style="color: navy">,</span> w <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> j<span style="color: navy">,</span> obj2 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>w<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: blue"><b>not</b></span> <span style="color: navy">(</span>m <span style="color: navy">==</span> n <span style="color: blue"><b>and</b></span> i <span style="color: navy">==</span> j<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> sideBySide <span style="color: navy">=</span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> checkCollision<span style="color: navy">(</span>obj1<span style="color: navy">,</span> obj2<span style="color: navy">,</span> sideBySide<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">-- Detect collision direction</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--And now, since we're still checking each object, we can put the</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--speed code here instead of making an object loop twice!</span></td>
</tr>
<tr>
<td> obj1.x <span style="color: navy">=</span> obj1.x <span style="color: navy">+</span> dt<span style="color: navy">*</span>obj1.speedx</td>
</tr>
<tr>
<td> obj1.y <span style="color: navy">=</span> obj1.y <span style="color: navy">+</span> dt<span style="color: navy">*</span>obj1.speedy</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
You're mostly done with the speed, but there are some extra things you can do to improve it:<br />
<br />
<span style="font-size: large;"><b>1. Setting up a maximum speed</b></span><br />
<br />
This is something good to set up because later, when we set things like gravity, for example, speeds can grow up without control and, even though it wouldn't "break" anything within your game, it'd make objects pass straight through walls or simply go so fast that you can barely control/stop them. So having a limit speed helps you have a bit more control over your object. Plus, it doesn't become overly noticeable, so having a speed limit won't make your objects act unnaturally. Here's the simplest way of doing it:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td>maxspeed <span style="color: navy">=</span> obj1.maxspeed <span style="color: blue"><b>or</b></span> <span style="color: orange">100</span></td>
</tr>
<tr>
<td><span style="color: darkgreen">--Just an example. You can always set up custom maximum speeds within each object.</span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td>obj1.speedx <span style="color: navy">=</span> <span style="color: purple"><b>math.min</b></span><span style="color: navy">(</span> <span style="color: purple"><b>math.max</b></span><span style="color: navy">(</span>obj1.speedx<span style="color: navy">,</span> <span style="color: navy">-</span>maxspeed<span style="color: navy">),</span> maxspeed<span style="color: navy">)</span></td>
</tr>
<tr>
<td>obj1.speedy <span style="color: navy">=</span> <span style="color: purple"><b>math.min</b></span><span style="color: navy">(</span> <span style="color: purple"><b>math.max</b></span><span style="color: navy">(</span>obj1.speedy<span style="color: navy">,</span> <span style="color: navy">-</span>maxspeed<span style="color: navy">),</span> maxspeed<span style="color: navy">)</span></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
Just to clear up things: I'm doing "math.max" between the object's speed and the <b>negative</b> maximum speed (which would be the maximum speed for going backwards). When doing "math.max", we're getting the biggest value between the speed and the negative maximum speed, so if the speed is lower than the negative maximum speed it'll automatically take the negative maximum speed. As for "math.min", we're checking which one is smaller: the object's speed and the maximum speed. So, if the object's speed is bigger than the maximum speed, it'll be automatically set up to the maximum speed.<br />
<br />
In resume: it'll "filter" the object speed, so it is always smaller than the maximum speed.<br />
<br />
There's a flaw with this method, though, which is the fact that, if you're moving in the maximum speed both horizontally and vertically, your diagonal speed will be higher than the maximum speed. But a friendly user from the Löve Forums, <a href="https://love2d.org/forums/memberlist.php?mode=viewprofile&u=69" target="_blank">Ivan</a>, came up with a quick and clever solution for this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>local</b></span> d <span style="color: navy">=</span> <span style="color: purple"><b>math.sqrt</b></span><span style="color: navy">(</span>obj1.speedx<span style="color: navy">*</span>obj1.speedx <span style="color: navy">+</span> obj1.speedy<span style="color: navy">*</span>obj1.speedy<span style="color: navy">)</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>if</b></span> d <span style="color: navy">></span> maxspeed <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> n <span style="color: navy">=</span> <span style="color: orange">1</span><span style="color: navy">/</span>d <span style="color: navy">*</span> maxspeed</td>
</tr>
<tr>
<td> obj1.speedx<span style="color: navy">,</span> obj1.speedy <span style="color: navy">=</span> obj1.speedx <span style="color: navy">*</span> n<span style="color: navy">,</span> obj1.speedy <span style="color: navy">*</span> n</td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<br />
<span style="font-size: large;"><b>2. Stable delta time</b></span><br />
<br />
This snippet does not only applies to setting up the object's speed, but for any update call you may have in your code. But we'll discuss this deeper in the next tutorial. Basically: set the delta time to have a maximum value (say, 1/60, which would be like one frame of a 60fps animation).<br />
<br />
This is great because if your game somehow gets lag (or simply goes slower for some reason), your object will not "teleport" between two points. Why this happens, you may ask: when your framerate is smooth and your computer fast, your delta time will be either 1/60 or less (considering your games run on 60fps, and not 30fps). BUT, if you get lag, it'll be changed to a bigger values (sometimes even half a second, which is a lot in terms of framerate: it'd be 2 frames per second). The game does this to compensate the loss on your framerate, so you'd still get the same values as you'd have without the lag. But this makes your game flicker around, and if one object is moving smoothly, it'll make a huge "jump" in the middle of it's path. To avoid that, we can simply make the delta time have a maximum value, much like in the example above with speeds:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> dt <span style="color: navy">=</span> <span style="color: purple"><b>math.min</b></span><span style="color: navy">(</span>dt<span style="color: navy">,</span> <span style="color: orange">1</span><span style="color: navy">/</span><span style="color: orange">60</span><span style="color: navy">)</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Set up speed of the object</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
This will make the game <b>seem</b> slower in case of lag, but you'll be just making it <b>smoother</b>. The fault is still in the lag...<br />
<br />
<br />
<span style="font-size: large;"><b>3. Resetting speed on collision</b></span><br />
<br />
This is not something <b>required</b> (if you have maximum speed), but even with that it's <b>VERY</b> recommended that you reset your speed after a collision. This way, if your object have to move over a surface, it won't mess up anything. Or, if your object (the player, for example) have to jump, it doesn't affects it. Resetting speed on collision is so simple that you just need this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<style type="text/css">
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.all-copy {
-webkit-user-select: all; /* Chrome all / Safari all */
-moz-user-select: all; /* Firefox all */
-ms-user-select: all; /* IE 10+ */
user-select: all; /* Likely future */
}
</style>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> n<span style="color: navy">,</span> w <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> j<span style="color: navy">,</span> obj2 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>w<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: blue"><b>not</b></span> <span style="color: navy">(</span>m <span style="color: navy">==</span> n <span style="color: blue"><b>and</b></span> i <span style="color: navy">==</span> j<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> sideBySide <span style="color: navy">=</span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> collisionside <span style="color: navy">=</span> checkCollision<span style="color: navy">(</span>obj1<span style="color: navy">,</span> obj2<span style="color: navy">,</span> sideBySide<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> collisionside <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> collisionside <span style="color: navy">==</span> <span style="color: gray">"bottom"</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>or</b></span> collisionside <span style="color: navy">==</span> <span style="color: gray">"top"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> <span style="color: orange">0</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>elseif</b></span> collisionside <span style="color: navy">==</span> <span style="color: gray">"left"</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>or</b></span> collisionside <span style="color: navy">==</span> <span style="color: gray">"right"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.speedx <span style="color: navy">=</span> <span style="color: orange">0</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
And, if you think that you'll need to reset the second colliding object speed, you can just copy the two speed resetting line, paste it right below each and replace "obj1" with "obj2".<br />
<br />
<br />
<span style="font-size: large;"><b>Setting up gravity</b></span><br />
<br />
Now that we've got the speed done, we can jump to it's close friend: <b>gravity</b>. Doing gravity is <b>really</b> easy when you have the speed variables set up: all you need to do is add up to the object's speed Y, so, even if your object is moving up, it'll slow down and fall a little later. The good thing about gravity is that you can set it as a global variable, so you don't need to calculate it for every objects. BUT, if your game requires, you're still able to set it independently. Let's take a look at the best way of doing it:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_load<span style="color: navy">()</span></td>
</tr>
<tr>
<td> gravity <span style="color: navy">=</span> <span style="color: orange">800</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--This is one of the best values for gravity in</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--2D games, but you can always change it</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Check collision</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj1.gravity <span style="color: blue"><b>then</b></span> <span style="color: darkgreen">--In case you need custom gravity for your object</span></td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> obj1.speedy <span style="color: navy">+</span> dt<span style="color: navy">*</span>obj1.gravity</td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span> <span style="color: darkgreen">--Use default world's gravity</span></td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> obj1.speedy <span style="color: navy">+</span> dt<span style="color: navy">*</span>gravity</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Convert speed to position</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<br />
<span style="font-size: large;"><b>Setting up friction</b></span><br />
<br />
If you thought setting up gravity was hard, you may be perplex about how simple it was. That's the charm of having speed variables: they make things easier! And <b>YES</b>, it applies to friction too!<br />
<br />
You can have two types of friction, to guarantee that your object will not move endlessly through your game (unless it is set up in space).<br />
<br />
The first one: <b>air friction</b>.<br />
<br />
Setting air friction is as simple (if not simpler) as gravity:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_load<span style="color: navy">()</span></td>
</tr>
<tr>
<td> friction <span style="color: navy">=</span> <span style="color: orange">.98</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--In this method, we're gonna be multiplying the object's speed</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--by the friction, so it HAS to be a number between 0 and 1.</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Numbers bigger than 0.9 are better, because otherwise the object</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--will stop too quickly instead of progressively...</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Check collision</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Add gravity</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj1.airfriction <span style="color: blue"><b>then</b></span> <span style="color: darkgreen">--For custom air friction</span></td>
</tr>
<tr>
<td> obj1.speedx <span style="color: navy">=</span> obj1.speedx <span style="color: navy">*</span> friction</td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> obj1.speedy <span style="color: navy">*</span> friction</td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span> <span style="color: darkgreen">--Stick with world's default air friction</span></td>
</tr>
<tr>
<td> obj1.speedx <span style="color: navy">=</span> obj1.speedx <span style="color: navy">*</span> friction</td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> obj1.speedy <span style="color: navy">*</span> friction</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Convert speed to position</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
And yes: if you ever need, you can also have custom air friction <b>per object</b>. This is great if you have huge objects, so they can fall/move slightly slower, looking more realistic!<br />
<br />
<br />
<span style="font-size: large;"><b>Setting up surface friction</b></span><br />
<br />
Setting up surface friction is also very easy, but it requires a bit more of specification: unless you want to have the same friction effect for every surface, you'll have to specify what collisions have certain frictions and what collisions have others. You can set it either in the <i>physics_update</i> function or individually per object. In the next tutorial we'll talk about custom side collision functions per object, so you'll be able to set that there too. For surface friction, you'll have to calculate it inside the objects loops, so you can be sure that the objects collided to <b>later</b> set the friction effects.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
<tr>
<td>29 </td>
</tr>
<tr>
<td>30 </td>
</tr>
<tr>
<td>31 </td>
</tr>
<tr>
<td>32 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_load<span style="color: navy">()</span></td>
</tr>
<tr>
<td> surfacefriction <span style="color: navy">=</span> <span style="color: orange">.95</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Same "rules" as with air friction</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> n<span style="color: navy">,</span> w <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> j<span style="color: navy">,</span> obj2 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>w<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: blue"><b>not</b></span> <span style="color: navy">(</span>m <span style="color: navy">==</span> n <span style="color: blue"><b>and</b></span> i <span style="color: navy">==</span> j<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> sideBySide <span style="color: navy">=</span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> collisionside <span style="color: navy">=</span> checkCollision<span style="color: navy">(</span>obj1<span style="color: navy">,</span> obj2<span style="color: navy">,</span> sideBySide<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> collisionside <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj2.friction <span style="color: blue"><b>then</b></span> <span style="color: darkgreen">--For custom surface friction per object</span></td>
</tr>
<tr>
<td> obj1.speedx <span style="color: navy">=</span> obj1.speedx <span style="color: navy">*</span> obj2.friction</td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> obj1.speedy <span style="color: navy">*</span> obj2.friction</td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span> <span style="color: darkgreen">--Use default world's surface friction</span></td>
</tr>
<tr>
<td> obj1.speedx <span style="color: navy">=</span> obj1.speedx <span style="color: navy">*</span> surfacefriction</td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> obj1.speedy <span style="color: navy">*</span> surfacefriction</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
The cool thing about surface friction is that it is <b>VERY</b> flexible. For example: if you want your player to move through water, you'll most likely want it to fall a bit slower than in air, but even more slower when moving horizontally. So you can have something like this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Detect collision</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> insideWater<span style="color: navy">()</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> frictionHor <span style="color: navy">=</span> <span style="color: orange">.9</span></td>
</tr>
<tr>
<td> frictionVer <span style="color: navy">=</span> <span style="color: orange">.95</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> obj1.speedx <span style="color: navy">=</span> obj1.speedx <span style="color: navy">*</span> frictionHor</td>
</tr>
<tr>
<td> obj1.speedy <span style="color: navy">=</span> obj1.speedy <span style="color: navy">*</span> frictionVer</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<br />
<span style="font-size: large;"><b>Collision masks</b></span><br />
<br />
Differently from what people may think, collision masks are <b>very</b> easy to set up. You're probably thinking about how things related to physics are far more simple than we ever thought, and that's usually the case for most details about it. Collision masks are <b>NOT</b> required, but if you have a more advanced game where you need certain objects to collide <b>ONLY</b> with a said group of objects, or another object to collide with everything <b>BUT</b> some objects, then you'll want to add collision masks.<br />
<br />
There are several ways of doing this, you're free to look up after them on the internet (or by looking at some game's source; I really recommend looking at <b><a href="http://stabyourself.net/mari0/" target="_blank">Mari0</a></b>'s code, I learned a lot of things from there). The way I'm going to show this is the way *I* set up this, and I personally think it is much easier to understand, set up and, mostly, <b>read</b>. That's why organizing your code is important: if someone need to look up after something in a certain part of your code (maybe even you!), it'll be better if you can read it more easily. I've seen some collision masks examples almost impossible to understand, so I came up with my own method:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" height="95" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAx9_7ws7Jrzwthvd67Q6oCPa-kLWWq8LuVFjZQEbeJFrK_WISJO4oPgKBW1QuImh9eUn1Drfi0kzUIhh0W8yUcbDhoIEh3utPEKriktKnHdJQ30lDIx0lSacY8kRPaE-TKD9oYu26rH8/s1600/013.png" width="640" /></div>
<br />
<br />
You can have my method or come up with your own. Most masks I've seen only take into consideration objects to filter, never to ignore. So if you want a certain object to collide with everything <b>BUT</b> object N, you'll have to list all the objects and leave object N off.<br />
<br />
Another thing about masks that I've seen is that they're mostly not "readable": they often use "codes", or numeric values to represent objects, so you always have to check the object's id for every mask.<br />
<br />
My method not only is easier to read/reproduce, but is also very simple to put into action: since in this case we're using bidimensional tables (which means the object will have a name - for example, "box" - and an id - for example, 3), we can set up the objects names and filter them without making any id conversion!<br />
<br />
Just one thing, though: for this function (and some others ahead), I'll be using a function that's not present in the Lua source, but that I made myself. It's really small and simple, and it's really useful, so we can avoid doing "for" loops every time we need to find an entry within a table. I got inspiration from a similar function I saw in Mari0's source code, but I adapted it a bit:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> table.contains<span style="color: navy">(</span>t<span style="color: navy">,</span> e<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>t<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> v <span style="color: navy">==</span> e <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> i</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
And now to our mask-detecting function:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> checkMask<span style="color: navy">(</span>obj1<span style="color: navy">,</span> obj2<span style="color: navy">,</span> obj1name<span style="color: navy">,</span> obj2name<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> collided <span style="color: navy">=</span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj2.mask <span style="color: blue"><b>then</b></span> <span style="color: darkgreen">--Make sure the object HAVE a collision mask</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> table.contains<span style="color: navy">(</span>obj2.mask<span style="color: navy">,</span> obj1name<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj2.mask<span style="color: navy">[</span><span style="color: orange">1</span><span style="color: navy">]</span> <span style="color: navy">==</span> <span style="color: gray">"ignore"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>not</b></span> collided</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--We check the object 1 mask AFTER, so it has priority</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj1.mask <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> table.contains<span style="color: navy">(</span>obj1.mask<span style="color: navy">,</span> obj2name<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> obj1.mask<span style="color: navy">[</span><span style="color: orange">1</span><span style="color: navy">]</span> <span style="color: navy">==</span> <span style="color: gray">"ignore"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>not</b></span> collided</td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
From that, we can <b>very easily</b> add this to our physics_update function!<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> n<span style="color: navy">,</span> w <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> j<span style="color: navy">,</span> obj2 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>w<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> checkMask<span style="color: navy">(</span>obj1<span style="color: navy">,</span> obj2<span style="color: navy">,</span> m<span style="color: navy">,</span> n<span style="color: navy">)</span> <span style="color: blue"><b>and</b></span> <span style="color: blue"><b>not</b></span> <span style="color: navy">(</span>i <span style="color: navy">==</span> j <span style="color: blue"><b>and</b></span> m <span style="color: navy">==</span> n<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Check collision</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
And that's all you'll need for masks. Wasn't hard to understand, was it?<br />
<br />
<br />
<span style="font-size: large;"><b>Collision worlds</b></span><br />
<br />
Collision worlds are a part of physics in games that is rarely used. Unless you have a big game with several things happening at the same time or if your game involves multiple layers that shouldn't interact with each other, you will not need this. But, since I'm here to show you what you can do, I decided I should also explain collision worlds.<br />
<br />
Collision worlds are, on it's root, wider masks. They're used for when you have the same types of objects splitted in several layers, dimensions or worlds. This way, you can have the same objects colliding as they would (using masks) in two different spaces, in a way that you don't need to make several copies of objects to get new masks and that they don't interfere with each other unless you force it to happen.<br />
<br />
The way I came up with it was also pretty simple: you "create" worlds by simply adding them to a certain object: you can have strings, numbers or even a table, for having objects that affect two or more worlds at the same time.<br />
<br />
Those are types of worlds you can have:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td>self.world <span style="color: navy">=</span> <span style="color: orange">1</span></td>
</tr>
<tr>
<td>self.world <span style="color: navy">=</span> <span style="color: orange">54</span></td>
</tr>
<tr>
<td>self.world <span style="color: navy">=</span> <span style="color: gray">"front layer"</span></td>
</tr>
<tr>
<td>self.world <span style="color: navy">=</span> <span style="color: gray">"back layer"</span></td>
</tr>
<tr>
<td>self.world <span style="color: navy">=</span> <span style="color: navy">{</span><span style="color: orange">23</span><span style="color: navy">,</span> <span style="color: gray">"front layer"</span><span style="color: navy">}</span></td>
</tr>
<tr>
<td>self.world <span style="color: navy">=</span> <span style="color: navy">{</span><span style="color: gray">"front layer"</span><span style="color: navy">,</span> <span style="color: gray">"back layer"</span><span style="color: navy">,</span> <span style="color: orange">1</span><span style="color: navy">,</span> <span style="color: orange">23</span><span style="color: navy">,</span> <span style="color: orange">54</span><span style="color: navy">}</span></td>
</tr>
</table>
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<b><br /></b>
But, even though they're not often used, collision worlds are not hard to understand: just think of them as a "large mask" that contains several of our already in-use masks. They're very easy to set up (just a single variable per object) and they're also very simple to be detected!<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
<tr>
<td>29 </td>
</tr>
<tr>
<td>30 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> detectWorlds<span style="color: navy">(</span>obj1<span style="color: navy">,</span> obj2<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> w1 <span style="color: navy">=</span> obj1.world <span style="color: blue"><b>or</b></span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> w2 <span style="color: navy">=</span> obj2.world <span style="color: blue"><b>or</b></span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>local</b></span> collided <span style="color: navy">=</span> <span style="color: blue"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: dodgerblue"><b>type</b></span><span style="color: navy">(</span>w1<span style="color: navy">)</span> <span style="color: navy">==</span> <span style="color: gray">"table"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: dodgerblue"><b>type</b></span><span style="color: navy">(</span>w2<span style="color: navy">)</span> <span style="color: navy">==</span> <span style="color: gray">"table"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>w1<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> table.contains<span style="color: navy">(</span>w2<span style="color: navy">,</span> v<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>break</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> table.contains<span style="color: navy">(</span>w1<span style="color: navy">,</span> w2<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: dodgerblue"><b>type</b></span><span style="color: navy">(</span>w2<span style="color: navy">)</span> <span style="color: navy">==</span> <span style="color: gray">"table"</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> table.contains<span style="color: navy">(</span>w2<span style="color: navy">,</span> w1<span style="color: navy">)</span> <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>elseif</b></span> w1 <span style="color: navy">==</span> w2 <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy">=</span> <span style="color: blue"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
It may look a bit complicated, but it isn't: if it weren't by checking similarities between tables (in case you want an object to affect two or more worlds), this code would be even smaller and simpler! I'm just giving you the keys, so you can mold it in your game however you feel like! Now you just need to add this to the object elimination process, like you did with the masks!<br />
<br />
<br />
<span style="font-size: large;"><b>Static objects</b></span><br />
<br />
Making static objects is easier than you might think. Just like most object-related behaviors, all you'll need is a simple, single variable. After you added it, you just need to check, in your collision loop code, if the object you're looking at is static. If it is, you can ignore it while applying gravity, friction, speed, etc. Furthermore, if you already want to make your game run faster, you can simply <b>ignore them completely</b>! That's right, to make static objects work, just make the game pretend they're not there. This way, you won't calculate speed/friction/gravity by default, but you'll also not check collision detection. That's okay in this case, because, since a collision happens between <b>2 objects</b>, if one doesn't answers it, the other will!<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> m<span style="color: navy">,</span> v <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> i<span style="color: navy">,</span> obj1 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>v<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> <span style="color: blue"><b>not</b></span> obj1.static <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> n<span style="color: navy">,</span> w <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>objects<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> j<span style="color: navy">,</span> obj2 <span style="color: blue"><b>in</b></span> <span style="color: dodgerblue"><b>pairs</b></span><span style="color: navy">(</span>w<span style="color: navy">)</span> <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen">--Check collision, set speed, apply gravity, etc.</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<br />
<span style="font-size: large;"><b>Conclusion</b></span><br />
<br />
Once again, if you want to organize yourself a bit more, here's what your code should look like, more or less:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-style: dashed; border-width: 2px;border-color: #AAA;font-size: 12px">
<tr>
<td>
<table style="background-color: #d6d5c5; text-align: right !important; font-family: monospace" class="noselect">
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
<tr>
<td>29 </td>
</tr>
<tr>
<td>30 </td>
</tr>
<tr>
<td>31 </td>
</tr>
<tr>
<td>32 </td>
</tr>
<tr>
<td>33 </td>
</tr>
<tr>
<td>34 </td>
</tr>
</table>
</td>
<td>
<table style="background: #f6f7f9; font-family: monospace" class="all-copy">
<tr>
<td><span style="color: blue"><b>function</b></span> physics_load<span style="color: navy">()</span></td>
</tr>
<tr>
<td> gravity <span style="color: navy">=</span> <span style="color: orange">value</span></td>
</tr>
<tr>
<td> friction <span style="color: navy">=</span> <span style="color: orange">value</span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><br/></td>
</tr>
<tr>
<td><span style="color: blue"><b>function</b></span> physics_update<span style="color: navy">(</span>dt<span style="color: navy">)</span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> <span style="color: dodgerblue"><b>each</b></span> object <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> object <span style="color: blue"><b>is not</b></span> static <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>for</b></span> <span style="color: dodgerblue"><b>print</b></span> object <span style="color: blue"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> objects <span style="color: blue"><b>are</b></span> on the same mask <span style="color: blue"><b>and</b></span> on the same world</td>
</tr>
<tr>
<td> <span style="color: blue"><b>and are not</b></span> the same object <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>if</b></span> objects <span style="color: blue"><b>are</b></span> colliding <span style="color: blue"><b>then</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple"><b>detect collision side</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>push objects away from each other</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>apply surface friction</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>reset objects' directional speed</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple"><b>apply gravity</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>apply air friction</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple"><b>filter maximum speed value</b></span></td>
</tr>
<tr>
<td> <span style="color: purple"><b>convert speed to position</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue"><b>end</b></span></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<br />
<br />
This was all there was for this tutorial, guys! I'm sorry that it took so long for me to release it, but, since I got a new computer, I had to set things up, transfer files from the old computer to this one (including the tutorial files), install programs again (including Notepad++ and Paint.NET, which I use in my tutorials) and a lot of other little tweaks. But don't worry: the next tutorial will come way faster!<br />
<br />
Thank you all for reading and thank you <b>so much</b> for your feedback and compliments on the last tutorial, I really appreciate it! I hope I could help you! If you've got any doubt, suggestion, comment, criticism or question, please let me know in the comments of this post or in the LÖVE forums (link at the top of this post). And I see you guys in my next post!<br />
<br />
<div style="text-align: center;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-large;"><b><a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine.html" target="_blank"><< PART 1</a> | <a href="http://hugobdesigner.blogspot.com/2014/12/making-simple-2d-physics-engine-part-3.html" target="_blank">PART 3 >></a></b></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-85900830419212022462014-10-23T04:45:00.000-02:002016-07-04T00:24:45.312-03:00Making YouTube videos!Hello again, guys! So, as the title says, I'm making YouTube videos again! Again, because a few years ago I started making videos, but they were terrible, so I deleted them all. Now I'm starting over, but with a lot more of quality and work! My videos are in HD and I try not to make them too long. I'll be making gameplay videos the most, but you'll see some game development, map-making and other things too!<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='480' height='315' src='https://www.youtube.com/embed/qfbXxgYLneE?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<br />
<br />
As for people looking up for my physics tutorials, a little announcement: they're a little delayed due to the fact that I got a new computer, so I had to set things up, transfer files from the old computer, install the programs I use, etc. But the newest tutorial is already being worked on, and I already have everything I need to make it, so you don't need to worry about that.<br />
<br />
That's all for today, I see you guys in my next post!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-14801792400689106682014-10-10T10:11:00.000-03:002014-10-10T10:11:36.528-03:00A few important notes...Hello, everyone! I know it's been a while since I post anything, so I decided to take a time to explain some things. This talk involves mostly (and most likely <i>only</i>) <b>Mari0 +Portal</b>, <b>LinkIt!</b> and <b>SpinRobot</b>.<br />
<br />
First, and most important: <b>Mari0 +Portal</b>. If you "follow" me or my blog on the Stabyourself Forums, you pretty much know what happened, but if not, here it is: I stopped working on it. I have a few reasons to have stopped working on it, but here are the main ones: I'm busy with bigger projects coming soon, the mod wasn't getting much attention, and Mari0 mods in general are getting slowly ignored, since Mari0:SE beta was released.<br />
I still finished the newest version of the mod (more or less) to have it more bug-free (as I said I would do in the newest version), so now, <b>FINNALY</b>, <b>OFFICIALLY Mari0 +Portal 1.0 is out!!!</b> I know it doesn't have as much things as I wanted it to have in it's 1.0 update, but I've got, at least, everything I've posted about in our glorious <b>12 editions of "Quick Update of Mari0 +Portal"</b>, which was always nice for me to do. Even though the mod is considered finished, I don't want it to just be dropped "as is". I still have small details to polish and new features to be explained in the mod's thread, but other than that (and a few eventual bug fixes here and there), this is it for Mari0 +Portal. No, not Mari0 +Portal, but <b>Mari0:HEC (HugoBDesigner's Entities and Customization)</b>. Yes, I already wanted to change the mod's name, so this is the perfect opportunity, right? I mean, technically, it's the <i>very last</i> opportunity, so why not?<br />
So, I say thanks to all of you who supported me throughout the development of this mod. It was amazing this whole time, and I really appreciate everyone who helped me (like Qcode, Automatik and Alesan) and everyone who simply downloaded, played, made mappacks or commented about this mod. It was great from the start to the end!<br />
<br />
Now to the long forgotten game: <b>LinkIt!</b>. Do you remember it, right? No? Well, that's okay. No one would remember it anyways. It was meant to be my first game (I wanted <b>SpinRobot</b> to be, but it will <i>still</i> take a while, so I made this in the meantime). It was supposed to be a clone of those dot-connecting games, like Flux. The problem with this game is: it was too generic, there were already tons of similar games out there, and no one really would give much attention to it. So, a long time ago, I gave up of it and stopped working on it, but never announced it, so now it is official: it's dead forever.<br />
<br />
If you know be a little (or a lot), you know that I have this old project waiting for a very long time, called <b>SpinRobot</b>. Do you remember one of my latest posts, in which I mentioned making a game but didn't reveal it's name? Well, if you looked at the "My Games" section of my blog, you probably have seen it. Well, <b>SpinRobot</b> is an ambitious project of a 2D platformer game I have for a <i>veeeery</i> long time now. In fact, it is the project I have to be my <b>very first official game</b>! I want it to be very polished, well-detailed and have a ton of features. The game will have a main campaign and custom user-made DLC. Yes, you'll be able to do your own things in this game!<br />
But... what is this game about anyway? Well, I don't want to reveal much, but it is going to be a platformer game with several worlds (and several levels in each world), and each world will have a different theme and gameplay. Some worlds will be more focused on platformer-like gameplay, others will be more around puzzles, others action, exploration, escape, etc. It will have several things in a single game! It'll also contain a <b style="font-style: italic;">really super cool 1.0 master-blaster level editor</b>! No, not just a simple editor, it'll have a <b>LOT</b> of things for you to work with!<br />
My first idea for this game was of selling it, but, since it is my very first game, I decided to make it free, so anyone can know me a little better before I decide to sell anything.<br />
This game will have an impeccable quality! Do you know that game, called <b><a href="http://www.concernedjoe.com/" target="_blank">Concerned Joe</a></b>? Well, that is made in Love2D, just like mine, but you can see that the quality of that game is incredible, right? Well, I'm aiming for a pretty similar level of quality! But don't worry: just the amount of work put on it and the quality level will be similar. The gameplay is waaaay different.<br />
<br />
I think I covered everything important that I didn't talk about in a while. Thanks for reading, and I see you guys in the next post!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-90510145043189730762014-10-08T16:01:00.000-03:002019-09-01T15:25:26.358-03:00Making a Simple 2D Physics Engine - Part 1<style type="text/css">
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.all-copy {
-webkit-user-select: all; /* Chrome all / Safari all */
-moz-user-select: all; /* Firefox all */
-ms-user-select: all; /* IE 10+ */
user-select: all; /* Likely future */
}
</style>
Hello again! I've seen a few physics engine (mostly with the framework I work with, <a href="http://love2d.org/" target="_blank">Love2D</a>). I always thought they were complicated and too confusing for someone like me trying to venture out and make something similar. Turns out I decided to participate in the <a href="http://itch.io/jam/love-jam-2" target="_blank">Love-Jam #2</a>, a competition where you have a very limited time to make a game based on a given theme. This Jam's theme was "FUSION", and I had a more or less general idea of what I wanted to make.<br />
<div>
The problem is that, even though I was allowed to use open-source, free libraries to use with it (I could simply download a physics simulating library and do the rest of the game), I decided I should give it a try and have something 100% mine.</div>
<div>
<br />
If you'd like to see more about the LÖVE Forums' post for this tutorial, just <b><a href="http://love2d.org/forums/viewtopic.php?f=5&t=78886" target="_blank">CLICK HERE</a></b>!<br />
<br /></div>
<div>
In this post, I want to help (however I can) you guys making (or at least understanding) how a *SIMPLE* 2D physics engine works. Hopefully, you'll also be less "afraid" of trying it, when you see that, even though it requires a bit of math and computer logic, it's not as hard as it looks.<br />
<br />
<b>This is the part 1 of a 3-part tutorial.</b><br />
<b>> </b><a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine.html" style="font-weight: bold;" target="_blank">Part 1</a><b>: Collision detection/handling;</b><br />
<b><a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine-part-2.html" target="_blank">Part 2</a>: Gravity, friction, speed, masks and other global/local concepts;</b><br />
<b><a href="http://hugobdesigner.blogspot.com/2014/12/making-simple-2d-physics-engine-part-3.html" target="_blank">Part 3</a>: Drawing objects and optimizing your engine.</b></div>
<div>
<br /></div>
<div>
So click on "Read more" to go to the tutorial!</div>
<div>
<br />
<a name='more'></a></div>
<div>
<br />
I'll try to make this "cross-coding language". That means that, even though I use Lua scripting, I'll explain it in a way that you can reproduce it very easily on most other languages.</div>
<div>
<br />
<br /></div>
<div>
The VERY first step is having objects. Lua is not exactly made for object-oriented scripts, but for our luck they made it so you can very simply implement objects. You can either use a class function ("converts" tables into objects) or simply use tables alone.<br />
<br />
There are two major ways of having objects tables, but you surely can make it your own way, as long as you can understand it and call it again later.<br />
<br />
<br />
<span style="font-size: large;"><b>Objects Table: Method 1</b></span><br />
<span style="font-size: large;"><b> - Unidimensional table</b></span><br />
<br />
The first one is a simple, single table:<br />
<br />
<div class="separator" style="clear: both;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td>objects <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"player"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"enemy"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: orange;">1</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td><span style="color: purple;"><b>table.insert</b></span><span style="color: navy;">(</span> objects<span style="color: navy;">,</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">,</span> value<span style="color: navy;">)</span> <span style="color: navy;">)</span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="separator" style="clear: both;">
<br /></div>
<br />
As you see, you can either have named objects or numbered objects. The way we're going to make the checking analyzes both strings and numbers on a table. This also keeps the table simple and the collision checking cleaner and slightly faster.<br />
<br />
<span style="font-size: large;"><b>Objects Table: Method 2</b></span><br />
<span style="font-size: large;"><b> - Bidimensional table</b></span><br />
<br />
This method is a little more organized, and personally my favorite...<br />
<br />
<div class="separator" style="clear: both;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td>objects <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"players"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td><span style="color: purple;"><b>table.insert</b></span><span style="color: navy;">(</span> objects<span style="color: navy;">[</span><span style="color: grey;">"player"</span><span style="color: navy;">],</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span> <span style="color: navy;">)</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"boxes"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">),</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span> <span style="color: navy;">}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"enemies"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"enemies"</span><span style="color: navy;">][</span><span style="color: grey;">"spike"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"enemies"</span><span style="color: navy;">][</span><span style="color: grey;">"cannon"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"animals"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"animals"</span><span style="color: navy;">][</span><span style="color: orange;">1</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> newObject<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">,</span> width<span style="color: navy;">,</span> height<span style="color: navy;">)</span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
In this case, we can have a little more organization, since similar objects can be stored together. So, if you want to have several objects in the same level/map/world that have the same basic configurations, you'll find this method more organized. Just like method 1, this one allows for either strings or numbers in the table's organization...<br />
<br />
Now, you'll probably want to make objects creation easier. If you're gonna make several similar objects, you'll probably not want to make this:<br />
<br />
<div class="separator" style="clear: both;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td>objects <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">][</span><span style="color: orange;">1</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{</span>x <span style="color: navy;">=</span> <span style="color: orange;">20</span><span style="color: navy;">,</span> y <span style="color: navy;">=</span> <span style="color: orange;">30</span><span style="color: navy;">,</span> width <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span> height <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span></td>
</tr>
<tr>
<td> image <span style="color: navy;">=</span> myTexture<span style="color: navy;">,</span> friction <span style="color: navy;">=</span> <span style="color: orange;">.98</span><span style="color: navy;">}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">][</span><span style="color: orange;">2</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{</span>x <span style="color: navy;">=</span> <span style="color: orange;">50</span><span style="color: navy;">,</span> y <span style="color: navy;">=</span> <span style="color: orange;">40</span><span style="color: navy;">,</span> width <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span> height <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span></td>
</tr>
<tr>
<td> image <span style="color: navy;">=</span> myTexture<span style="color: navy;">,</span> friction <span style="color: navy;">=</span> <span style="color: orange;">.98</span><span style="color: navy;">}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">][</span><span style="color: orange;">3</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{</span>x <span style="color: navy;">=</span> <span style="color: orange;">40</span><span style="color: navy;">,</span> y <span style="color: navy;">=</span> <span style="color: orange;">30</span><span style="color: navy;">,</span> width <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span> height <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span></td>
</tr>
<tr>
<td> image <span style="color: navy;">=</span> myTexture<span style="color: navy;">,</span> friction <span style="color: navy;">=</span> <span style="color: orange;">.98</span><span style="color: navy;">}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">][</span><span style="color: orange;">4</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{</span>x <span style="color: navy;">=</span> <span style="color: orange;">70</span><span style="color: navy;">,</span> y <span style="color: navy;">=</span> <span style="color: orange;">80</span><span style="color: navy;">,</span> width <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span> height <span style="color: navy;">=</span> <span style="color: orange;">10</span><span style="color: navy;">,</span></td>
</tr>
<tr>
<td> image <span style="color: navy;">=</span> myTexture<span style="color: navy;">,</span> friction <span style="color: navy;">=</span> <span style="color: orange;">.98</span><span style="color: navy;">}</span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="separator" style="clear: both;">
<br /></div>
<br />
So you'll most likely want to make a function (or more than one, in case you're doing more advanced and specific objects):<br />
<br />
<div class="separator" style="clear: both;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td>objects <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td>objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">]</span> <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td><span style="color: purple;"><b>table.insert</b></span><span style="color: navy;">(</span> objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">],</span> newBox<span style="color: navy;">(</span><span style="color: orange;">20</span><span style="color: navy;">,</span> <span style="color: orange;">30</span><span style="color: navy;">)</span> <span style="color: navy;">)</span></td>
</tr>
<tr>
<td><span style="color: purple;"><b>table.insert</b></span><span style="color: navy;">(</span> objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">],</span> newBox<span style="color: navy;">(</span><span style="color: orange;">50</span><span style="color: navy;">,</span> <span style="color: orange;">40</span><span style="color: navy;">)</span> <span style="color: navy;">)</span></td>
</tr>
<tr>
<td><span style="color: purple;"><b>table.insert</b></span><span style="color: navy;">(</span> objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">],</span> newBox<span style="color: navy;">(</span><span style="color: orange;">40</span><span style="color: navy;">,</span> <span style="color: orange;">30</span><span style="color: navy;">)</span> <span style="color: navy;">)</span></td>
</tr>
<tr>
<td><span style="color: purple;"><b>table.insert</b></span><span style="color: navy;">(</span> objects<span style="color: navy;">[</span><span style="color: grey;">"box"</span><span style="color: navy;">],</span> newBox<span style="color: navy;">(</span><span style="color: orange;">70</span><span style="color: navy;">,</span> <span style="color: orange;">80</span><span style="color: navy;">)</span> <span style="color: navy;">)</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><span style="color: blue;"><b>function</b></span> newBox<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> self <span style="color: navy;">=</span> <span style="color: navy;">{}</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> self.x <span style="color: navy;">=</span> x</td>
</tr>
<tr>
<td> self.y <span style="color: navy;">=</span> y</td>
</tr>
<tr>
<td> self.width <span style="color: navy;">=</span> <span style="color: orange;">10</span></td>
</tr>
<tr>
<td> self.height <span style="color: navy;">=</span> <span style="color: orange;">10</span></td>
</tr>
<tr>
<td> self.image <span style="color: navy;">=</span> myTexture</td>
</tr>
<tr>
<td> self.friction <span style="color: navy;">=</span> <span style="color: orange;">.98</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> self</td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
You can also use a class function, which makes object creation even easier, so you can have an entire file dedicated to an specific object and have it all set up and organized in a simpler way. My favorite class function is <a href="http://www.love2d.org/wiki/Simple_Educative_Class_System" target="_blank">Bart van Strien's Simple Educative Class System</a>.<br />
<br />
This allow for even more sophisticated object loading/controlling:<br />
<br />
<div class="separator" style="clear: both;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td>box <span style="color: navy;">=</span> class<span style="color: navy;">:</span>new<span style="color: navy;">()</span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><span style="color: blue;"><b>function</b></span> box<span style="color: navy;">:</span>init<span style="color: navy;">(</span>x<span style="color: navy;">,</span> y<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> self.x <span style="color: navy;">=</span> x</td>
</tr>
<tr>
<td> self.y <span style="color: navy;">=</span> y</td>
</tr>
<tr>
<td> self.width <span style="color: navy;">=</span> <span style="color: orange;">10</span></td>
</tr>
<tr>
<td> self.height <span style="color: navy;">=</span> <span style="color: orange;">10</span></td>
</tr>
<tr>
<td> self.image <span style="color: navy;">=</span> myTexture</td>
</tr>
<tr>
<td> self.friction <span style="color: navy;">=</span> <span style="color: orange;">.98</span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><span style="color: blue;"><b>function</b></span> box<span style="color: navy;">:</span>update<span style="color: navy;">(</span>dt<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> self.x <span style="color: navy;">=</span> self.x<span style="color: navy;">+</span>dt<span style="color: navy;">*</span><span style="color: orange;">5</span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><span style="color: blue;"><b>function</b></span> box<span style="color: navy;">:</span>draw<span style="color: navy;">()</span></td>
</tr>
<tr>
<td> love.graphics.rectangle<span style="color: navy;">(</span><span style="color: grey;">"fill"</span><span style="color: navy;">,</span> self.x<span style="color: navy;">,</span> self.y<span style="color: navy;">,</span> self.width<span style="color: navy;">,</span> self.height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="separator" style="clear: both;">
<br /></div>
<br />
If you add a code that draws objects, you'll end up with something more or less like this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8RBSctSdocPM4rHx7Fi7cgPvJWOhEHB0eN4hrt4uSlgaTbosV-eJTR7-WR6UQLklylwbSVWI9ScakSq1lRu5NMk6RAlTOneoqvhZNVu6hXXHDfkmd07UPu2HP3dBMBFH0pDrcIFxWgtM/s1600/005.png" /></div>
<br />
I'll explain later how to draw objects, this is just for demonstration purposes.<br />
<br />
You already have your objects organized and "stored". You can already add in some extra data to them (in most cases, we'll have standard, default values, but we'll still be able to customize them per object). For example: gravity, friction, air friction, maximum speed, collision mask, physics world, active, static, etc. Things like weight or rotation or inertia won't be considered here, since this tutorial is just for <b>simple</b> physics games.<br />
<br />
Moving on: we should already set up our physics file, so we can have everything organized. You'll need two physics functions: <i>load</i> and <i>update</i>. If you're using Love2D, like me, the update function will be called with a <a href="http://en.wikipedia.org/wiki/Delta_timing" target="_blank">delta time</a> variable, which makes things A LOT more easy (in resume, delta time (or dt) is the time passed between each frame, based on your game's framerate). If your game framework don't have this, you can set this up on a loop. You should have something like this now:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> physics_load<span style="color: navy;">()</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--this is where you'll load the default variables</span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><span style="color: blue;"><b>function</b></span> physics_update<span style="color: navy;">(</span>dt<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--this is where collisions will be detected</span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
The ideal is to have this in an independent file, so you don't get lost nor have problems organizing your code.<br />
<br />
You can already set up default variables, but let's first get to the most basic thing we should do right now: <b>detect collisions</b>. For now, we'll only detect them, but not handle effects after collisions.<br />
<br />
There are several ways of detecting collisions, and you can search for them on Google, if you feel like it, but in this case I'll showcase the way <b>I</b> came up with.<br />
<br />
<br />
<span style="font-size: large;"><b>Collision Checking: Method 1</b></span><br />
<span style="font-size: large;"><b> - Matching corners</b></span><br />
<br />
First of all, I made a function to detect when something is inside a given area. So this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> x1 <span style="color: navy;">>=</span> x2 <span style="color: blue;"><b>and</b></span> x1<span style="color: navy;">+</span>w1 <span style="color: navy;"><</span> x2<span style="color: navy;">+</span>w2 <span style="color: blue;"><b>and</b></span> y1 <span style="color: navy;">>=</span> y2 <span style="color: blue;"><b>and</b></span> y1<span style="color: navy;">+</span>h1 <span style="color: navy;"><</span> y2<span style="color: navy;">+</span>h2 <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
Will, in the future, result in this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhseZ8pmJQxbYEB2wZ6hIkb-k0lUMlplL17NJMrXvaCt1Tyw-DH_TAg058Iai0spp8e-mgey6ugvaDp5XzeNn9ExCeYQ8GjArbCzmSb5ih6M8yBrRsRJjEW1XnNT5JFIx9yX5zJC_1bJkY/s1600/008.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: xx-small;">I can't believe I wrote a program just to draw this...</span></div>
<br />
This is not ideal to detect when two objects collide, but in the way I set this up it'll be just right.<br />
The way I set up this: in the object you're checking, you will see if any of it's four corners is inside the other object:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh08r1SnCCvux8_zVI-qybZi4Kcz3krymU5XW9F6AdvqEAGNSLBIe0821Dwjq5f1L50-t2JGwU6Na9aKooiSR-V_9FKNslt1eptdJHogteN3_vQ_WxOjJSfjhSso0jMiQNrv7fFZStn73I/s1600/009.png" width="200" /></div>
<br />
And the code for it:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> checkCollision<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">+</span>w1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">+</span>h1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">+</span>w1<span style="color: navy;">,</span> y1<span style="color: navy;">+</span>h1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
The good thing about this method is that it'll <b>always</b> work, right? <b>NO!</b> I just realized (literally, while making this tutorial) that, if the object you're checking is BIGGER than the other object, a point may not match:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2PbcFRYzZiZnHozmMUkmaXd17A0HT6o-EhmnjWax5mZcAPSV9GjakLNy9rnhIsjTrU1fh7e4V8yrrkPO222IV6NCXGizVlq1zBK18a6Npq98X7e-vCOFojUtLz94gN375QLtwRuhCJaY/s1600/011.png" width="200" /></div>
<br />
In most cases, this will be fixed in the other object collision checking. In <b>my</b> case, specifically, I'm not checking the second object's collision because it is <b>static</b> (in order to optimize my code and reduce lag, I removed collision checking for static objects). To fix that, I quickly made this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> checkCollision<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span> <span style="color: blue;"><b>or</b></span> inside<span style="color: navy;">(</span>x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">+</span>w1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>or</b></span> inside<span style="color: navy;">(</span>x2<span style="color: navy;">+</span>w2<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">+</span>h1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>or</b></span> inside<span style="color: navy;">(</span>x2<span style="color: navy;">,</span> y2<span style="color: navy;">+</span>h2<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> inside<span style="color: navy;">(</span>x1<span style="color: navy;">+</span>w1<span style="color: navy;">,</span> y1<span style="color: navy;">+</span>h1<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>or</b></span> inside<span style="color: navy;">(</span>x2<span style="color: navy;">+</span>w2<span style="color: navy;">,</span> y2<span style="color: navy;">+</span>h2<span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> <span style="color: orange;">0</span><span style="color: navy;">,</span> x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
What I did there was checking if the <b>second</b> object have any points inside the first, no matter if it is static or not. This works pretty well with the example above:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgS3fzuFIL1YbpfFXTXQvrs5m0TyqfyXGZQQZmbY0tmZUnCv43ksk_YMOSPDTQil60fN7Rx7clpedAmBZWxlRsP2Chq5I3eER95wKkR1z_XneX_pOSsxOCz9U5Of0Ii9SAnV3ImhKQ4EE/s1600/013.png" width="200" /></div>
<br />
But then I realized (still while making this tutorial; we're learning together!): there's still one last problem related to this method: a complete lack of points intersections:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho3WPpiup5yVW6spEh4vnrOFFs6DfqIGfotccCkVbj30GBmbtBv4XYqNL4DOQWzCnbQFMX4rT3FHEtVI19PCbUxaUyZ8m0QxLRIWSqmCoQ8GNUWFWYLh4aZ_QmzX5zKRK_iI4E9lYcSws/s1600/014.png" width="200" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Which was solved by the following method...</div>
<br />
<br />
<span style="font-size: large;"><b>Collision Checking: Method 2</b></span><br />
<span style="font-size: large;"><b> - Intersection rectangle</b></span><br />
<br />
In <b>my</b> physics engine this problem is very unlikely to happen, since I have codes to assure that, after a collision is detected, the object is bumped away from the other object. But, either way, we want our codes to be as optimized as possible, right? Well, at least I do. In the <b>rare</b> event that we generate two objects intersecting each other while no point is inside the other object, we have to make a last checking:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> checkCollision<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p1x<span style="color: navy;">,</span> p1y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>x1<span style="color: navy;">,</span> x2<span style="color: navy;">),</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>y1<span style="color: navy;">,</span> y2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p2x<span style="color: navy;">,</span> p2y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>x1<span style="color: navy;">+</span>w1<span style="color: navy;">,</span> x2<span style="color: navy;">+</span>w2<span style="color: navy;">),</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>y1<span style="color: navy;">+</span>h1<span style="color: navy;">,</span> y2<span style="color: navy;">+</span>h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>and</b></span> p2y<span style="color: navy;">-</span>p1y <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
What I'm doing there: I'm mapping two points that represent the rectangle that is formed between the two rectangle's extreme points. If the rectangle sizes are bigger than 0, then it represents an actual collision:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJmkTR1Flce8MViEiIGjbCTiImIwNc58Uq85p5Q-Ai1Cv32l3o7_f2WVfHk-vcJQsbuYAdxtVpxpYvDWIqv2pbY_vk3XO_oEtcXSkLtS30p9OkJF0-KKTfl4CW3MXexOF56lazESWRT8s/s1600/016.png" width="266" /></div>
<br />
I don't know if you guys noticed, but I've just reinvented the wheel: with this simple new way of checking collision, I don't need to check the four corners anymore.<br />
<br />
I'm sorry if you got confused up to this point, since I showed a method then replaced it, but, as I said, I just realized that this method is the best option. Since we're still looking for the concepts of physics and not getting to the coding itself, I think it is better to showcase other methods, their pros and their cons. Just like you, I'm learning right now, literally!<br />
<br />
So, this method can detect collisions in <b>any</b> circumstances: corner collisions, "one inside other", crossed objects, etc. It is way simpler, faster and easier than my last method. I'm glad I realized this while making this post, so now my games will be way faster!<br />
<br />
Another great point about this is that, with this method, I can not only detect "intersection" collisions (when one object is slightly inside the other), but also side-by-side collisions (when one object is <b>exactly</b> side-by-side with another object). And even better: you can make this optional!<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> checkCollision<span style="color: navy;">(</span>x1<span style="color: navy;">,</span> y1<span style="color: navy;">,</span> w1<span style="color: navy;">,</span> h1<span style="color: navy;">,</span> x2<span style="color: navy;">,</span> y2<span style="color: navy;">,</span> w2<span style="color: navy;">,</span> h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p1x<span style="color: navy;">,</span> p1y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>x1<span style="color: navy;">,</span> x2<span style="color: navy;">),</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>y1<span style="color: navy;">,</span> y2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p2x<span style="color: navy;">,</span> p2y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>x1<span style="color: navy;">+</span>w1<span style="color: navy;">,</span> x2<span style="color: navy;">+</span>w2<span style="color: navy;">),</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>y1<span style="color: navy;">+</span>h1<span style="color: navy;">,</span> y2<span style="color: navy;">+</span>h2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> sideBySide <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> sideBySide <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">>=</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>and</b></span> p2y<span style="color: navy;">-</span>p1y <span style="color: navy;">>=</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>and</b></span> p2y<span style="color: navy;">-</span>p1y <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
Now let's stop talking about concepts and let's get to the actual coding. First of all, you'll have to make a loop for each object. This way, on each update, you'll check every object and see if it is colliding! This is a slow process most of the time. The more objects you have, the more lag you'll get. That is normal, there aren't many solutions for that other than optimizing your code, like I said (ignoring static objects, having masks, ignoring the same object being checked twice, etc.).<br />
<br />
First thing first: you'll make a loop that checks every physics object you have, and, in order to have it working properly, you ought to organize your code and objects-handling tables. Also, <b>do not</b> add non-physics objects, like particles, for example, to the objects table, so you don't run the risk of ruining everything.<br />
<br />
If you chose table organization method 1 (unidimensional), you'll make something more or less like this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> physics_update<span style="color: navy;">(</span>dt<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> i<span style="color: navy;">,</span> v <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>objects<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> j<span style="color: navy;">,</span> w <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>objects<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> i ~<span style="color: navy;">=</span> j <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--collision</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
But if you chose the second method (bidimensional), you'll make this instead:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> physics_update<span style="color: navy;">(</span>dt<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> m<span style="color: navy;">,</span> obj1 <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>objects<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> i<span style="color: navy;">,</span> v <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>obj1<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> n<span style="color: navy;">,</span> obj2 <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>objects<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> j<span style="color: navy;">,</span> w <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>obj2<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> <span style="color: blue;"><b>not</b></span> <span style="color: navy;">(</span>m <span style="color: navy;">==</span> n <span style="color: blue;"><b>and</b></span> i <span style="color: navy;">==</span> j<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--collision</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
Even though this seems more complicated, in fact it isn't, This is just like the unidimensional method, except that you go through each group of objects, instead of straight through every object. In my opinion, this is still better, since we can have the objects labeled AND get their data, but you're totally free to choose. In fact, if you're making a small game with just a few objects, the first method is better for you. Also, you can identify that, in both cases, I added an <b>if</b> statement. That is there just to make sure we don't check the same object twice, otherwise we'd have to calculate a collision with itself or with a "ghost".<br />
<br />
To avoid making this tutorial too much big, I'll stick with the object table's second method, which is my favorite, but if you want to use method 1 it'll be easy for you to figure out how to adapt the code. Also, I'll use the letters "<b>v</b>" and "<b>w</b>" to refer to the colliding objects, so it is even easier for you to identify what is what. I'll also stick with the second collision checking method, since it is the most efficient one, but if you want to use method 1 or a different method, it should still be easy to work around it.<br />
<br />
<br />
Now it's time to get to the true collision checking. After here, you'll understand how to check collision, how to identify in which side your object collided and how to bump them.<br />
<br />
First: <b>collision checking</b>. You already know how to make collision checking, but how do we apply this on our codes? Simple: in the collision checking functions, we always required the objects positions and their sizes, right? Now that we have our objects stored in tables, it becomes even easier to spot these values.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
<tr>
<td>29 </td>
</tr>
<tr>
<td>30 </td>
</tr>
<tr>
<td>31 </td>
</tr>
<tr>
<td>32 </td>
</tr>
<tr>
<td>33 </td>
</tr>
<tr>
<td>34 </td>
</tr>
<tr>
<td>35 </td>
</tr>
<tr>
<td>36 </td>
</tr>
<tr>
<td>37 </td>
</tr>
<tr>
<td>38 </td>
</tr>
<tr>
<td>39 </td>
</tr>
<tr>
<td>40 </td>
</tr>
<tr>
<td>41 </td>
</tr>
<tr>
<td>42 </td>
</tr>
<tr>
<td>43 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> physics_update<span style="color: navy;">(</span>dt<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> m<span style="color: navy;">,</span> obj1 <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>objects<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> i<span style="color: navy;">,</span> v <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>obj1<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> n<span style="color: navy;">,</span> obj2 <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>objects<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> j<span style="color: navy;">,</span> w <span style="color: blue;"><b>in</b></span> <span style="color: dodgerblue;"><b>pairs</b></span><span style="color: navy;">(</span>obj2<span style="color: navy;">)</span> <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> <span style="color: blue;"><b>not</b></span> <span style="color: navy;">(</span>m <span style="color: navy;">==</span> n <span style="color: blue;"><b>and</b></span> i <span style="color: navy;">==</span> j<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> sideBySide <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">-- You can also set this as a global variable in</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">-- the physics.load function</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> checkCollision<span style="color: navy;">(</span>v<span style="color: navy;">,</span> w<span style="color: navy;">,</span> sideBySide<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">-- Detect collision direction</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td><span style="color: blue;"><b>function</b></span> checkCollision<span style="color: navy;">(</span>obj1<span style="color: navy;">,</span> obj2<span style="color: navy;">,</span> sbs<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p1x<span style="color: navy;">,</span> p1y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>obj1.x<span style="color: navy;">,</span> obj2.x<span style="color: navy;">),</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>obj1.y<span style="color: navy;">,</span> obj2.y<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p2x <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>ob1.x<span style="color: navy;">+</span>obj1.width<span style="color: navy;">,</span> obj2.x<span style="color: navy;">+</span>obj2.width<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p2y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>obj1.y<span style="color: navy;">+</span>obj1.height<span style="color: navy;">,</span> obj2.y<span style="color: navy;">+</span>obj2.height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> sideBySide <span style="color: navy;">=</span> sbs <span style="color: blue;"><b>or</b></span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> sideBySide <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">>=</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>and</b></span> p2y<span style="color: navy;">-</span>p1y <span style="color: navy;">>=</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>and</b></span> p2y<span style="color: navy;">-</span>p1y <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
As you see, the function remains the same, except that we replaced <b>x1</b>, <b>x2</b>, <b>y1</b>, <b>y2</b>, <b>w1</b>, <b>w2</b>, <b>h1</b> and <b>h2</b> by <b>obj1</b> and <b>obj2</b>. Much better, isn't it?<br />
<br />
Now that we already know when a collision happens between two objects, it's time to check the <b>collision direction</b>. This way, we know which side of each object (<b>top</b>, <b>bottom</b>, <b>left</b> or <b>right</b>) collided and bump them according to it.<br />
<br />
<br />
<span style="font-size: large;"><b>Collision side detection: Method 1</b></span><br />
<span style="font-size: large;"><b> - Intersection rectangle measuring</b></span><br />
<br />
Since we already know the collision happened, we know that the "intersection rectangle" we talked about on collision checking: method 2 will always have positive values. This way, we can differentiate a <b>horizontal</b> collision from a <b>vertical</b> collision. After that, it'll be ever easier to get the collision side. Let's get to the actual code:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
<tr>
<td>29 </td>
</tr>
<tr>
<td>30 </td>
</tr>
<tr>
<td>31 </td>
</tr>
<tr>
<td>32 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> checkCollision<span style="color: navy;">(</span>obj1<span style="color: navy;">,</span> obj2<span style="color: navy;">,</span> sbs<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p1x<span style="color: navy;">,</span> p1y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>obj1.x<span style="color: navy;">,</span> obj2.x<span style="color: navy;">),</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>obj1.y<span style="color: navy;">,</span> obj2.y<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p2x <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>ob1.x<span style="color: navy;">+</span>obj1.width<span style="color: navy;">,</span> obj2.x<span style="color: navy;">+</span>obj2.width<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> p2y <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>obj1.y<span style="color: navy;">+</span>obj1.height<span style="color: navy;">,</span> obj2.y<span style="color: navy;">+</span>obj2.height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> sideBySide <span style="color: navy;">=</span> sbs <span style="color: blue;"><b>or</b></span> <span style="color: blue;"><b>false</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> sideBySide <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">>=</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>and</b></span> p2y<span style="color: navy;">-</span>p1y <span style="color: navy;">>=</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>and</b></span> p2y<span style="color: navy;">-</span>p1y <span style="color: navy;">></span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: blue;"><b>true</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> collided <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--Case 1: the width of the intersection is bigger than the height</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--That means that the collision is mostly VERTICAL</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> p2x<span style="color: navy;">-</span>p1x <span style="color: navy;">></span> p2y<span style="color: navy;">-</span>p1y <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: grey;">"vertical"</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--Case 2: the height of the intersection is bigger than the width</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--That means that the collision is mostly HORIZONTAL</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: grey;">"horizontal"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> collided</td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
As you see, you don't need to reinvent the wheel (by that I mean checking the intersection rectangle once more). You can simply add this to your already done collision-checking function. What I'm doing here is checking the dimensions of the intersection rectangle; if it's width is greater than it's height, then the collision was vertical, and if it's height is greater than it's width, then the collision was horizontal. To get this concept clear, here's an example:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4UzAndgObG_sEQV88IbH8UxLC6P3w6vrLmE35pWyjZyOVWdLcufAHq2vsjigdLVVUh7RIVVWEbkNfjzkAu2kN3jElDEfS0lkEa3ZbWqVw5AxNu5yEGKpjJxgdeu92NiARjSsti6sXLP8/s1600/027.png" /></div>
<br />
Now that we've got the basic orientation of the collision, getting the side of it is even easier! You just need to know the position of each rectangle. In a vertical collision, the rectangle above will get a bottom collision, and the rectangle below will have a top collision. On a horizontal collision, the rectangle on the left will get a right collision, and the rectangle on the right will get a left collision.<br />
<br />
This method gives us a few problems, thought, that the following method will fix, but I still want you to know that this method works fine in most cases. I'm trying to teach you how to <i style="font-weight: bold;">think</i> about the collisions and how to <i style="font-weight: bold;">understand</i> them, so this method is not "disposable".<br />
<br />
But, still, the problem that this method have happens in the following situation:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJDrynvQHK0405Ph5anTGYEaCBWuTBvfoOMWXRqri-V_t0a7sKrxMZ9oOaRTltfhGKX5B4ubSJUrTJNJk5_sHMiZMWw9papegErXCLXw43PqAs70MY9zZUK28Rr3qRzmNhyphenhyphenI3aAPduuKA/s1600/028.png" /></div>
<br />
In this case, this method would interpret the collision as <b>horizontal</b>, even though we know that it is, in fact, a <b>vertical</b> one. In the early development of my library/engine, I faced this problem but didn't realize what was causing it, until I decided to look closer at the collision side checking code, and noticed that it wasn't the most optimal. Then I came across another solution, much simpler and elegant!<br />
<br />
<br />
<span style="font-size: large;"><b>Collision side detection: Method 2</b></span><br />
<span style="font-size: large;"><b> - Middle-point distances</b></span><br />
<br />
This method was much better for me, so for now on I'll stick with it in this tutorial. This method not only fixes the problems with the method above, but also gives me the direction of the collision in a single checking, and not only after checking the orientation! What I did here was getting the middle point of each object (their position plus their sizes divided by two). Then, I measure the distance between both middle points. If the horizontal difference is bigger than the vertical, we had a horizontal collision (and not a vertical collision like in the last time). If the difference is a positive number, we had a bottom collision, and if it's negative we had a top collision. The same applies to horizontal collisions. Here's an example, to make things easier to understand:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl_7WYGPPP31amf0YoalKksLNfRj6GQ6LnTSy8EFIHrWwVTgJvphItAO7nRz8-rbhllP2nIJAfsw_bbx152D3Q0X8QGgLNBdSVKYiAfZlA_gxzjSjOgFoNrlBkjms1I44Unyp-dD1byY4/s1600/029.png" /></div>
<br />
Having that in mind, doing the actual code is actually pretty easy:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>if</b></span> collided <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> m1x<span style="color: navy;">,</span> m1y <span style="color: navy;">=</span> obj1.x<span style="color: navy;">+</span>obj1.width<span style="color: navy;">/</span><span style="color: orange;">2</span><span style="color: navy;">,</span> obj1.y<span style="color: navy;">+</span>obj1.height<span style="color: navy;">/</span><span style="color: orange;">2</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> m2x<span style="color: navy;">,</span> m2y <span style="color: navy;">=</span> obj2.x<span style="color: navy;">+</span>obj2.width<span style="color: navy;">/</span><span style="color: orange;">2</span><span style="color: navy;">,</span> obj2.y<span style="color: navy;">+</span>obj2.height<span style="color: navy;">/</span><span style="color: orange;">2</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--Since the object 1 is the focus, we'll only check it's collision side</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> <span style="color: purple;"><b>math.abs</b></span><span style="color: navy;">(</span>m1x<span style="color: navy;">-</span>m2x<span style="color: navy;">)</span> <span style="color: navy;">></span> <span style="color: purple;"><b>math.abs</b></span><span style="color: navy;">(</span>m1y<span style="color: navy;">-</span>m2y<span style="color: navy;">)</span> <span style="color: blue;"><b>then</b></span> <span style="color: darkgreen;">--Mostly horizontal</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> m1x<span style="color: navy;">-</span>m2x <span style="color: navy;"><</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span> <span style="color: darkgreen;">--Object 1 is behind object 2, thus a right collision</span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: grey;">"right"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: grey;">"left"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span> <span style="color: darkgreen;">--Mostly vertical</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> m1y<span style="color: navy;">-</span>m2y <span style="color: navy;"><</span> <span style="color: orange;">0</span> <span style="color: blue;"><b>then</b></span> <span style="color: darkgreen;">--Object 1 is above object 2, thus a bottom collision</span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: grey;">"bottom"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span></td>
</tr>
<tr>
<td> collided <span style="color: navy;">=</span> <span style="color: grey;">"top"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
First, we check if the absolute horizontal distance is bigger than the absolute vertical distance. After knowing if the collision is mostly horizontal or vertical, we can very easily detect in which side the collision occurred: if the distance is smaller than 0, it is either a right or a bottom collision, if bigger or equal to 0, it is either left or top collision. This gives left/top collision slightly more priority: if the two objects are perfectly inside each other (with their central points overlapping one another), the priority will be first to vertical collision (since we check vertical collisions only if the difference between the middle points is equal to or smaller than 0). Later, we give preference to top collision, since it only happens when the difference is equal to or smaller than 0.<br />
<br />
What I'm trying to say is that, even though I set the "global preference" to top collision, you can give it to any direction. You can even give it to bottom collision, which makes the objects be pulled upwards instead of downwards. This doesn't matter much, since this kind of situation is preeeeeety much rare.<br />
<br />
<br />
<b><span style="font-size: large;">Collision side detection: Method 3</span></b><br />
<b><span style="font-size: large;"> - Opposite sides difference</span></b><br />
<br />
After a while using method 2, I realized it wasn't so perfect as I originally though. Although problems mostly happen with objects with very distinct sizes (which, at the time, I wasn't using), that method is still good for simple games. But this method should fix those problems from the two previous methods. Thanks for the LÖVE Forums' user "Tjakka5" for pointing this out!<br />
<br />
In this method, we analyze the difference between the object's extreme points (the object's sides) that are opposite to each other (left-right, right-left, top-bottom, bottom-top), and detect which difference is smaller. Here's a little example:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinLedyvTQZSpnk_FZNJhpQ4g_sUxtCi1kv19FhAJel-IfzLHaE6zuAPPFMf0asBnPCfgQN88mEQKLdQCVEslldoX9kaKRSQoyNaBt-HYrBhNPQqqRcZgnp3mdWTPerO900jG5zjhcMGmk/s1600/036.png" /></div>
<br />
At first glance it may look a bit complicated, because I simply didn't thrive in making it look simpler, but the concept itself is REALLY simple, and if you look closely, all we're doing is tracing lines between the objects' opposite sides. The red ones are the biggest differences, and the green ones are the smallest. From that, you can already say which sides collided, without needing to detect the collision axis (horizontal or vertical) first! Here's how simple you can do it:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> checkCollision<span style="color: navy;">(</span>obj1<span style="color: navy;">,</span> obj2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> right <span style="color: navy;">=</span> <span style="color: navy;">(</span>obj1.x<span style="color: navy;">+</span>obj1.width<span style="color: navy;">)</span> <span style="color: navy;">-</span> obj2.x</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> left <span style="color: navy;">=</span> <span style="color: navy;">(</span>obj2.x<span style="color: navy;">+</span>obj2.width<span style="color: navy;">)</span> <span style="color: navy;">-</span> obj1.x</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> bottom <span style="color: navy;">=</span> <span style="color: navy;">(</span>obj1.y<span style="color: navy;">+</span>obj1.height<span style="color: navy;">)</span> <span style="color: navy;">-</span> obj2.y</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> top <span style="color: navy;">=</span> <span style="color: navy;">(</span>obj2.y<span style="color: navy;">+</span>obj2.height<span style="color: navy;">)</span> <span style="color: navy;">-</span> obj1.y</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> right <span style="color: navy;"><</span> left <span style="color: blue;"><b>and</b></span> right <span style="color: navy;"><</span> top <span style="color: blue;"><b>and</b></span> right <span style="color: navy;"><</span> bottom <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--Right collision for obj1, left for obj2</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> <span style="color: grey;">"right"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> left <span style="color: navy;"><</span> top <span style="color: blue;"><b>and</b></span> left <span style="color: navy;"><</span> bottom <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--Left collision for obj1, right for obj2</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> <span style="color: grey;">"left"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> top <span style="color: navy;"><</span> bottom <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--Top collision for obj1, bottom for obj2</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> <span style="color: grey;">"top"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>else</b></span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--Bottom collision for obj1, top for obj2</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>return</b></span> <span style="color: grey;">"bottom"</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
In this case, though, it doesn't detect if a collision happened: it only detects the direction. So, if you plan on using this method, I <b>highly</b> recommend using one of the other 2 methods for <b>collision detection only</b>, and <b>not for collision side detection</b>! Then, you use this method to specify the side. In this case, we're returning the collision side of object 1, so if you want to apply effects on the second object, just remember that it got a collision on the opposite side. So if collision 1 was "left", collision 2 will be "right", if collision 1 was "top", collision 2 will be "bottom", and so on.<br />
<br />
<br />
<span style="font-size: large;"><b>Objects bumping</b></span><br />
<br />
Now to the last part of this tutorial: <b>bumping</b>. For those of you who don't know, bumping is pretty much "avoiding objects to occupy the same space at the same time". That is pretty much what happens in Super Mario Bros., but instead of making you slowly slide when you're inside a wall, in our physics engine we'll make that happen instantly. You can surely make this however you want, but for the sake of this tutorial I'll be making the most common method. As you've seen before, we can detect collisions when two bodies overlay each other, but why don't we see that happening in most games? The reason is that we bump the objects just when we detect the collision, leaving no chance of it showing itself being overlapped. You can make the bumping effects in several ways, but I'll just showcase two better ways of doing it (in my opinion).<br />
<br />
<br />
<span style="font-size: large;"><b>Objects bumping: Method 1</b></span><br />
<span style="font-size: large;"><b> - Pushing the first object</b></span><br />
<br />
This method makes it so the first object to detect a collision will be pushed away. Here's a quick example:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_TQxPJAh9bznphYw800wBZrWNcllaHSSnGsGtnBet2gENt6WWI7hxB0z0xz2UswPlTeE9k8zr_6Y_RL6O83_cH1B1NHvSaKS-d7TICC6JbooqlPj51K_q9qpRPqavcyh4ufoVOTmgrXk/s1600/031.png" /></div>
<br />
Making this, as you may expect, is quite easy:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> bump<span style="color: navy;">(</span>obj1<span style="color: navy;">,</span> obj2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> dir <span style="color: navy;">=</span> checkCollision<span style="color: navy;">(</span>obj1<span style="color: navy;">,</span> obj2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--This will return the direction of the collision</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"top"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.y <span style="color: navy;">=</span> obj2.y <span style="color: navy;">+</span> obj2.height</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"bottom"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.y <span style="color: navy;">=</span> obj2.y <span style="color: navy;">-</span> obj1.height</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"left"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.x <span style="color: navy;">=</span> obj2.x <span style="color: navy;">+</span> obj2.width</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"right"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.x <span style="color: navy;">=</span> obj2.x <span style="color: navy;">-</span> obj1.width</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
Of course, you can include this either in the collision checking function or in the physics.update function itself. What we're doing here is simply move the object 1 to the closest point outside object 2. This is, basically, the principle of most bumping methods. Now, let's get to the second method...<br />
<br />
<br />
<span style="font-size: large;"><b>Objects bumping: Method 2</b></span><br />
<span style="font-size: large;"><b> - Pushing the objects equally</b></span><br />
<br />
I personally prefer this one, since it seems more subtle and slightly more realistic, but, again, your choice. Either method will work.<br />
<br />
In this method we're moving <b>both</b> objects apart from each other. We're doing this the same way we'd do in the first method, but instead we just move the object half the way and also move the second object:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnISoT9ATekRX6ZYGCBWVASPNZYEVIZenbVHfIoRfENe57pl-A0iBW_zgxWQxeKC1Xw6FnDLOe3VwEaC5_PhDbZ3_fWabXmc7aC8QTSr5paNpeCh5ftXIFl6rac4CJ-qUwZYw1_lGLTmw/s1600/033.png" /></div>
<br />
As you see, since they're moving apart from each other by the same distance, all we have to do is to get the measurements of the intersection rectangle. Then we move each object by half of that measure (one half for each object, which results in both not colliding anymore).<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> bump<span style="color: navy;">(</span>obj1<span style="color: navy;">,</span> obj2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> dir <span style="color: navy;">=</span> checkCollision<span style="color: navy;">(</span>obj1<span style="color: navy;">,</span> obj2<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--This will return the direction of the collision</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> width <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>obj1.x<span style="color: navy;">+</span>obj1.width<span style="color: navy;">,</span> obj2.x<span style="color: navy;">+</span>obj2.width<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: navy;">-</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>obj1.x<span style="color: navy;">,</span> obj2.x<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>local</b></span> height <span style="color: navy;">=</span> <span style="color: purple;"><b>math.min</b></span><span style="color: navy;">(</span>obj1.y<span style="color: navy;">+</span>obj1.height<span style="color: navy;">,</span> obj2.y<span style="color: navy;">+</span>obj2.height<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: navy;">-</span> <span style="color: purple;"><b>math.max</b></span><span style="color: navy;">(</span>obj1.y<span style="color: navy;">,</span> obj2.y<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: darkgreen;">--We're getting the measurements of the intersection rectangle here</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"top"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.y <span style="color: navy;">=</span> obj2.y <span style="color: navy;">+</span> obj2.height</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"bottom"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.y <span style="color: navy;">=</span> obj2.y <span style="color: navy;">-</span> obj1.height</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"left"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.x <span style="color: navy;">=</span> obj2.x <span style="color: navy;">+</span> obj2.width</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> dir <span style="color: navy;">==</span> <span style="color: grey;">"right"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> obj1.x <span style="color: navy;">=</span> obj2.x <span style="color: navy;">-</span> obj1.width</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
There are a few more complicated method to do this, but I'm not going to show them in here. You can either search for them on the internet or figure them out by yourselves, since now you have the basic concepts in your mind. Some method include: organizing the objects by position and bump them after a common center, bump every object at a given direction, invert/decrease/remove the objects' speeds, etc.<br />
<br />
<br />
<span style="font-size: large;"><b>Conclusion</b></span><br />
<br />
But that's all for this tutorial. If you need a bit more help with organizing your code, here's a little example:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
</div>
<table style="border-color: #aaa; border-style: dashed; border-width: 2px; font-size: 12px;">
<tbody>
<tr>
<td><table class="noselect" style="background-color: #d6d5c5; font-family: monospace; text-align: right;">
<tbody>
<tr>
<td>1 </td>
</tr>
<tr>
<td>2 </td>
</tr>
<tr>
<td>3 </td>
</tr>
<tr>
<td>4 </td>
</tr>
<tr>
<td>5 </td>
</tr>
<tr>
<td>6 </td>
</tr>
<tr>
<td>7 </td>
</tr>
<tr>
<td>8 </td>
</tr>
<tr>
<td>9 </td>
</tr>
<tr>
<td>10 </td>
</tr>
<tr>
<td>11 </td>
</tr>
<tr>
<td>12 </td>
</tr>
<tr>
<td>13 </td>
</tr>
<tr>
<td>14 </td>
</tr>
<tr>
<td>15 </td>
</tr>
<tr>
<td>16 </td>
</tr>
<tr>
<td>17 </td>
</tr>
<tr>
<td>18 </td>
</tr>
<tr>
<td>19 </td>
</tr>
<tr>
<td>20 </td>
</tr>
<tr>
<td>21 </td>
</tr>
<tr>
<td>22 </td>
</tr>
<tr>
<td>23 </td>
</tr>
<tr>
<td>24 </td>
</tr>
<tr>
<td>25 </td>
</tr>
<tr>
<td>26 </td>
</tr>
<tr>
<td>27 </td>
</tr>
<tr>
<td>28 </td>
</tr>
<tr>
<td>29 </td>
</tr>
<tr>
<td>30 </td>
</tr>
<tr>
<td>31 </td>
</tr>
</tbody></table>
</td>
<td><table class="all-copy" style="background: #f6f7f9; font-family: monospace;">
<tbody>
<tr>
<td><span style="color: blue;"><b>function</b></span> physics_update<span style="color: navy;">(</span>dt<span style="color: navy;">)</span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> <span style="color: dodgerblue;"><b>each</b></span> object <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>for</b></span> <span style="color: dodgerblue;"><b>each</b></span> object <span style="color: blue;"><b>do</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> objects <span style="color: blue;"><b>are</b></span> <span style="color: blue;"><b>not</b></span> the same <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> objects <span style="color: blue;"><b>are</b></span> colliding <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: purple;"><b>detect collision side</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>if</b></span> collision side <span style="color: blue;"><b>is</b></span> <span style="color: grey;">"top"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 1 downwards</td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 2 upwards</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> collision side <span style="color: blue;"><b>is</b></span> <span style="color: grey;">"bottom"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 1 upwards</td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 2 downwards</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> collision side <span style="color: blue;"><b>is</b></span> <span style="color: grey;">"left"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 1 to the right</td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 2 to the left</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>elseif</b></span> collision side <span style="color: blue;"><b>is</b></span> <span style="color: grey;">"right"</span> <span style="color: blue;"><b>then</b></span></td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 1 to the left</td>
</tr>
<tr>
<td> <span style="color: purple;"><b>push</b></span> object 2 to the right</td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td> <span style="color: blue;"><b>end</b></span></td>
</tr>
<tr>
<td><span style="color: blue;"><b>end</b></span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br />
<br />
If you're still wondering "<i>How about gravity?</i>", "<i>How do I add friction?</i>", "<i>How to handle static objects?</i>", "<i>What if I want certain objects not to collide?</i>" or something similar, don't worry: I'll be doing another tutorial pretty soon with some more "advanced" stuff. Thanks for reading, leave your ideas, feedback and suggestions in the comment section if you want, and I see you guys in my next post!<br />
<br />
<div style="text-align: right;">
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: x-large;"><b><a href="http://hugobdesigner.blogspot.com/2014/10/making-simple-2d-physics-engine-part-2.html" target="_blank">PART 2 >></a> | <a href="http://hugobdesigner.blogspot.com/2014/12/making-simple-2d-physics-engine-part-3.html" target="_blank">PART 3 >></a></b></span></div>
</div>
Unknownnoreply@blogger.com12tag:blogger.com,1999:blog-5875476712979113891.post-82366684071684077632014-08-17T09:34:00.001-03:002014-08-17T09:34:17.398-03:00Quick Update for Mari0 +Portal #12<div class="separator" style="clear: both; text-align: left;">
Hello, guys! I know it's been a while since my last "Quick Update for Mari0 +Portal" post, but it doesn't means that the mod is over, dead or in "hiatus". I've done a lot of updates for it, and I'm working on the next stable update for the mod, which will FINALLY be the long promised 1.0 update. In order to make it work, I had to decrease the amount of new features I wanted for this update. But the most important thing I'm working on the mod right now is something I should have done a long time ago: fixing bugs. Since I'm not gonna add many new features right now (not because I don't want, but because I chose to do so), I have more time to fix some bugs and make this update better for people who wanna use this mod without running the risk of having his work gone or interrupted by the game crashing, for example.</div>
<div class="separator" style="clear: both; text-align: left;">
But that doesn't means that there won't be new cool things to look at in this update. Since it's been a while since the last post, there are many new features that weren't showcased here yet. So let's start our "GIFs tour" now!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
One thing that I always wanted in Mari0 and was "impossible" at the time was language selecting. For a very long time, I thought I wouldn't be able to do it myself in this mod. However, I finally manage to make it in a way so any text can be translated to any installed language! I also set up so you can decide if your custom texts (from overlaydata, for example) should be translated whenever possible. You can even make your very own translations or even improve someone's translations! Currently I have Brazilian Portuguese (my first language), Netherlands and French, but if you know any other language and are willing to help, just contact me (in my "Contacts" page or by commenting here).</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-0CihKNxbHIy5Z4voBuEBo__rRjmCTXO0YrQI60ljlqt2Fg2OJ_54M3rxf9ROLVrF4_Zx6FiyGkVcppmHfPhbSPX_tCssJlPZKKNio_IWBixyq-Wv2LE7tsa_esylCimiuDdsQ5RLwTU/s1600/UTF8thing_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Of course, to make multiple languages work properly, I had to come up with a way to make the game support non-English-standard characters (also known as UTF-8). So, now, characters like "á", "ç", "ñ" or "ô" work just fine! Since I worked on them to make them work like they do now, and since I came up with a system to easily "apply" new custom characters, I thought: why not go ahead and also implement punctuation symbols and uppercase characters?</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5Emdu8XGGKFsao_xGdB-ZX_Yq14BMo41DL3fZhuyoCDQhVveSst4GNplzN-ZWrA8T5V5rjPywpR2s3SZ_QUDuiYwlo8TkIL_aYSe9dtesWQlAxCDLxEDPgdkD5lAacwWJzRAxsb1C89s/s1600/screenshot_0026.png" height="31" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzWLRQAyxzeQ_v1mM4crchoktLqvjuOqvTaL9yd5oasJgyDyVq_i_7haB8P6zBBeR8k6-1q0qV2DxrP-6pcoKD4VPdnMzhcdKvGUJoCieQXiDQDYok4qNrrUbOp4BFwQmkGJgd0suvAqI/s1600/screenshot_0028.png" height="32" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
So yeah, multi-language settings and non-UTF-8 characters are cool, but let's get back to the gameplay-wise new features. I always wanted to let map makers have more control over boxes and their behavior. Although I still have many adjustments and improvements to them, I added several commands (for both Commander and Environmental Trigger) to change the behavior of boxes. For example, you can detect when a box is being held by a specific player, you can set it's texture, emancipate them, change their speeds and even force them to be grabbed/released by a player. This, along with other commands and triggers can lead up to new features like Portal 1's "click-to-throw" system!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGuuf5ZxpNVch3fN6ZHZXgadcDlthd7NfgpJBagoSX4CtC45UhnvTMP6nlao1UoV8iqz6l1IG4WnPbU5juRec85gIToDwrNU_wOPvii8v7TGZYBMSS7TELzm8iRW3OgG2NWa01M-RBE5U/s1600/BoxShot_GIF.gif" height="224" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
But that's not the only thing I added to Commanders and Environmental Triggers! Now, to make it more user-friendly, I made a quick-consult system that displays commands based on what you've typed in so far. So, if you, for example, wants to fire a command related to a player but aren't sure of which commands to use, simply type "playerN" and press "tab". A list of player-related commands will show up and you'll be able to make your commands more easily! It also keeps track of data types, so if you write a text where it should be a number, this new system will let you know!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAxdd62_DpptfYmasZtFZCi9FBvRpYv9ESNIIbKb9eefcX-CVR-bnTs86YLqgulNhdye_AA7LFSQq5yv4KaN34KDIzmzysVNFxnMASSBtte0MDmWC5hrahFZBFTKz_r-InXkm6k9YIZXI/s1600/CommanderHelp_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAxdd62_DpptfYmasZtFZCi9FBvRpYv9ESNIIbKb9eefcX-CVR-bnTs86YLqgulNhdye_AA7LFSQq5yv4KaN34KDIzmzysVNFxnMASSBtte0MDmWC5hrahFZBFTKz_r-InXkm6k9YIZXI/s1600/CommanderHelp_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Of course, there are a lot of little adjustments to be done to make it even more user friendly for you guys and more coder-friendly for me. Still, it's a great feature so far! Still on the commands topic, something epic can be done with variables now! Remember those savable variables feature, where you could have a custom variable saved and you could load them later on the same mappack? So, now you can use those variables to unlock customizable menu buttons! These buttons will fire a command when pressed, and you can choose any command! The best one, in my opinion, is the world-changing one. It'll allow you to let players unlock DLC worlds by completing tasks in the default campaign of your mappack!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheQJSf51jUt2NcM7aqaM5s763wVPgmPS2oqFY4SsARXJPfk2a4Pz9jVHeM_DrqB_g7_kPd8yaDdvH7M4C7pz375Haa2VLtspkKo9OjCa3zUBbqo4-yWxqf1O373VTdwNpvqqvTHohCV4Y/s1600/UnlockableButtons_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now to the new entities and properties! So, some of you may know about the "mirror" tile property (present in Mari0:SE and Alesan99's Entities mod). It redirects portals shot towards it in the exact opposite direction (thus "mirror" property). Yes, they finally arrived here. It was only possible with Alesan99's help, so thank you so much, Alesan!<span id="goog_452198942"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTWd8O0ePze2sAuTubZ37-Z_qXk4NNNxSw7onMEWU_NU9t0ERQ7xMluB3vW0GCpAxClqr5Uts62aNylMza2mNcluaMC8bj59551ww4f3_SJRZHrU_Cz9c_OdY9NGkshLh7PvOl1CzS9aA/s1600/MirrorBlocks_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The "pointing-redirecting" is a new feature, though, that is only present in my mod. Personally, I found it easy to make, so I don't know why it's not present in SE and Alesan's mod yet. Anyway, I got really happy with the way mirror tiles worked, so I tried and successfully added a new gel, only to redirect you portals! It comes with a variable only for it as well, which toggles redirecting portals on portalable walls on and off, so you don't have to struggle with a mode that you don't like. You can set it either via custom variables or via Commanders!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipICu_-0q-_hSi4yy7NrHrTjyX4ykJ7ba2SAnj1Pt_vpnTamGUhHZhH2ZRTK1kyxMH-jtdKHmaXMCd75g6wHCH_nYtVoUq4ZO675Hif_C_au8kuzVJJef3-tHkgQSGEavO7ZOZ5aZw0ik/s1600/MirrorGel2.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
Speaking of gels, I took some time to fix the way that the Adhesion gels changes the player's textures orientation. So now you can climb on walls without having your character looking the opposite way you're pointing at!</div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVJeQnFCGuxvp7Fmb2EOi7aZTymtvpPb1sjJBEUimtjzNnbhJ_Nyw8vUAwY5NNn7AR3HBsBid11KsQ2Mx09vtnopsLProOr2dK06IcK-ZBIEBr9-AJZf1sjSEivuRteCW49oa3tDQ7W8U/s1600/FixedAdhesion.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Another thing that will help map makers visualizing their mappacks better in the level editor is having different textures for each gel you set up. This feature was already present with Logic Gates, so why not with gels?</div>
<div class="separator" style="clear: both; text-align: center;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyJkOJ9kLD24hAAu8HFrra2908-DwxH7EutWxq2T71W-dx5T7mjwbWw5TH1eetOdejVb3mMBrjTgk1KW5-mOyVDyYj0RRy4-14G9ppxrRbc8WG1OSpqkE6OEATu9G0-tKqAhog7fbrluw/s1600/screenshot_0009.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyJkOJ9kLD24hAAu8HFrra2908-DwxH7EutWxq2T71W-dx5T7mjwbWw5TH1eetOdejVb3mMBrjTgk1KW5-mOyVDyYj0RRy4-14G9ppxrRbc8WG1OSpqkE6OEATu9G0-tKqAhog7fbrluw/s1600/screenshot_0009.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And yes, it surely includes the multi-gel entity. Speaking of it, I decided to stop being lazy and fix it's GUI so you can now FINALLY see the gels as they should!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI6q34c3ovBUqLm96H1xoRsgU6VmIjTyWVJ5hsHOV85-8lppncvHuJDj08rbHlfV30Q0hufGvkdC86aZDRbTMUw8T9WgBcUvMiXdYf-AweVa5Z1JYd7izBmng-edmR0sUEgSrGRIk_N0Y/s1600/screenshot_0007.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Speaking of GUIs, I also decided to finish something that will help map makers a lot during their mappack development: pointers for faith plates. This way, you can set faith plates' forces without having to "guess" where the player will land!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT-b2LhOE-pE-68TO5EbJiOwRal62YJ6BVQ-vedzSPindiyL4yJ67H2oIBpMWJwOoQp-JU8mhvxEl5TWCLSizfPw0Tpw5xbFJCmM8wqugHO912GzG46ZXNfEKCF-6Y8dvtIXXfoks53ys/s1600/screenshot_0008.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
But I have to say something about this: I lost the latest version of my mod which had this and some other features shown up here and, although I remade most of them, I still didn't finish this particular one, so faith plates pointers <i>may or may not</i> be in my next mod's update. But don't worry: still on the subject of faith plates, I added in something requested for me that is gonna be great for portal-themed mappacks: ceiling faith plates! Wall faith plates are going to be implemented soon, but, meanwhile, you can already have this:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWb_y6uM0OHF7h-cGdqsvf9X7QNv_4_vxkcTsRcZqAxjg2axWmx8DDH4avVP1E8WT1LxNYZrZmTV_XK3HY8kLj_GFQrR2vLuptjLQuIXAVjbp1fSLG8j-i6DnTfqYclVTCB1D-UUoy8AM/s1600/CeilFaithPlates.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Which works greatly with "gravity side" commands!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZmfodYP62LLXeZXQxQ7bg6HHT36YLvgxOOx0-bAPDjdsGpl1CCfhtSgUWBYj5fpW21e9WKpmnCgA8oVEADxOC69OTqIXNyKqLe4cGQ0tGfPu2kpW8bdFcvL1wFx0UoNYf8dMtHmjqqZw/s1600/CeilFaithPlates2.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZmfodYP62LLXeZXQxQ7bg6HHT36YLvgxOOx0-bAPDjdsGpl1CCfhtSgUWBYj5fpW21e9WKpmnCgA8oVEADxOC69OTqIXNyKqLe4cGQ0tGfPu2kpW8bdFcvL1wFx0UoNYf8dMtHmjqqZw/s1600/CeilFaithPlates2.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Last, but not least, I'm improving the entities categorization system. Not only that, but I've also added a new category to help you guys make portal-themed mappacks easier and faster to be done: the Portal category!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj74yODuFUdRqG0TMjnU9YHCs9YgypltFNZ2vZEPqW5DVQcF2DpeuMiShhVgNy7c6raie8u1x6whxyP8wi_Sa6WRs2oOl2KhF1r8XusWS05xvkthaDWPBNk4Q4ILoYhFRzu7j88YlxqtN4/s1600/screenshot_0011.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That's it for this update, guys. I know it was shorter than the usual, but this is for the fact that I'm working on fixing bugs more than adding new features. This also means that the next post about this mod will take a little while as well, so sorry in advance. As for the blog in general, I have some quick news.</div>
<div class="separator" style="clear: both; text-align: left;">
The first one is that I'm working on a scientific report that I'm going to post in here as well. The report/article itself is done, I'm just polishing it and transferring from paper to computer. If you're not much into science, don't worry, it's gonna happen often, and I'll keep posting about games as well.</div>
<div class="separator" style="clear: both; text-align: left;">
The other one is about games: I'm working on a new game project for a "minigame simulator", where anyone will be able to make a game just for it with a simple interface and a great pre-made base for people so they don't have to make too much effort to make a game for it. Of course, there will be pre-installed games as well, so anyone can play, even if they can't make a game. As soon as I have a good progress on it I'll post about here. So for now, thanks for reading and see you in my next post!</div>
<!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F3.bp.blogspot.com%2F-uzahHz8-Ivc%2FU9P6w8A_L4I%2FAAAAAAAAFxE%2FswbJpnWjqNk%2Fs1600%2Fscreenshot_0009.png&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyJkOJ9kLD24hAAu8HFrra2908-DwxH7EutWxq2T71W-dx5T7mjwbWw5TH1eetOdejVb3mMBrjTgk1KW5-mOyVDyYj0RRy4-14G9ppxrRbc8WG1OSpqkE6OEATu9G0-tKqAhog7fbrluw/s1600/screenshot_0009.png" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-K_CBc9n_6Q0%2FU1VrhwEUrQI%2FAAAAAAAAFYE%2FYtl8Wm6sheo%2Fs1600%2FCommanderHelp_GIF.gif&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAxdd62_DpptfYmasZtFZCi9FBvRpYv9ESNIIbKb9eefcX-CVR-bnTs86YLqgulNhdye_AA7LFSQq5yv4KaN34KDIzmzysVNFxnMASSBtte0MDmWC5hrahFZBFTKz_r-InXkm6k9YIZXI/s1600/CommanderHelp_GIF.gif" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-8j9-rIX26co%2FU9P6sTHUPjI%2FAAAAAAAAFw4%2F6NLlMRQxpLk%2Fs1600%2FCeilFaithPlates2.gif&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZmfodYP62LLXeZXQxQ7bg6HHT36YLvgxOOx0-bAPDjdsGpl1CCfhtSgUWBYj5fpW21e9WKpmnCgA8oVEADxOC69OTqIXNyKqLe4cGQ0tGfPu2kpW8bdFcvL1wFx0UoNYf8dMtHmjqqZw/s1600/CeilFaithPlates2.gif" -->Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-21037596420280987482014-03-12T18:07:00.001-03:002014-03-13T14:32:53.842-03:00Time for a chat<b>Warning! The following post contains huge amounts of text information.</b><br />
<b><br /></b>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Hello again, guys! As promised, here's my post with more information about side projects and current projects. Take 2 or 3 sodas, because we will talk a lo... NO! No, I'm joking, I'm joking! It won't be that long. Calm down...<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Anyway, let's start with the most obvious one: Mari0 +Portal. As some of you may be noticing, I'm not working on it as much as I used to. In my previous post, I said it was because of side projects and SE. And it is actually why, but not all. People are losing interest in it, and, along with it, <b>I</b> am losing interest on it. I'm not saying I'm working on it without having interest. What I'm saying is that it is not as satisfying as it used to be. Back on version v0.5 of it, everything was awesome! People loved it, and everybody had this mod on their Desktop. Then came Alesan's Entities mod, and everybody ran for it. What made me sad, though, wasn't the fact that people were using Alesan's mod more than mine. I was happy for Alesan, because he's a very cool and smart guy, and his mod is amazing. The problem is that I realized that people were not SO interested on me as I used to think.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>People made so many things related to his mod that I realized that they wasn't too much interested in mine. My mod have a little bit more than 10 mappacks for it, being most of them unfinished or never released. As for Alesan's mod, it had tons of mappacks, full of content and compliments.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>As time passed, less and less people actually cared about my updates. When Alesan (or even other users) released something new, everybody was like <i>"Wow! That's so awesome! Really, really awesome! Keep up the good work!"</i>. Even when I did 3 or 4 updates, one after other, full of new content, a few people cared, and they were like <i>"Yes, that's cool..."</i>. <b>This</b>, this was the worse. I actually felt like they were just commenting on my mod's thread to be educated, and not because they wanted. And, if I though this was bad, Mari0: SE came out, and people just passed to ignore me 99% of the times, and in the 1% of time they noticed I was there, they were even more like <i>"Yeah, okay, cool, whatever..."</i>. Of course, they were not literally saying this, they're not evil or anything, but let's take some <b>real</b> examples.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example 1:<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><span style="background-color: #ebebeb; color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">You're too persistent.</span><br />
<span style="background-color: #ebebeb; color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><br /></span>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example 2:<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><span style="background-color: #ebebeb; color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Excuse me, but can I combine your mod with alesan99's entity mod?</span><br />
<span style="background-color: #ebebeb; color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><br /></span>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example 3:<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><span style="background-color: #ebebeb; color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">I would love to see everything in se</span><br />
<span style="background-color: #ebebeb; color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;"><br /></span>
<span class="Apple-tab-span" style="white-space: pre;"> </span>If you thought "Hey, they're not being rude or anything", you're right, but that's not the point. The point is that, even though people seems to like my mod (I put "seems" on purpose), they are often suggesting me to merge my mod with Alesan's mod or Mari0: SE. With Alesan's mod I even thought, but then I gave up. With SE, it'd be almost impossible, and it'd make me loose one of the most important points of my mod: recreate some SE features and add brand new ones. They like my mod a bit, but they would rather ask me to merge it with other mod than use it alone. When it is about SE or Alesan's mod, no matter what features they have or don't, people don't ask <i>"Hey, Alesan, can you merge your mod with SE or Hugo's mod?"</i> or <i>"Hey, Maurice, why don't you add Hugo's mod features into SE?"</i>.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>I'm just keeping this mod because I want to feel like at least one project of mine were finished successfully. I want the <b>mission accomplished</b> feeling, the knowing that something <b>I</b> made entertained others. I already had this feeling once, but no longer. <b>No</b>, I'm not giving up or abandoning this mod (if it still wasn't clear). I just don't feel like it is as gratifying as I wanted.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>But Mari0 +Portal isn't the only thing I can work on! I can do many other different things, and I am doing it! Let's start with one of the most recents: the <b>HugoBDesigner's File Manager</b>! That's just an experimental project I'm working on, but, because it is experimental, doesn't means that it has to be incomplete or useless. I'm working on it for some time, but I'm just half the way to finish it. I posted it <a href="http://love2d.org/forums/viewtopic.php?f=5&t=77365" target="_blank"><b>here</b></a>, in a thread of LÖVE forums. This will be very useful when finished, because I'll be able to use the code of it in other projects. You know, in case they require you to open a certain file/folder or save/load/delete/copy/move files and folders. Just like a regular file manager, but built in LÖVE instead. Here are some images (and you thought there wasn't going to be images in this post):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIOcobNzN8TWVjO5EdauhUgIC_-yHljz1yfIe49RDn4JNCgoU0RFSInyBP7h-m4Glk9UV4IhqhwxeRFP8eU_WZ1Qo144AhbIkfljx5bUOUpbq2jZDXs2rA1qFowZyMNmBdGVidv8ZZJNU/s1600/Image2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIOcobNzN8TWVjO5EdauhUgIC_-yHljz1yfIe49RDn4JNCgoU0RFSInyBP7h-m4Glk9UV4IhqhwxeRFP8eU_WZ1Qo144AhbIkfljx5bUOUpbq2jZDXs2rA1qFowZyMNmBdGVidv8ZZJNU/s1600/Image2.png" height="240" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAy1xb_i32CN_a_l5pWn3DmffOn6UBlvLr30F__mU_liwG2n0mjioaTguUVK1zF9F6vYbQR4xRz4oTmTh3FtDx73Af9PCKbMcWPx8nDiFVmAnzm6tHu8Kn3OL2nmMoFx5WKx5F7fOfR5M/s1600/Update_Beta_4.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAy1xb_i32CN_a_l5pWn3DmffOn6UBlvLr30F__mU_liwG2n0mjioaTguUVK1zF9F6vYbQR4xRz4oTmTh3FtDx73Af9PCKbMcWPx8nDiFVmAnzm6tHu8Kn3OL2nmMoFx5WKx5F7fOfR5M/s1600/Update_Beta_4.gif" height="240" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCdPQS8bogMEptp0sD_fn_Spiln3lO52svFSos6ExxU_2cgwTBCiwPX5ZWzo1yag5Y8Ju99ZpGecsi1jjlrSalw7O09Pdmldii93fkNgXgavQA4NxRdvWcvyz4griVYW15iIn0VX7ruIE/s1600/screenshot_0002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCdPQS8bogMEptp0sD_fn_Spiln3lO52svFSos6ExxU_2cgwTBCiwPX5ZWzo1yag5Y8Ju99ZpGecsi1jjlrSalw7O09Pdmldii93fkNgXgavQA4NxRdvWcvyz4griVYW15iIn0VX7ruIE/s1600/screenshot_0002.png" /></a></div>
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>There are other small projects I worked on in the meantime, such as a small <b><a href="http://forum.stabyourself.net/viewtopic.php?p=93977#p93977" target="_blank">7 differences</a></b> game. But a big project I'm also working on - but not sharing - is a game by <a href="http://forum.stabyourself.net/memberlist.php?mode=viewprofile&u=236" target="_blank">Hans1998</a>. It is called <a href="http://forum.stabyourself.net/viewtopic.php?f=11&t=3817" style="font-weight: bold;" target="_blank">Lines</a>. Currently, we are in the planning and organizing phase, but we're slowly getting somewhere. And, hopefully, I'll soon start working on my very first own game, named █▀░■█▄▓ ▌. No, that's not the game's name, that's a joke. I'm not talking about it yet, because I don't want to show an unfinished project. This one is also in the planning and organizing phase, but I've got some levels done (in paper). This game will have 10 chapters (plus a level editor and a level downloader), and, until now, the first 2 chapters are mostly mapped out. I haven't any code yet, and I don't have any "showable" content yet, but as soon as I get it at least 95% done I will show you guys. This game will not be an <i>experimental</i> game, nor a <i>short</i> one. Not even a mod of anything. This one (and Lines, hopefully) will be a serious game I am planning to make. I'm not even sure if I'll sell it or not... I may or not sell it, but if I do, it will not be expensive: 5 dollars seems like a fair price for this kind of game. Also, I can't guarantee that I'd make it be sold, because, if I decide to sell it, I'll try to sell it via <b>Steam</b>, by sharing it on <b>Steam Greenlight</b>. And nothing guarantees that it will be available there. But, of course, it is just a matter of time until I can be sure of something.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>When I have something less <i>secret</i> about my game or Lines I will keep you guys updated. Thanks for reading 'til here (if you did), and I see you in my next post.Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-5875476712979113891.post-34050926928575431802014-03-07T12:30:00.001-03:002016-07-17T04:43:17.696-03:00Quick Update for Mari0 +Portal #11<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>It's been a looong time. How have you been? I've been really busy being <strike>dead</strike> busy. So, time for chat, GIFs and updates. Take a soda (I prefer coffee), relax, lie on your back, and apply <strike>immediate pressure to your temples</strike> attention to this post.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>First of all: why am I quoting so much Portal 2? I don't know, but that MAY be because I've finally played the game entirely. It also means that I made a few tests for it, but that's a topic I'll discuss in my next post. This next post will also include some other small projects I'm working on, along with some explanations for a few things. So, wait for that...</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Next subject: why did it took me so long to make another "Mari0 +Portal" update post? Well, it is mainly for two reasons:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>First , and most obvious, is that "Mari0: SE" went out. Most people who used to download my mod did it because I implemented a lot of features from SE, which they liked a LOT. Of course, I made lots of other new features (as you can see in this a many, many other posts), features that would probably never make it to SE (mostly because Maurice - Mari0's author - wouldn't want to "copy" features if they are well-know to a specific mod - in this case, mine - or it's author - in this case, me). For example: Commanders. Even though SE has an AMAZING animation system, you can do a lot more things with Commanders, such as play sounds, create texts/images in different colors, positions and scroll factors, change/create/destroy tiles, enemies and entities, change Mari0's variables, make variables by yourself (like a brand new score system) and many others.</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>No, I'm not saying my mod is actually BETTER than Mari0: SE (which means "Special Edition", in case you didn't know). I'm just saying that my mod has better features than SE in some things, as well as SE has better features than my mod in other things.</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>So, maybe you're wondering: why are people stopping using my mod if it has most of SE's features and some brand new ones? I don't know for sure, but I have an idea of why: Mari0: SE is more "official", since it is made by Mari0's author. I've put "official" on quotes on purpose. Mari0: SE wasn't officially released yet, but it is available for members of <a href="http://forum.stabyourself.net/" target="_blank">Stabyourself's Forums </a>(which I am, of course). Also, my mod - as most of you may already know - has a lot of bugs, due to the amount of things I try to add to it. Yeah, getting other's attention to a mod is not an easy task at all. I've had my "glory" days, though.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
The second reason I'm not posting too many updates (you thought I forgot to say about the second reason, didn't you?) is that I'm not working so much on the mod itself. No, I haven't stopped working on it, and I'll not do it anytime soon. When I say I'm not working so much on the mod itself is because I'm mostly focused on other projects. It's also because I'm a little bit sick, but that's not the subject here. I'll explain more about these other projects on my next post. It'll be just texty, so don't scroll down like crazy trying to find GIFs or anything (although I think I will post some images and, perhaps, GIFs).</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Anyway, I know you guys don't like <i>texty</i> posts too much (and use <b>tl:dr</b> to justify), so let's return to our GIF-spam-update-post-ish thing:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>First, one of the most important features in this update: boxes got their own commands. Not much yet, but you can already make some cool things with them, such as emancipate them...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93FjVlhGU1nUdHfM4Z46vujMd80-2MnRRV77AwrAMgtDr7mUUUftmM8LVh34hCVlPw62XhGttXsO80O8B6DIKMGT7gqweRJlpfp-LEJS1zVrISKLuocSsuCmja0I-PCTJ0g6Iu0xcK5I/s1600/FireCube_GIF.gif" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
...make them ignore emancipation grills...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFs0x-Ru1sQGn-zwoCSeqQhycSIO6AR0DrX-NTy5Y6tyuEKqtJ25seAlwWKC2cnRcwudXROIEkaIne8ORtDAbd3tMkdT1yC0sYV06jthliKA9yzn95voPkeGu3t5cn89GPUZTUzVnIEhk/s1600/EmanceCube_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFs0x-Ru1sQGn-zwoCSeqQhycSIO6AR0DrX-NTy5Y6tyuEKqtJ25seAlwWKC2cnRcwudXROIEkaIne8ORtDAbd3tMkdT1yC0sYV06jthliKA9yzn95voPkeGu3t5cn89GPUZTUzVnIEhk/s1600/EmanceCube_GIF.gif" width="400" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
...detect - with Environmental Triggers - when they're being hit by lasers...</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfCIAImlSusvPGsjCG6CEk502BoqRCa3WTNRSBwtfhyAQX_FHuXU4wYCJzhBHEv_VZoyiURZsWV4f09f7E66LSN1uVlyRhPNeaLBA3Jwr2kq1rpWtoohd-vOKmujh0Sy31b0Y4EaoCCqA/s1600/LaserBoxes_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfCIAImlSusvPGsjCG6CEk502BoqRCa3WTNRSBwtfhyAQX_FHuXU4wYCJzhBHEv_VZoyiURZsWV4f09f7E66LSN1uVlyRhPNeaLBA3Jwr2kq1rpWtoohd-vOKmujh0Sy31b0Y4EaoCCqA/s1600/LaserBoxes_GIF.gif" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
...and a few more, such as kill players when hitting them from above (like "smashing" the player), change their textures, make them ungrabbable (player can't grab), change their gel id (so you can make them have gel effects even if you haven't shoot gel on them nor spawned them with gel effects) and more!</div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>But, how am I doing these things if I haven't even made a multigui for boxes yet? That's simple:</div>
<div class="" style="clear: both; text-align: left;">
</div>
<a name='more'></a><br />
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>I added commands to Triggers! If you can't think of anything useful for it, here's a hint: you can use commands to change the state of whatever activated the Trigger - being it a player, a box or an enemy (not yet). All you need to do is specify a Trigger name - either in Commanders or in Environmental Triggers -, add commands after it related directly to the entity that is triggering it and you're done!</div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>But I've added a few other commands too, not only related to boxes. For example: do you know the "tremor" effect you get with the Sonic Rainboom cheat? Well, Maurice made it available for users in his animation system. So, why shouldn't I with Commanders?</div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRQSW7asKy7Cwv-bBdn-YAdKBJhORIex2ujcgzRWOCi72ZxUCytomsf8AnMSjO-qG2XAMKXTcNx-2bRFzo7SFpxAUMxQMcWlIA1lecIuJ7MGRnU2yvwuzll-2L4dCUFpIUZ-b3I_pb5S8/s1600/TremorCommand_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRQSW7asKy7Cwv-bBdn-YAdKBJhORIex2ujcgzRWOCi72ZxUCytomsf8AnMSjO-qG2XAMKXTcNx-2bRFzo7SFpxAUMxQMcWlIA1lecIuJ7MGRnU2yvwuzll-2L4dCUFpIUZ-b3I_pb5S8/s1600/TremorCommand_GIF.gif" width="400" /></a></div>
<div class="" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Oh, and have you noticed the player "flying" in the GIF above? Well, that's because I <b>finally</b> fixed the animation commands. Now you can make players walk, run, jump, crouch, move on vines and more, all by Commanders! This, plus the well-know control commands, such as <b style="font-style: italic;">player[n] disablecontrols</b> or <i style="font-weight: bold;">player[n] allowjumping [allowed/disallowed/always]</i> (and others, such as <b><i>allowwalking</i></b> or <b><i>allowrunning</i></b>) makes player controls much more "cinematic"!</div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>But we don't stop there! No way! I added a command to Environmental Triggers that will help you guys in a lot of brand new world of possibilities for mappacks: the <i style="font-weight: bold;">proximity</i> command. "What does it do?", you may ask. That's simple: it activates if the entity A is at an [n] distance or shorter from B. I'll explain it better: you can check if certain entities, with certain values or certain names, are next to each other by a distance equal to or smaller than [n]. In [n], 1 means 1 block. It works for players. boxes or enemies (not yet). you can do these commands to check players next to other players, boxes next to other boxes, players to boxes, and so on.</div>
<div class="" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNpVhF8tz1l9RoRrDaa-rSQFvy3A7f4z22-ioboWDlJlX91ZKQdWzRzdGBLzZUzdKFX5tRH2wxh0gTIJDHo0DliJQ1NsGPjkaeXNwiQNhTphomLpmIhrc6LrSKLDkAAnfp1PDcYmwR_NQ/s1600/ProximityDetector_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNpVhF8tz1l9RoRrDaa-rSQFvy3A7f4z22-ioboWDlJlX91ZKQdWzRzdGBLzZUzdKFX5tRH2wxh0gTIJDHo0DliJQ1NsGPjkaeXNwiQNhTphomLpmIhrc6LrSKLDkAAnfp1PDcYmwR_NQ/s1600/ProximityDetector_GIF.gif" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Along with new commands for Commanders and Environmental Triggers, new functions to Logic Gates would be very useful, right? So, I added two more of them: a "Random" gate and an "Adder" gate. The Random gate - as the name suggests - selects a random gate with the same name of the one being activated and activates whatever is linked to that one. The Adder gate changes sequentially between each gate with the same name to activate what is linked to them. But, as you may have already guessed, this system is different from other logic gates: instead of activating every gate with the same name - and therefore every entity linked to any of them -, these gates only activate one of the gates with the same name, which means that you must link every different entity (doesn't have to be a single entity per gate, though) to every single gate.</div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Oh, and, before you get confused, you don't need to link every gate with the same name: just one makes it work.</div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example 1: Multiple Indicators linked to multiple Random gates:</div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8MPo6f56rXopra-_0sooP39MghqxRtbyV-CHWPBLtilnPIxMW9YRmtp20k2WdYaLXd6wXSNQZEyeoR1wfLGq1nVK95ELJZuRdbYx3jh7gdem3ydjQ1DZl28SPsHPx7Ze81jk4XBdc8ks/s1600/RandomGate_GIF.gif" /></div>
<div style="text-align: center;">
<br />
<div style="text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example 2: Multiple Indicators linked to multiple Adder gates:</div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjppYC_9DOsEX3Q-qUGfw9tN_pzeYNDKfOVcR0RviX-LhDtT-NPcpTzo66TQ-UpG3XZWsg-Mj5YLiWNuwSOgLFYkQIoSTpg7iH74GjqPWZffCsSUNVSU6CM39QLiaGipCCNqMPz9VxgNI0/s1600/AdderGate_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>And how they're linked:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSpWgnWyGtVDuUIxZW7W1oyTmtxUPHBFZJwP80WLCMs3m5xg4fi-EXJlF-rxiIKz9loGIdVq0CcvfaNcAhHZYut7_Is_OEJUpczkpaw84TkJz_oyRxZXswIyZh0zokdih_URyWYBD6jRc/s1600/screenshot_0022.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSpWgnWyGtVDuUIxZW7W1oyTmtxUPHBFZJwP80WLCMs3m5xg4fi-EXJlF-rxiIKz9loGIdVq0CcvfaNcAhHZYut7_Is_OEJUpczkpaw84TkJz_oyRxZXswIyZh0zokdih_URyWYBD6jRc/s1600/screenshot_0022.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Keep in mind that the Adder gate activates gates with different names from left to right, up to down. That's why they're not linked in a circle in the image above.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Anyway, a very requested feature I've already tried to implement before without success is just done: linkable Emancipation Grills. Yes, I know, <b>finally</b>!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDp9G_XPoqSeMJnMFv6ja68EnUxizfNalTK0Isy-NmrBtH6_mc8O7vNZ-r2dVsQJmiQgZHe5NBjj7nAXTVeeAWKuLJGxSadBONubUAW2IGssphITm7aMel5rbZi8HQ-mWAPcL-F2uoUA4/s1600/EmancipationGrill_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDp9G_XPoqSeMJnMFv6ja68EnUxizfNalTK0Isy-NmrBtH6_mc8O7vNZ-r2dVsQJmiQgZHe5NBjj7nAXTVeeAWKuLJGxSadBONubUAW2IGssphITm7aMel5rbZi8HQ-mWAPcL-F2uoUA4/s1600/EmancipationGrill_GIF.gif" width="400" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Another entity that got a new feature was the Light Bridge. Before, you could even make them activate laser detectors. Now, you can also place gels on them, just like in Portal 2! Every gel keep it's effect on light bridges, such as Repulsion, Propulsion, Deadly, Slowness and so on. Of course, not the Conversion Gels (the whit for portal-able and the gray for non-portal-able). But it is still fun:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMVIz5m2BxcusQ2UH41hx5Ew-Ul8e7h3VjkqOLYv_C8yYT_8_FA7DQCeuF1_Sczx3NijycLNR9zzLJuc4E-Tll1bRNIQiNVQ7W-7-y-4HoXbBfwPX2OFXvxaAitZOrqZTMjNIfa1zOQaA/s1600/PulseCommand_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMVIz5m2BxcusQ2UH41hx5Ew-Ul8e7h3VjkqOLYv_C8yYT_8_FA7DQCeuF1_Sczx3NijycLNR9zzLJuc4E-Tll1bRNIQiNVQ7W-7-y-4HoXbBfwPX2OFXvxaAitZOrqZTMjNIfa1zOQaA/s1600/PulseCommand_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The Deadly Gel is blue here, but don't mind it.</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>I made it so you can even preset a gel property to the whole bridge, even if you redirect it with portals:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY897uIXWkBI8lBFX_uUJTmA2bnKxeKTMyBHKmuFtOdPPwwhx-ClUPqpuLr6QjtRD6mojyARhSmc1-wGI2000NUH6jg1Qswyv2i9OmMbc55Yo1pvaUtgGjgmTW8eomWqml9Ln5ojOC8B0/s1600/LightBridgeGelPreMade_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY897uIXWkBI8lBFX_uUJTmA2bnKxeKTMyBHKmuFtOdPPwwhx-ClUPqpuLr6QjtRD6mojyARhSmc1-wGI2000NUH6jg1Qswyv2i9OmMbc55Yo1pvaUtgGjgmTW8eomWqml9Ln5ojOC8B0/s1600/LightBridgeGelPreMade_GIF.gif" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Speaking of gels, I've took some time to work on one of the most requested features for my mod and for Mari0: SE: The Adhesion Gel. Yes, now you can climb walls and ceilings like if there were no gravity!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA7VHAbW1OcBjLyP7zP2tsgzJmxfWORwgQtz3HjtzhbAPCL7yHxPd8810FROg1eor2U09vWgsTqFpFtRZI2dVLL7su38F62RxHvqjJTMYBTPAENNkCpV_aDzrM57mA6r8KlICImWN9WAk/s1600/PurpleGel_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA7VHAbW1OcBjLyP7zP2tsgzJmxfWORwgQtz3HjtzhbAPCL7yHxPd8810FROg1eor2U09vWgsTqFpFtRZI2dVLL7su38F62RxHvqjJTMYBTPAENNkCpV_aDzrM57mA6r8KlICImWN9WAk/s1600/PurpleGel_GIF.gif" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Okay, that's fun, but <b>not enough</b>! I also added a master gravity direction variable, named "gravityside". That means that you can make the player fall upwards as default, even if he isn't on the Adhesion Gel! Since it is a variable, that means that you can set it either via custom variables or via <i style="font-weight: bold;">globalvariable</i> command for Commanders.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiawMVKdAssXKRaFhBdrLNJBFQwxBepofY8VvEM2Xpha25LTDiw7dJL6hEm171IAueZLNv8GJx26IdAHuDa7ocvffS1YBujesXlpc4_Lnggpwum5pIQ1KyL7SA2q0npV8y4D4-e3CnqiIE/s1600/SwitchGravity_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiawMVKdAssXKRaFhBdrLNJBFQwxBepofY8VvEM2Xpha25LTDiw7dJL6hEm171IAueZLNv8GJx26IdAHuDa7ocvffS1YBujesXlpc4_Lnggpwum5pIQ1KyL7SA2q0npV8y4D4-e3CnqiIE/s1600/SwitchGravity_GIF.gif" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>It works very well by itself, but Gravity side + Adhesion Gel = Lots of fun!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhayxURQrnQXwhMMRrtYNYQRURLtKUgq4Ovn3g2XKhWdP3tttpqvZCVt_s79KFKPN92HcbbcZxpJ6H3zO3-hFv5d6UcgTrf_ZCzpqksw4pvAXww6C4Oy52SMi4gSgQbLvvk19yJ7z_6-1M/s1600/GravitySidePlusGel_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhayxURQrnQXwhMMRrtYNYQRURLtKUgq4Ovn3g2XKhWdP3tttpqvZCVt_s79KFKPN92HcbbcZxpJ6H3zO3-hFv5d6UcgTrf_ZCzpqksw4pvAXww6C4Oy52SMi4gSgQbLvvk19yJ7z_6-1M/s1600/GravitySidePlusGel_GIF.gif" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>I hope you aren't tired or bored yet, because we have much more! I've made lots, LOTS of upgrades to the editor. It is just AWESOME now! For example: remember the "entities categories" feature? Well, I found something really annoying about it: even though you could arrange the entities as you'd like or as it's better, you still had to open the editor menu to change between entities on the same category. Never mind, you can now scroll easily through entities on the same category!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3nh_1BNVUsAmG_xLEx25zyKuEZ4ET27iHwcRxcUGxlgejZXwdSvf50DGlXtnprmeN8Ld5y7KGj5krasFYsrZsEdu2FdlurH3ybvSRD9lMI-rpOuAUi7bidD3gYadfVwVLMWJXWwYoN08/s1600/CategoriesTileWheel_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3nh_1BNVUsAmG_xLEx25zyKuEZ4ET27iHwcRxcUGxlgejZXwdSvf50DGlXtnprmeN8Ld5y7KGj5krasFYsrZsEdu2FdlurH3ybvSRD9lMI-rpOuAUi7bidD3gYadfVwVLMWJXWwYoN08/s1600/CategoriesTileWheel_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>And what about map width? It was a pain to make a big map when you had to click-like-crazy or hold-your-mouse-forever to get the map width on the editor. But that changes now! Just like I've already made with background's scroll factor, map widths can be typed in!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikc8jK-1jOc9ZrLAR9KuUgSjDSih0NgA994i7ZRK6hOYeS6LNELukMTEUlOVIdT2aSuMNdRf_LnYl9qlyJAno76l4j7keODSvguETGeWQCvEJOg6eBh89ZntuyeqRUtafogdwL1MqkWfE/s1600/CustomMapWidth_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikc8jK-1jOc9ZrLAR9KuUgSjDSih0NgA994i7ZRK6hOYeS6LNELukMTEUlOVIdT2aSuMNdRf_LnYl9qlyJAno76l4j7keODSvguETGeWQCvEJOg6eBh89ZntuyeqRUtafogdwL1MqkWfE/s1600/CustomMapWidth_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Time to get better! Isn't it annoying when you make a group of tiles (for example, a 2x2 square) but have to scroll between each tile? Well, you could "fix" it by using objects, but that wasn't efficient enough. I wanted it to be like that 2x2 tile on the default Portal tileset: one click and all tiles! So, I made it possible really easily: place your tiles in their positions, select them and press "Ctrl+G". You've just made a tile group!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIbdh0pQmmMcv66r6CGzCVIqMPg-jTwsXFjDveYNAmlzuce4qZannc0OOVuy5FjfFqpvWPBPgwy5YqtirY_lZ2FBdlug653Uve-duzNCyTsuKt3Rncsx5U7i_uUIGxDuvTfNOGP3UF3hw/s1600/EditorGroups_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIbdh0pQmmMcv66r6CGzCVIqMPg-jTwsXFjDveYNAmlzuce4qZannc0OOVuy5FjfFqpvWPBPgwy5YqtirY_lZ2FBdlug653Uve-duzNCyTsuKt3Rncsx5U7i_uUIGxDuvTfNOGP3UF3hw/s1600/EditorGroups_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEADcuVy7w0e5E2juPplIRcDGKSAb1hAyQVz5AzSyoli3UOtdOeAguaqE7x5S-dsM4ZiUHNVBCerocn2feYVU9yHtO9tCS1I6wU0XEsKliE_jGvzY9GPjXSIKyoqaSxsIfocKnSnow1kc/s1600/EditorGroupsUpdate_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEADcuVy7w0e5E2juPplIRcDGKSAb1hAyQVz5AzSyoli3UOtdOeAguaqE7x5S-dsM4ZiUHNVBCerocn2feYVU9yHtO9tCS1I6wU0XEsKliE_jGvzY9GPjXSIKyoqaSxsIfocKnSnow1kc/s1600/EditorGroupsUpdate_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Now with click-and-drag!</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>And, as you can see in the GIF, you can just remove groups by pressing "U" when your mouse is over the tile of the group (they're highlighted on green).</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>The groups can also support entities and entities data, just like objects!</div>
<div class="" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Objects... They're so cool and complete (now with the entities implementation), but they'd be a LOT better if we could also save linked objects - perhaps, to make a system of Commanders, Logic Gates and Environmental Triggers easier to add in multiple levels. Guess what? It is possible now!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsn3hyphenhyphen7gXDJ0ODowJyLg4QFMovCD3z2pNOKTnVXBGqwguWhFgjrPZsMb35NMyN7S1rHXh_8DEc6V2h43-aHV4XutTkdK9LtZtmxicjvP9LHElpsdKEomOIh3kbrbPxYgqR7b4ql4XUajg/s1600/LightBridgeGel2_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsn3hyphenhyphen7gXDJ0ODowJyLg4QFMovCD3z2pNOKTnVXBGqwguWhFgjrPZsMb35NMyN7S1rHXh_8DEc6V2h43-aHV4XutTkdK9LtZtmxicjvP9LHElpsdKEomOIh3kbrbPxYgqR7b4ql4XUajg/s1600/LightBridgeGel2_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJis6mCIU8AZh68d9pdi-JEGMAJcWevbdW8MHMGOmDvafkPPAswGJroAX9UQ6bZY3oo_-sS4sNUNOCV358qpVsJdcdrIjftPw1O4XSw7DT4d9HPG6PWJHS0qhph5cOX8stnyv2BiQ3rjU/s1600/ObjectsLinking_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJis6mCIU8AZh68d9pdi-JEGMAJcWevbdW8MHMGOmDvafkPPAswGJroAX9UQ6bZY3oo_-sS4sNUNOCV358qpVsJdcdrIjftPw1O4XSw7DT4d9HPG6PWJHS0qhph5cOX8stnyv2BiQ3rjU/s1600/ObjectsLinking_GIF.gif" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>But, as you know, you still have to find what object you've just created between those auto-generated weird names, until you exit the game, open it's file and rename manually, right? Wrong! I made that too. It was NECESSARY!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy9VxhuIyLH5mQiDKfyUg6NzR9JHE14TL0fQdk3Ey_nIsp88uM-BxbFnEGy5p2mbNcGctKYl9n7nP2mb_UCqbGE9pxUtfAvVNSZa8KV9goDFumQCjIUHPmz38gXK4dBof9H-ywyIodDto/s1600/RenameObjects_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy9VxhuIyLH5mQiDKfyUg6NzR9JHE14TL0fQdk3Ey_nIsp88uM-BxbFnEGy5p2mbNcGctKYl9n7nP2mb_UCqbGE9pxUtfAvVNSZa8KV9goDFumQCjIUHPmz38gXK4dBof9H-ywyIodDto/s1600/RenameObjects_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Here we get. The BEST feature of this update. The most required one. The one EVERYBODY wanted: Animated tiles! Yes!</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>I know, I know, I've already implemented them before, but they were very lousy. I've then removed temporarily it, until now! Animated tiles are just COMPLETE: they support properties (per tile), custom delays (per tile as well), looping and more! To make it MORE complete, I've also added customization to some properties, even if not animated. For example: coin blocks can have an specific tile ID to switch to when hit, coins tiles can give custom amount of coins...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGpGyG7nsLwCF0ks5ddiDrajJnqOoYmt1r37pjd0Z4Jwu0l306n9Gtbek5mLUXoOnUcmLlJn_aKtaeRumQWIP3J5kz2AjCCjrRNPEVgzUh3kBba74kkjJsFa8sm5n_dhOzBNrtflkzXRg/s1600/AnimatedCoinBlocks_GIF.gif" /></div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl4XHzv6TwQtMmLsBKDSsAYEq864xYQHSXcuLlUfifiIIFui7GpbIgG308PGIWYFjW0xro9FDlkRhgb0749LsX_MAYIE4HiEnJPEwyz__31qZriZzx7bpR9K9Q9KJevVIX3CllvRhSwnU/s1600/AnimatedCoins_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Even though I've shown you tons of new features, it eventually had to come to an end. If you were patient enough to make it 'til here, thank you a lot! And I see you in my next post!</div>
<!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F1.bp.blogspot.com%2F-gfSPVlbh-7g%2FUu9UlONikmI%2FAAAAAAAAE_Q%2FYrfI0SU954A%2Fs1600%2FGravitySidePlusGel_GIF.gif&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhayxURQrnQXwhMMRrtYNYQRURLtKUgq4Ovn3g2XKhWdP3tttpqvZCVt_s79KFKPN92HcbbcZxpJ6H3zO3-hFv5d6UcgTrf_ZCzpqksw4pvAXww6C4Oy52SMi4gSgQbLvvk19yJ7z_6-1M/s1600/GravitySidePlusGel_GIF.gif" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-AVsH0QF5zhQ%2FUu9UjWBJ_YI%2FAAAAAAAAE_M%2Fh4y74RjvpsM%2Fs1600%2FTremorCommand_GIF.gif&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRQSW7asKy7Cwv-bBdn-YAdKBJhORIex2ujcgzRWOCi72ZxUCytomsf8AnMSjO-qG2XAMKXTcNx-2bRFzo7SFpxAUMxQMcWlIA1lecIuJ7MGRnU2yvwuzll-2L4dCUFpIUZ-b3I_pb5S8/s1600/TremorCommand_GIF.gif" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F2.bp.blogspot.com%2F-KkcN4sj1DT4%2FUu9Ulc6pOXI%2FAAAAAAAAE_Y%2F4hBMDr1rh94%2Fs1600%2FEditorGroupsUpdate_GIF.gif&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEADcuVy7w0e5E2juPplIRcDGKSAb1hAyQVz5AzSyoli3UOtdOeAguaqE7x5S-dsM4ZiUHNVBCerocn2feYVU9yHtO9tCS1I6wU0XEsKliE_jGvzY9GPjXSIKyoqaSxsIfocKnSnow1kc/s1600/EditorGroupsUpdate_GIF.gif" -->Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-5875476712979113891.post-7753167812060855862014-01-15T21:28:00.001-02:002014-01-15T21:35:40.000-02:00Quick Update for Mari0 +Portal #10<div class="separator" style="clear: both; text-align: left;">
Hey, guys! Are you ready for updates? Well, let's give this a start and call it a day, right?</div>
<div class="separator" style="clear: both; text-align: left;">
This update is full of *AWESOME* new stuff, so keep tuned and don't miss anything!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
At first: What you can do with Mari0 +Portal already:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">GIANT COINS</span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO_LCaxKfTHlKAQZPdz1JEf1u7JU56CmaNoCx5cG-ldXLAONcjxzpf4tAAGOQHW9ylrWbG5oifCz94byAYk7KYCUW2Wi2Vo9QBG2hhG2VdrPVCzwCuQJB2uIiV03BG6DaZoRgahqyJlcM/s400/GiantCoin_GIF.gif" height="223" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBSUdq1Y1iOHH1cJMHjZFTvCD6YZgyFNH3iU7pLq7-B0_CAEU9fqSf_oswKOSWx6lYVmY2tWO7_zvMvkKi_Sc-TqyL-uLao02B0S6Zhquxuvi9sTIZdJ9LN8jZ4GeeUd7Rk0Uu34M9UU/s1600/HowTo_GiantCoin.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: #6aa84f;"><b> </b></span></span><b><span style="color: #6aa84f;">T1:</span></b> x: [pos x], y: [pos y], width: 3, height: 5</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: #6aa84f;"><b> </b></span></span><b><span style="color: #6aa84f;">C1:</span></b> overlaydata new image giantcoin [pos x] [pos y] frames = 10 speed = .1 loop = true</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: #6aa84f;"><b> </b></span></span><span style="color: #6aa84f;"><b>C2:</b></span> overlaydata giantcoin hide</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: #6aa84f;"><b> </b></span></span><b><span style="color: #6aa84f;">C3:</span></b> coincount add 150 (*this gives you 1 life and 50 coins more)</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: #6aa84f;"><b> </b></span></span><b><span style="color: #6aa84f;">C4:</span></b> scoreboard add 10000</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: #6aa84f;"><b> </b></span></span><b><span style="color: #6aa84f;">C5:</span></b> sound play coin</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">SUPER JUMP FIELD</span></b></div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhovA-o6vA0CRyEZTiNouF8bvFMppX3PYwPwpk5XPy7eXlAH1yzPeODfznD8p9vxG-Tcx3McNcoUjm0BJ5Ag3mB3ThRCP9f38Gt-Ff3DzfH5_79LUNSGTV-VCR7LbEHVx60LLZUovl-dAM/s1600/JumpField_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxXMr6oXVkvpNB7qmfGCZp-2X4LpkWd_Xap4PAhsVdc9eB4gSgBihEGJYND7IvoerbpKPq5_AzLVeWf3k9EPRnGb5JNx3MaUfPTKzTnc3KsvUfvMmnOSYxA500igQAttLu9vkpnSQqeOw/s1600/Jump+Field.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
<b style="color: #6aa84f; white-space: pre;"> </b><b><span style="color: #6aa84f;">T1:</span></b> x: [pos x], y: [pos y], width: 7, height: 7</div>
<div class="separator" style="clear: both; text-align: left;">
<b style="color: #6aa84f; white-space: pre;"> </b><b><span style="color: #6aa84f;">N1:</span></b> "is visible" = "no"</div>
<div class="separator" style="clear: both; text-align: left;">
<b style="color: #6aa84f; white-space: pre;"> </b><b><span style="color: #6aa84f;">C1:</span></b> overlaydata new image particleeffect [posx] [posy] frames = 8 speed = .1 loop = true</div>
<div class="separator" style="clear: both; text-align: left;">
<b style="color: #6aa84f; white-space: pre;"> </b><b><span style="color: #6aa84f;">C2:</span></b> globalvariable jumpforce = 16</div>
<div class="separator" style="clear: both; text-align: left;">
<b style="color: #6aa84f; white-space: pre;"> </b><b><span style="color: #6aa84f;">C3:</span></b> globalvariable jumpforce = 32</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now, a feature that I've already talked about, but never did... Until now: <b>Pixel collision</b>!</div>
<div class="separator" style="clear: both; text-align: left;">
What pixel collision does: it converts the non-transparent pixels of a tile into a mini collide-able point.</div>
<div class="separator" style="clear: both; text-align: left;">
This alone isn't much, so I finally took some time to fix the problems with the "going upstairs" feature. Now you can make curved tiles, stairs, slopes and much more!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8DQS5qpjDmp_LvoiSzHFM91j7TbMq-imqV9d5uCZWliWBEP1msKtGRfnOMxyCEB3-Kp5NRDml8iZk4opqDJl-cJlBcmHlvN1Tbr7ZaUGOWRXWQGXtwdb8QLsnN-WLadwG5YJtIkjX0rI/s400/PixelCollision_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8DQS5qpjDmp_LvoiSzHFM91j7TbMq-imqV9d5uCZWliWBEP1msKtGRfnOMxyCEB3-Kp5NRDml8iZk4opqDJl-cJlBcmHlvN1Tbr7ZaUGOWRXWQGXtwdb8QLsnN-WLadwG5YJtIkjX0rI/s400/PixelCollision_GIF.gif" height="223" width="400" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Oh, and another thing I fixed was the "Mario" gamemode. Before, it'd look like Mario holding a Portal Gun but unable to shoot portals. Now it looks like the original Mario!</div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeEMm46dPGoW3qd7LZiKkQNTHFNeC8hoKGCaot44Z2HvvBtGYv3ErmN7tZzXNkubd-9l66UVOeavQ5QreEvTSgprt_innVBwFgF3heP7-1VbJQ3MxPbl-50B25W9IQ3CQxPtVc2FavpE4/s1600/MarioMode_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Another thing you guys will just LOVE is a logical feature. Wanna make complicated stuff and advanced techniques using my mod? Allow me introduce... The <b>Logic Gates</b>! You can have up to 10 different types of gates, and you can set them to be visible or not. You can change their names so they don't interfere with any other circuit you might have! They are these:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxVewx5lakM93jzUOB3nK_SwiJixZst_xBTFbU541ncH-WySw2QxtJT3sFPkA1icbOkvH2sHgDAwJkwJ43Rjd4GZNZKNW-fAYZMwpiueMe2HW4zIpo0uWjL2dB3jO81bm50RWFKHN5Mhk/s1600/screenshot_0012.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxVewx5lakM93jzUOB3nK_SwiJixZst_xBTFbU541ncH-WySw2QxtJT3sFPkA1icbOkvH2sHgDAwJkwJ43Rjd4GZNZKNW-fAYZMwpiueMe2HW4zIpo0uWjL2dB3jO81bm50RWFKHN5Mhk/s1600/screenshot_0012.png" height="223" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
So now you can make puzzles with multiple buttons to open the same door!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN6Oqmn84O-59Z0K7pLNxlqHW8L_0nLFpdvcaKs-Stsy11GhepNV1rEtLCLTCjJ1QUnI0Fqp3Wz01gOkabXuvLb8rqDG5ixz2Eu9PFXEPGcYy-1O8jE3sJkrZ0EtpbIHLYkB6qyjgbCnc/s1600/AndGate_GIF.gif" /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_fUoGN6YfMveeNnu8_08g5LaEqfvMswFyV7z75h0NRtG352o8aHWMnRXSHkYxHTCI1o_S8uYhDyn41bUPGP8YGF97XzV72S5uVGrEmeXVnSISp33_4XQc4uc-AWjoadiD6jgYpSmEhwM/s1600/and_links.png" height="223" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Something I added that we really needed was Crushers (a.k.a "Mashy Spike Plates"). They are still bugging, but you can already change them really well, like changing their "forward" speed and their "backward" speed.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigvO0a-B9tJsjKwePlsF_eUwR_8_JHVqwtGJb-hnpZ9By5QclF73nQeqRvTIkxpEYbhKaGncDmCrlTGh9aSv4dfDG2_RY_YQGOQxunlaRKD_NzRyZwo4vaQCEnhgJCKvbH1zJNUpiCDEo/s1600/Crusher_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Another feature I wanted to add for some time but never did: the <b>Collider</b> entity. They're toggleable and can even block portals being shot through them. So now you can finally make invisible walls!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk87su8kAEwIhV0-WVZgBVosgENnf80Ag9l9AXy54GSo-FetRwO0rAuFtUu66p00mF9ovEcyCMy75Q3h03KBwkra_cJ8BEsQWi_7oFjOqSe5zM6G3OPXsPD3weYZuBaAEEMLWsd5IMaBo/s1600/Collider_GIF.gif" /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj17HbPPWhbBE1XSSnrgYswhOu7kLCxuiY-x7gd6ZnH9iduNQOAX4vFoyasQdhS5WmMHrzMFjGTs1oQ9C-sXw6XEc_ZwQlEy8hdp09Lr-gNJRkN_7me2Pi6rdbVTuWKQrk42LQP4gNVFwg/s1600/screenshot_0011.png" height="224" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
A small - but very useful - feature that can be customizable per mappack: Offscreen portals! You can toggle them via custom variables or via Commanders too!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2xgFtc6xl7_fD7zAe_OXmIi8nKLoXpUFUglHJvMRfVNP35RWzcFoIfRWB6IWXcrpAARqo5SN0EJ9yde395bL8w_Mivms9yDtPTbQQQVdAvY9LQgM7YaF-l_MyMRfffXsMLo0Xu0KRj5c/s1600/OffscreenPortals_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
And, if that's not enough, here's a feature that will REALLY help you guys while map-making: <b>Gel properties in tiles</b>! Yes, now, besides "Deadly", "Portalable" and "Non-Portalable", you can also have "Repulsion", "Propulsion" and "Slowness" too!!!</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhPQr6XCxnZXMWGKJ1dwDYj6E_BLE_EMgx6SSku4WiwPTazHJnEsko6upVdSuvsFrs7A_9MtUk8usQvHNogF9VEXEkfBW8baarXTW4yJ4kLZXg2V3cd_jmToE_KNH07g4oWgs0OGyWnQ8/s1600/RepulsionTile_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhPQr6XCxnZXMWGKJ1dwDYj6E_BLE_EMgx6SSku4WiwPTazHJnEsko6upVdSuvsFrs7A_9MtUk8usQvHNogF9VEXEkfBW8baarXTW4yJ4kLZXg2V3cd_jmToE_KNH07g4oWgs0OGyWnQ8/s1600/RepulsionTile_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Repulsion...</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyvLhKJNXeuIqql9XmVnAA3iQ9JSpLGBOLcQJRGndk82FsI_5HxqfoUrs_h92O8smbZ1m-NdFQSqqWJsWhF8hqrGnh7BgpJy0jL5q6Mj3clsenEo24P0JM9ybXCZ5SMuq43kkuCEGELj4/s1600/PropulsionTile_GIF.gif" style="margin-left: auto; margin-right: auto;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">...Propulsion...</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2exIRIIFDFfhUocFeRZYpLzCyrq21REx7KN80zmLCbhMC6j0RlcxmbI-_LGOHIzz-ExNyX2hkqHSrOBuRiGeYDrjbKNt0NJjFNeFNizw8kuxiD73uYDWm6-dm92cDjNcYz6upEVJS-_Y/s1600/RepropulsionTile_GIF.gif" style="margin-left: auto; margin-right: auto;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">..Repulsion + Propulsion (I like to call it Repropulsion)...</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5BkfvmSwCY8I4roQMIsd0cDi0K9IXlw65Dj9WlZY_aiEXk1i5Zx9vulRfiusT6PL46U8xqkvMp7FN5FZT3hCia4cjn8KwrsYAdl7LnKLtk5oaZCtpX7lgV26SMo62_ryH6l1Pqn4J0XI/s1600/SlownessTile_GIF.gif" style="margin-left: auto; margin-right: auto;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">...and Slowness!</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Of course, you can merge them, so you can make Slowness+Repulsion too, for example. You can even make them work with Pixel Collision, so you can have, for example, a half-tile with Repulsion:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsDOjFjIipUfc9smsaeH5Ld-IZ5I8CMzu-t_umYGzK5Opwrx1OxObn1LsvKvD9GjH9WVjxMEdc9n-Oi96NH2KC5GKRhH-QIMqMztk5sLFTFjXpwWye5E3yrKmycHFyjVV8JpyVXwWYOes/s1600/PixelCollisionProperties_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
One of the most funny features from Mari0 SE is spawning enemies. And even more funnier is spawning enemies via coin blocks/breakable blocks. But now it is possible too! Just place a Commander in one of these tiles or a Logic Gate. Still, you can do what you always could: put a coin entity inside it and link things to it. This way, you can do almost anything with coin blocks/breakable blocks!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-KxbDFFOWJDEduuXk37ZmvDvTCvO6ZBgUKS9KaD-VyXlC_NSKbAookR4Whlf-CDgclHplilU_go-Q_-Oy_79qxYp5Myrio6clmwAtiD9AVkfRzXuDJ5SaU9hxRf7kHXsHPX3porGNPBE/s1600/CoinBlockCommanders_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<span id="goog_896096496"></span><span id="goog_896096497"></span><span id="goog_1015482478"></span><span id="goog_1015482479"></span><br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiziIn9QhVu9XVaGrmunp-lsS6JqGtKubd4jY2qDNULgZmzqFB_M6DxpOqiQptwV-XfoMFOOR93stMvd1cZqqfD4gvT3fmsznay3giDQQ236NjzVHwaTu6B2w9k3VJCCYPpmdppKuJnz4k/s1600/CoinBlockGate_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimMSaJ_heJcwoKtHZMZbaUtEGBXFbmFu-dMTpV8B0w1Zd16QbM6LfATbeY0OibddqGLIffe-dsF1Dm29F3982c6x9A87zN7LONIZDjKuaiBcsIUbl_9iYwlmhrEh4zNnVHa2BaVVu_Z7A/s1600/RecordingTimer_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicqr6p5yBZta616lq-BWN934PsHSxO2LkeOjVXHJK-0a3wTrvDLnlTlisRK30FKt1eut9dkK9tg3lSEtnXGR63-Ps3UygNVUbIv6HIfPYIst_xdeOcVG2pAXBMjh259TrZaCFeRpr2c0k/s1600/CustomCoinBlocks_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Not a feature, but something already possible that is still interesting to show: you can not only make Portal Gun pedestals with Triggers and Commanders, but you can make pedestal for other game modes, like a pickaxe for "Minecraft" or a "Portal" gun for Gelcannon:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaVvJaXGVj2fHqCXg-wunBxPct_tV7ffLkIoI42JVIhdXyeF3s9R9wrTtPwbzREnTKGvitfdgi0R0vQhD5fT1knJ2xmvv1MgpGyFW9My80v5NeOxPnmT_dBfD0GjccUxLrPwWGaxN6S5o/s1600/GelcannonPedestal_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You can even add an empty pedestal for "returning" the Portal Gun by switching to "Mario" game mode...</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And, now, with all these awesome features with Commanders, Environmental Triggers, "overlaydata" commands and Logic Gates, you can get REALLY advanced! For example: an advanced circuit to detect if the player is jumping very much and with small intervals between each jump:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoEzIVO0itcptQXuuCDt2jgy7fUZIpn-Vom1gW2i4D8w_DSpT8SdTtHWWW6dDoTPcBwED2TlkFbIWSSF_CqXjEXMEHJRABp-3krM0rUb2eKRCFbdzvZIfxQ7OXEFNbTgzdx8Hv5JI8quw/s1600/Variables_GIF.gif" /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsXq8xFn7bKwhsU1DeXfYGOPyLzAyP_gwGMIrbQk8NsY4pCPE0ywinEtImeA3nD1wtWnf7jXe36h9FpprXWlph25JZV7IWweBzKK278FP7O1xQNiyigjKispJzzPDeqNazU3rAZasHeHc/s1600/screenshot_0013.png" height="223" width="400" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
But sometimes you can get crashes with Mari0 +Portal. Is it an excuse to stop customizing stuff on your mappack? Of course not! Now the game has it's own background image for the crashing screen, and you can customize it on your mappack...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghHe81lAH4T-VtDSQPJfPFxrxAXQjgrREExZ582g1lWSha_Sl9Sl3Q5DG3RxOMPyieEqmP_bAkGy4uBfseAHXyAIRrMLk5fTVksZTeUlNGPmS7szNYqh5F6PZl1-3xJh1w-SDVtbxgSfQ/s1600/ErrorScreen.png" height="223" width="400" /><br />
<br />
<br />
<div style="text-align: left;">
But we don't like bugs and crashing screens, do we? No, we don't. What do we like? We like Triggers! And what about their cool feature of setting what triggers them? Well, you know what is missing with it? An option to detect portal shots, right? Well, this feature plus enemy spawning allows you to make some pretty interesting things...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9STIPIJ5iSqvV_1z8otExyzvB3g-neqsEr81Nt8EM7xXyi2WLlV0OBsf6Y_WgsQORYjpX5CuvPdk8zNxuduNxZ8oefnwtkcMZJuNwTzhpQiTDTJ6lhYD-ORHORtYR4CtG5selwi503h4/s1600/PortalShotDetector_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Along with them, another small feature that would be really interesting for puzzles would be laser detectors to detect Light Bridges. Many mappacks I've played (and even some mappacks I made) added this feature by "improvising": we used to add lasers in front of light bridges, so you can stand on them (like light bridges) and detect them (like lasers). No longer: now light bridges and be detected by laser detectors, but, of course not as default (which could be a problem). You can set if they're activated by lasers, light bridges or both!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo0GQpYxWE2wdrSJXELaWSQmBd3BAKFql7IZPZQyrfbF7KHDEFfpUpSCo-z7xo_Zvtn2DILiz4bHdnZ7FEUXQnPdveYR9UBSesBuo5mNd-nydDwM5OPwLM2Q_kbhFqIpSr_HUZpq46wiQ/s1600/LightBridgeDetector_GIF.gif" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
But that's not all yet: one of (if not THE) main features of the next update comes in High Definition. Literally.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Take custom textures at scale 1...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj83KHcEui2ME16iAgZ_jExnrXwZir9TyK1Ekcp1-TiQHF0mHq-nZoek5WNbW2NpVVGVpEatupFZflMT9E_pWsBRKn2hCHmBcLGosUCQ50UHSfPAtO318IIYQHFqgT1x11MfHyshja1IvY/s1600/screenshot_0014.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj83KHcEui2ME16iAgZ_jExnrXwZir9TyK1Ekcp1-TiQHF0mHq-nZoek5WNbW2NpVVGVpEatupFZflMT9E_pWsBRKn2hCHmBcLGosUCQ50UHSfPAtO318IIYQHFqgT1x11MfHyshja1IvY/s1600/screenshot_0014.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyBbrivlyGtMClTCTASYESUKFmDzrKg30LuAScZ8SEaS8aJ4xjqLsQPtAWWE6So1-g0cau-uS3eUast-gBzfbw0PKA-ReDRYkcT4GHTg7CrYGkquNEbPmgaqN-5_0xyg2KBGgrCg-jPY8/s1600/screenshot_0015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyBbrivlyGtMClTCTASYESUKFmDzrKg30LuAScZ8SEaS8aJ4xjqLsQPtAWWE6So1-g0cau-uS3eUast-gBzfbw0PKA-ReDRYkcT4GHTg7CrYGkquNEbPmgaqN-5_0xyg2KBGgrCg-jPY8/s1600/screenshot_0015.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
...and at scale 2:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiodTp9vV2PPQ2jNfCmuMpmA7vqJ35jt9AbUzC5QvTUNLizwghq3YT_O3wh-KsF0OXk8Ii_qhJfKlYyf0AVeP3inhtb-uGhfxhALBunok0QHY8W2AIeW2ClEPlzClKOZQ2Q8IipTjXvbh4/s1600/screenshot_0016.png" /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6PIjsiaemhjf67iikENGj6I3_fLU7FgQ1Q9KKW4rp25QVZWMVarS_F6htEG6TcsxZSCYxSpIG4P_yCjFrRAkyk-PBiTCCn8j3dYe9HBFn6rTTsfpUwLE8HwLOmYO1UU_Oh_MZqVpT4Xk/s1600/screenshot_0017.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Much better, isn't it? Well, you'll be able to customize everything in HD. For example, gels:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9oynN1xDoEKQXqvd9pt58hVM6_T0AQu4f1GdO7Ab4tsNmMXk9MmxxJ0ahHQwiCqGOqCyY3hiAp5ezmQtf8PDr6tqrGssV2vcfgaRfXnfJoajftI5y2jkpaWI8yxDemIaWtKGmB_6hDmA/s1600/screenshot_0014.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9oynN1xDoEKQXqvd9pt58hVM6_T0AQu4f1GdO7Ab4tsNmMXk9MmxxJ0ahHQwiCqGOqCyY3hiAp5ezmQtf8PDr6tqrGssV2vcfgaRfXnfJoajftI5y2jkpaWI8yxDemIaWtKGmB_6hDmA/s400/screenshot_0014.png" height="223" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Something suggested to me and I think would be really fun to add to the game: deadly fireballs. But, OF COURSE, not as default: you can set if the fireballs that a certain player (or all them) will kill other players. You can also set this if you're spawning fireballs via Commanders. You can set the player ID and if the fireball kills others.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOycGE8f3GtMNkAtvG_CiS3Xw4LZAn4gfxYS21-AMqgLGubMcuGkHnypnt_nk9jOzlWJDQ0A4BHICTVPJm4qHkpOXjwJvd1iOzHoRBz1ID6C2g-cn_4M5pZbFPDHZAn2rvzboZOa_fqk0/s1600/KillingFireballs_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOycGE8f3GtMNkAtvG_CiS3Xw4LZAn4gfxYS21-AMqgLGubMcuGkHnypnt_nk9jOzlWJDQ0A4BHICTVPJm4qHkpOXjwJvd1iOzHoRBz1ID6C2g-cn_4M5pZbFPDHZAn2rvzboZOa_fqk0/s1600/KillingFireballs_GIF.gif" /></a></div>
<br />
<div style="text-align: left;">
I know, the fireballs in the GIF above looks like stopped in midair, but they're falling. The reason they look like floating and the reason of the GIF being faster than normal is that now you can change the recording speed via custom variables. So you can record faster GIFs now...</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Last, but not least, here's a very useful feature for your mappacks: variables! Yes, they were added before, but they weren't working properly. Not only that, but variables can be detected via Environmental Triggers. So you can make counters and custom scores!</div>
<div style="text-align: left;">
But, if that's still not enough for you, here's our last feature of today: variables can now be loaded/saved on your mappack! If you don't know why would this be useful, here's a hint: achievements! Since you can load/save variables, you can save a variable as "true" if you make something in your mappack (this thing could be an achievement) and, if an amount of variables are saved as true, you get something. You can also save, for example, variables to detect the player's smallest time in a mappack (VERY useful for race mappacks). Here's an example:</div>
<div style="text-align: left;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCu8-a19HbF7Q06GhZsWmAGrH8AXmamc5HIfBegsFsisCsgAwyyRMg2M3VqURrCs5ZGUfeMvjjwv7Qo-V5rGQWHfK0mq8PyYJTmJQD6P8abx7PO2nzBeKcuoU-wDi_GlrClUQUjjiER9o/s1600/LoadingVariables_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCu8-a19HbF7Q06GhZsWmAGrH8AXmamc5HIfBegsFsisCsgAwyyRMg2M3VqURrCs5ZGUfeMvjjwv7Qo-V5rGQWHfK0mq8PyYJTmJQD6P8abx7PO2nzBeKcuoU-wDi_GlrClUQUjjiER9o/s1600/LoadingVariables_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The indicator lights are there to show you in<br />
what situation they show the achievement.</td></tr>
</tbody></table>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
And, as you might have seen in the GIF above, "overlaydata" now support "fadein" and "fadeout" commands. You can also set for how long they'll fade.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I hope you liked this update, and I see you in my next post!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<br /></div>
</div>
<!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F1.bp.blogspot.com%2F-IDw2rcvfhXE%2FUtV_hNg8uOI%2FAAAAAAAAE3M%2FrskeFhqjPrQ%2Fs1600%2Fscreenshot_0015.png&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyBbrivlyGtMClTCTASYESUKFmDzrKg30LuAScZ8SEaS8aJ4xjqLsQPtAWWE6So1-g0cau-uS3eUast-gBzfbw0PKA-ReDRYkcT4GHTg7CrYGkquNEbPmgaqN-5_0xyg2KBGgrCg-jPY8/s1600/screenshot_0015.png" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F3.bp.blogspot.com%2F-wQltDIs0wlY%2FUsfum5r6DNI%2FAAAAAAAAEuM%2F2g7QAEAHrM4%2Fs400%2FPixelCollision_GIF.gif&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8DQS5qpjDmp_LvoiSzHFM91j7TbMq-imqV9d5uCZWliWBEP1msKtGRfnOMxyCEB3-Kp5NRDml8iZk4opqDJl-cJlBcmHlvN1Tbr7ZaUGOWRXWQGXtwdb8QLsnN-WLadwG5YJtIkjX0rI/s400/PixelCollision_GIF.gif" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-SZheAj7j9VE%2FUtGUy4WtKWI%2FAAAAAAAAE0g%2F45H7LVAp7GA%2Fs1600%2Fscreenshot_0012.png&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxVewx5lakM93jzUOB3nK_SwiJixZst_xBTFbU541ncH-WySw2QxtJT3sFPkA1icbOkvH2sHgDAwJkwJ43Rjd4GZNZKNW-fAYZMwpiueMe2HW4zIpo0uWjL2dB3jO81bm50RWFKHN5Mhk/s1600/screenshot_0012.png" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F1.bp.blogspot.com%2F-dOW7klEIPeQ%2FUtV_hAc11DI%2FAAAAAAAAE3I%2FoDkXO6igmEA%2Fs1600%2Fscreenshot_0014.png&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj83KHcEui2ME16iAgZ_jExnrXwZir9TyK1Ekcp1-TiQHF0mHq-nZoek5WNbW2NpVVGVpEatupFZflMT9E_pWsBRKn2hCHmBcLGosUCQ50UHSfPAtO318IIYQHFqgT1x11MfHyshja1IvY/s1600/screenshot_0014.png" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F3.bp.blogspot.com%2F-oYGsEcbePCw%2FUs75tyuSTWI%2FAAAAAAAAEy8%2FmBWCCWnLNBg%2Fs1600%2FRepulsionTile_GIF.gif&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhPQr6XCxnZXMWGKJ1dwDYj6E_BLE_EMgx6SSku4WiwPTazHJnEsko6upVdSuvsFrs7A_9MtUk8usQvHNogF9VEXEkfBW8baarXTW4yJ4kLZXg2V3cd_jmToE_KNH07g4oWgs0OGyWnQ8/s1600/RepulsionTile_GIF.gif" -->Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-5875476712979113891.post-51990651258496686182013-12-28T04:54:00.001-02:002013-12-28T05:01:56.286-02:00Quick update for Mari0 +Portal #9<div class="separator" style="clear: both; text-align: left;">
Are you ready for updates? I'm sure you are. So, let's take a closer look on how Mari0 +Portal v0.9.6 actually is. When I say "actually is" it means <a href="http://forum.stabyourself.net/viewtopic.php?p=88615#p88615" target="_blank">you can already download it</a> to check all the stuff shown below!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
First of all: Overlay data! Remember in my last "Quick Update" when I showed you the power of Overlay Data commands? Well, now they also allow you to change the pre-made elementsfrom Mari0. For example: think of that puzzle where you wanted to remove the player's name, score, coin count and all the rest from the screen. Now you can! Or that "Sonic-based" level where you wanted to change the time limit color to show the player that he'll die if he stays for too long underwater. Now:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQjWdCzMMe_OgF4dtqUeoIMN4GR9tLVn7McSVDRstGnuKUSRCyvCYz8b3XpNnqzh4m0RObZHyfxrFNZV9d3m5mM0XhNh_EHWSiFSFrRXeGk4sbkUcDKE300zN2zmJ3XhIJdfBjdoKTVLQ/s1600/OverlayData2_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQjWdCzMMe_OgF4dtqUeoIMN4GR9tLVn7McSVDRstGnuKUSRCyvCYz8b3XpNnqzh4m0RObZHyfxrFNZV9d3m5mM0XhNh_EHWSiFSFrRXeGk4sbkUcDKE300zN2zmJ3XhIJdfBjdoKTVLQ/s1600/OverlayData2_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And Overlay Data can not only use variables for changing values. You can now change their values directly! This, together with Environmental Triggers allow you to make, for example, a jump counter without modding anything, but only via Commanders!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgunbAj69AwsJumvzl79RbkQizW2joe7HdDlFnXx2Um-jrzLImRgzhJSlQ1RgS7PvcfoKswtXm3q8ck95FgOGBd0O-Vy8X8PGkIzjSIHEkk16yH4ij0q9kkRIStUjqUT3pM0Dqq_7ejJks/s1600/OverlayData3_GIf.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgunbAj69AwsJumvzl79RbkQizW2joe7HdDlFnXx2Um-jrzLImRgzhJSlQ1RgS7PvcfoKswtXm3q8ck95FgOGBd0O-Vy8X8PGkIzjSIHEkk16yH4ij0q9kkRIStUjqUT3pM0Dqq_7ejJks/s1600/OverlayData3_GIf.gif" /></a></div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCmXgBWvTWfqzWU49JTRAkTEJMYTyhFqXDsdSFuX2HnUjoeOm73B_5KhfVZ8g1vAl1yVC7Ljxb5BgjKPY64udKGsM0z9-Q82rYvsJEef-NkfBUiqxNAib8T4aE1baZR12WZ97Rrx6mw0/s1600/screenshot_0010.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMCmXgBWvTWfqzWU49JTRAkTEJMYTyhFqXDsdSFuX2HnUjoeOm73B_5KhfVZ8g1vAl1yVC7Ljxb5BgjKPY64udKGsM0z9-Q82rYvsJEef-NkfBUiqxNAib8T4aE1baZR12WZ97Rrx6mw0/s1600/screenshot_0010.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">This is all you need for the Jump counter!</td></tr>
</tbody></table>
<br />
Underwater entity is pretty fun, isn't it? But sometimes it's hard to add them and select areas when they could simply be underwater with a tile property. No longer! Take underwater tile property!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgreGWITY1arpmCo0Bka_1zYPbGCPIkFQNmRgf_Ixfrih5q4wGU-TKKfxy9NudsOqkMA3ZvMCSjF4J2nad8okckoTIZK0pltcIxxfXVUXgVCulDAVrOuzZHFOsBZLqwIvAIJrqSzss-2YY/s1600/UnderwaterTile_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgreGWITY1arpmCo0Bka_1zYPbGCPIkFQNmRgf_Ixfrih5q4wGU-TKKfxy9NudsOqkMA3ZvMCSjF4J2nad8okckoTIZK0pltcIxxfXVUXgVCulDAVrOuzZHFOsBZLqwIvAIJrqSzss-2YY/s1600/UnderwaterTile_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And here's the updated tileset guide for properties!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasZIriaHq7uSN7qSXhbrWaL2b0j5X0jKDgtzc4EO1Zt2YOAFdq3pXtUpjgHxqIdbMScSqP0axNkRT48H9Ya0YLUF7wNwOtQMyquwsz7BNMzuqODAfphF8c8SNTgq80YVDDRcuiH4FYx0/s1600/Mari0++Portal+tileset+0.9.6.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasZIriaHq7uSN7qSXhbrWaL2b0j5X0jKDgtzc4EO1Zt2YOAFdq3pXtUpjgHxqIdbMScSqP0axNkRT48H9Ya0YLUF7wNwOtQMyquwsz7BNMzuqODAfphF8c8SNTgq80YVDDRcuiH4FYx0/s1600/Mari0++Portal+tileset+0.9.6.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I have something you guys will love! Remember before when you had to search for entities and had a hard time finding them? And when you needed their IDs or some tile ID before placing them? Allow me introduce: "Entities Categories"!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuwdLSpG3Ifp4ReJFHQyd1rwfOYMNJnTyz1HRdcRakt3M1mOC6ArWZDn8SgU0QCczhBBHwsRIRgcY_E7RZPDKO8e91GW7dOCp5R7VpHvd2wl9xuMjuTAc3aegkwc5IWB2831V5N-T1Zo0/s1600/EntitiesCategories_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuwdLSpG3Ifp4ReJFHQyd1rwfOYMNJnTyz1HRdcRakt3M1mOC6ArWZDn8SgU0QCczhBBHwsRIRgcY_E7RZPDKO8e91GW7dOCp5R7VpHvd2wl9xuMjuTAc3aegkwc5IWB2831V5N-T1Zo0/s1600/EntitiesCategories_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you liked custom boxes then you'll love this: boxes can now have "offset" textures! So you can make, for example, glowing boxes, boxes with spikes (probably you will want to add it when the box is covered with acid gel) or Christmas gifts with ties!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBTe909o3ET6GxLYzVdWYbfyIRYyS1OLd57cakdOuYPCKdSnj6jSsJmRCTKAdNFFYBnggwfy-xss1x226uoT4VPPLS0TOhnm3DmYV2m4wTeEXCWW61ItofgUl42q-P1pzhBCWlNNTw3Y/s1600/BoxTextures_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBTe909o3ET6GxLYzVdWYbfyIRYyS1OLd57cakdOuYPCKdSnj6jSsJmRCTKAdNFFYBnggwfy-xss1x226uoT4VPPLS0TOhnm3DmYV2m4wTeEXCWW61ItofgUl42q-P1pzhBCWlNNTw3Y/s1600/BoxTextures_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Let's now talk about Triggers. They're cool, their resizing system is awesome, but if you want a Trigger to open a door and not open it from the other side you'll have a hard time, right? You know what would help? Customizable sizes for them? Not only resizing, but using decimal values! Now you can do it in-game!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpeEyGgTqsWpfAEJvRc_mDSbu5jJg_z1-Nm_RaWUVUQhBJecPQS5waGyhdoEC0uJDE6tpzRiMytQNZ0U2OBT8R9alj0yLhCqc-F3P1bnqlr6T4o2xtRqDs7FdQILh9gylS41R7Z6P4hbI/s1600/TriggerPrecision_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpeEyGgTqsWpfAEJvRc_mDSbu5jJg_z1-Nm_RaWUVUQhBJecPQS5waGyhdoEC0uJDE6tpzRiMytQNZ0U2OBT8R9alj0yLhCqc-F3P1bnqlr6T4o2xtRqDs7FdQILh9gylS41R7Z6P4hbI/s1600/TriggerPrecision_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And remember when I showed that Triggers can be triggered by specific entities with specific values? When I showed that you still weren't able to change them in-game. But now you can, by pressing "T".</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB9Khhdk6EOUVn1R0NTSFESe7Y17HIG9niY0Djs2vf3Sd-FeGKYiB5nxu1ffhkaldLqJR7niY_itZ6Kg19R4-PBXk5g04hxobtNdF-8zYDg7yB1uTDiPztk1jI8-LJyu1YgaG1IN-vs98/s1600/TriggerSpecification2_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB9Khhdk6EOUVn1R0NTSFESe7Y17HIG9niY0Djs2vf3Sd-FeGKYiB5nxu1ffhkaldLqJR7niY_itZ6Kg19R4-PBXk5g04hxobtNdF-8zYDg7yB1uTDiPztk1jI8-LJyu1YgaG1IN-vs98/s1600/TriggerSpecification2_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Back on the topic "editor improvements". I always had problems placing entities bigger than their "icons". For example: gel dispensers. That's why I made entities show their full images when editing them!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwopl06UX6c0mpUuEEHt_1wDev6Lq8v5Gon0g23wbB-jVGnrzExkiPEBBgT__F3JxEnAYc_7KPpng-5fmGiGq7tkMd3iH5mURcNwDFYgAD-oIoa8shxbZA96NXniQLLMB37Qax1yirHdE/s1600/screenshot_0002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwopl06UX6c0mpUuEEHt_1wDev6Lq8v5Gon0g23wbB-jVGnrzExkiPEBBgT__F3JxEnAYc_7KPpng-5fmGiGq7tkMd3iH5mURcNwDFYgAD-oIoa8shxbZA96NXniQLLMB37Qax1yirHdE/s400/screenshot_0002.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYTvReiRt_uTmAwg0IKEeSvOPytmYLmeagzFQQ5A_D8qPuK74pF5UM-IFMlQhj1UsXdPvl8fgzRTqS16eAsM5gVabUFtg7QLEvqenI7wPdCfYenD2F_9E0xDlEVP5rLBmMTGJ23h5uxDA/s1600/screenshot_0003.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYTvReiRt_uTmAwg0IKEeSvOPytmYLmeagzFQQ5A_D8qPuK74pF5UM-IFMlQhj1UsXdPvl8fgzRTqS16eAsM5gVabUFtg7QLEvqenI7wPdCfYenD2F_9E0xDlEVP5rLBmMTGJ23h5uxDA/s400/screenshot_0003.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Bowser placement was a nightmare. But with my mod it no longer is!</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
Remember those entities I added a looong time ago, called "Custom Indicators"? They were 15. I removed them, because I wanted to improve them. Like make them from whatever size you want, with whatever texture you want and even animated! Guess what?</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3EHIeU1ts4bUhMJ_BcmuTQhP32Zuu2XHOkp3RMReIF_2xbF2830-oIYmbskJDDzHvistS8tJXFoIJ_t36mXikilHq3Cx7qPsu_xotqQiuZx7UrdO2YYJnQRfMwjo5J1uku6eRKBHWqOc/s1600/CustomIndicator_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3EHIeU1ts4bUhMJ_BcmuTQhP32Zuu2XHOkp3RMReIF_2xbF2830-oIYmbskJDDzHvistS8tJXFoIJ_t36mXikilHq3Cx7qPsu_xotqQiuZx7UrdO2YYJnQRfMwjo5J1uku6eRKBHWqOc/s1600/CustomIndicator_GIF.gif" /></a></div>
<br />
And that's how simple it is to edit them:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbjpyl2CBrPJNsZ-EVKFdCl6EV4YBPr9vHxzgu26BH7NH0xMGkhySW3J0n9PSVoKtSq9m3oRTGy2vTuRL_zokAwLZl8GB0EhUeAC7GN9kE8jr1fFIBVPUd7jzuoShaE0PeSVkmZT2qPwY/s1600/screenshot_0007.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbjpyl2CBrPJNsZ-EVKFdCl6EV4YBPr9vHxzgu26BH7NH0xMGkhySW3J0n9PSVoKtSq9m3oRTGy2vTuRL_zokAwLZl8GB0EhUeAC7GN9kE8jr1fFIBVPUd7jzuoShaE0PeSVkmZT2qPwY/s400/screenshot_0007.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Other thing I always had problems with: gels. They're very cool, but there could never be placed two or more gels in the same tile. But here's my solution for it:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqByCbUFFDW5nzVJSJK0j8LZ3n49y7F7y1cGIq6lH1XkqXE99M2PQtYXVsRXOlPO6vr-Jozu2FQyASbI843z8dHe5Qxdov8SqRNIAEqM5aRuU2HHUM8BtXxjVWncjpOTS2n9gdtTCPng/s1600/screenshot_0008.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqByCbUFFDW5nzVJSJK0j8LZ3n49y7F7y1cGIq6lH1XkqXE99M2PQtYXVsRXOlPO6vr-Jozu2FQyASbI843z8dHe5Qxdov8SqRNIAEqM5aRuU2HHUM8BtXxjVWncjpOTS2n9gdtTCPng/s400/screenshot_0008.png" width="400" /></a></div>
<br />
And what you can do with the new "Gel" entity:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMNqcjdKP1r2u7JUKAf554nKLPmS719qAOYDGAHuDjMczRwPd1w3tQNZ8tr2TREMVk0Tbrdbgi1WyTBAlFLAU7yfSD-6fcTmJUJG2sJR4UMO5IvVKjk7Tpn56wL6vXkY6fyXiaVj1g_og/s1600/screenshot_0009.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMNqcjdKP1r2u7JUKAf554nKLPmS719qAOYDGAHuDjMczRwPd1w3tQNZ8tr2TREMVk0Tbrdbgi1WyTBAlFLAU7yfSD-6fcTmJUJG2sJR4UMO5IvVKjk7Tpn56wL6vXkY6fyXiaVj1g_og/s400/screenshot_0009.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
At last, but not at least: Faith Plates. I love them, but I always wanted them to work like in Portal 2 or Mari0 SE: custom launching values and options to activate/deactivate them. But Mari0 +Portal is here to help you! Select their force and link them to something, and you're done!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgznOBAy1NPMUAclEOBCfEA5PfnLnOH3G3C_CSeWY1hwQm59Yo_somZGX61jJUKBVtG3VfVrM1z1GZiJmcYEHX_qMT_TwrKKD4TqQuZjdSFmNm8OE1Ec0GLhpnfBYkwu1OppiDCSMHpThU/s1600/Faithplate_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgznOBAy1NPMUAclEOBCfEA5PfnLnOH3G3C_CSeWY1hwQm59Yo_somZGX61jJUKBVtG3VfVrM1z1GZiJmcYEHX_qMT_TwrKKD4TqQuZjdSFmNm8OE1Ec0GLhpnfBYkwu1OppiDCSMHpThU/s1600/Faithplate_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I hope there were enough GIFs for a single "Quick Update". So I see you guys in my next "full of GIFs" post!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>EDIT:</b> guys, forgot to say: "Not gate" entity can now be hidden, useful for puzzle mappacks!</div>
Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-5875476712979113891.post-31565982365725043132013-12-20T00:28:00.002-02:002013-12-20T00:33:52.255-02:00Quick Update for Mari0 +Portal #8<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
Have you guys liked the Trigger entity I made? Well, you're probably thinking: "All it needs is a system to resize and move the triggering area". If you thought on this, you don't need anymore! It is finally working!</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCTYTb3zLjcSNlMsA9FbVw7dzKWzGj4iA5a6fppFFv9__hyphenhyphentLTWL5sa5sOYO8hmdelo_uai3o4gIUcXRXZX5VBuSPx57x5AvM5cyCJ0nhAHtaAGexjmEvvkRqPfwCNCoXNxLtH5Io1Oog/s1600/Triggers_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCTYTb3zLjcSNlMsA9FbVw7dzKWzGj4iA5a6fppFFv9__hyphenhyphentLTWL5sa5sOYO8hmdelo_uai3o4gIUcXRXZX5VBuSPx57x5AvM5cyCJ0nhAHtaAGexjmEvvkRqPfwCNCoXNxLtH5Io1Oog/s1600/Triggers_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
But if you don't like the idea that only players can trigger them, it now support multiple entities! But if you need to be EXTREMELY SPECIFIC, like "only players and boxes with id 2 and gel id 1", then:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYSRSrk3QIoHh32OlET5l9-R5v5iOXSbo8i-69YFIPNCZJGepD-wxSveGr71j5Gw77FwjiXwKR1lEdUrY-YtxzClEmVVJyQwBP4NNy2k1KfxW9pEFRNhnAENfch9ADmAJJu75stH9XKy4/s1600/TriggerSpecification_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYSRSrk3QIoHh32OlET5l9-R5v5iOXSbo8i-69YFIPNCZJGepD-wxSveGr71j5Gw77FwjiXwKR1lEdUrY-YtxzClEmVVJyQwBP4NNy2k1KfxW9pEFRNhnAENfch9ADmAJJu75stH9XKy4/s1600/TriggerSpecification_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you have already played a few puzzle mappacks for Mari0, you probably had to fight with a problem: removing portals. I know, it's extremely annoying when you place 1 wrong portal and you want to remove it, but ends up removing both. Well, that's not a problem anymore! Hold your "removing portals" key/button and press the key/button for the portal that you want to remove and ta-da!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJQqO7iMzSwkRmNms53a71Gcz5PkcYo02kdfhsuq7Vr7k_2ZFfTFXNhHpflEZt-kykL32AgPLEXX90VqntOCdTMw9h3z7MmajkOlAxLb-MiZDRx5rpB1_Xw4ffHodOr5eDh4XwYVx-TPU/s1600/PortalRemoving_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJQqO7iMzSwkRmNms53a71Gcz5PkcYo02kdfhsuq7Vr7k_2ZFfTFXNhHpflEZt-kykL32AgPLEXX90VqntOCdTMw9h3z7MmajkOlAxLb-MiZDRx5rpB1_Xw4ffHodOr5eDh4XwYVx-TPU/s1600/PortalRemoving_GIF.gif" style="cursor: move;" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
But that's not all, is it? No, you want... Let me see... A portal gun pedestal! Well, I haven't made it (and I'll probably never do it), but... Do you remember that "Mario" player type? Well, it simulates the player normally, except that the player can't shoot portals. You can use Commanders to change the player type to "Portal" and use a Trigger to do that. Use some decorative tiles to simulate the pedestal and you can call it a day!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoHwiwsKmhvrplV0lvPfTXApPGHSm0r4PTtfd8omWyjDjVPMJ_EUm67xR09FuwpxsE2jaXFOem5lMe4O3PjqzO0Rxtc0XRg9B_ClNMIi6B0gxzp6hhd8vLyUdrn7V8pjUBCj_SJIvaubE/s1600/PortalPedestal_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoHwiwsKmhvrplV0lvPfTXApPGHSm0r4PTtfd8omWyjDjVPMJ_EUm67xR09FuwpxsE2jaXFOem5lMe4O3PjqzO0Rxtc0XRg9B_ClNMIi6B0gxzp6hhd8vLyUdrn7V8pjUBCj_SJIvaubE/s1600/PortalPedestal_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
But that's not enough yet, is it? NOOOO! You want more. What you want now, a command that spawns Stars, Mushrooms, Hammers, Fireballs and 1 ups? That'd be impossible to be done! Would it? No way! Your wish come true on Mari0 +Portal!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ShZBcbEMCcLxWAsZ7U_Fd9zZLNJx10ouY3TQVhNye_EijbX39WL4KPF7co6qwXaBwfC1qtQVx9yoglBQzK5jOMkoyMapm2K_UuMMUfumIdCnsSdjXpuHSDebYp4UNm2O9hDPfLm4Zds/s1600/Stars_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ShZBcbEMCcLxWAsZ7U_Fd9zZLNJx10ouY3TQVhNye_EijbX39WL4KPF7co6qwXaBwfC1qtQVx9yoglBQzK5jOMkoyMapm2K_UuMMUfumIdCnsSdjXpuHSDebYp4UNm2O9hDPfLm4Zds/s1600/Stars_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5HF0_iV1-Gd7FNf8T3Cdm08SPMvWvq4NToFjCeMrGokpX1imnH-SS6n4QynjUy82SdYIYbRyFc7zXlmujfvbCtdGzWkZZpwHbYzFPalobWVUc-oksGqAloWbQ4_7ElnrcuRxKKF3jdxU/s1600/GelDrops_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5HF0_iV1-Gd7FNf8T3Cdm08SPMvWvq4NToFjCeMrGokpX1imnH-SS6n4QynjUy82SdYIYbRyFc7zXlmujfvbCtdGzWkZZpwHbYzFPalobWVUc-oksGqAloWbQ4_7ElnrcuRxKKF3jdxU/s1600/GelDrops_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPuuHpTZUTp2aK2HVu9Oavo3rn6F3-biTcVl8csaNH1_Xs8C9RtBciv_-L3IElD1C1UYhHypfrkaLVwpTZH5rPWVMaIpeeOEss3xWHTbGThgfQKTwZWxXrnfH2F4PDuwCf0CmAfbjLti8/s1600/Hammers_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPuuHpTZUTp2aK2HVu9Oavo3rn6F3-biTcVl8csaNH1_Xs8C9RtBciv_-L3IElD1C1UYhHypfrkaLVwpTZH5rPWVMaIpeeOEss3xWHTbGThgfQKTwZWxXrnfH2F4PDuwCf0CmAfbjLti8/s1600/Hammers_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Changing the game's variables via text isn't enough for you, is it? Well, I'm sure it's not. You always want more! Well, Commanders can do this work now!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHQRd7qL2eKx04yR6xFQ63WCc0TtnHUAPFE57GpDaCI4XJs2Dw0tG46RJBZKhvjWPF-Aq6CP19hS1XCT1JTiKgdmPTWuHao1ho_u-ZkicZIXPNzTtspsWJD3myyW3Vg1YMWKXJ-pDpPFc/s1600/ChristmasTest_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHQRd7qL2eKx04yR6xFQ63WCc0TtnHUAPFE57GpDaCI4XJs2Dw0tG46RJBZKhvjWPF-Aq6CP19hS1XCT1JTiKgdmPTWuHao1ho_u-ZkicZIXPNzTtspsWJD3myyW3Vg1YMWKXJ-pDpPFc/s1600/ChristmasTest_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Oh, come on! Are you still reading this text? Do you still want more? What do you think I am? A coding machine? Ok, what is it? What you want now? Wait, what? Commands that can draw images, texts, numbers and variables anywhere on screen with whatever color you want? And toggleable? It's enough for me, I'm NOT gonna do it. Don't make a "sad-dog" face for me, I'll not fall for it. Awn! How cute! Okay, okay, I do it for you, but just this time, ok?</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghRo_F07EjREUm_eEg9op9ZrizDdHbC6yJXmey8ih3R-NVCd6DKcPDoEbPuVzASeR1sOGTxY1kq1I4FZwPUkbGVjVAtDI3O5PYXH-HgINF7egAFCHyKOaj9KwwdOaAqTNhqlIDS_cWZP4/s1600/OverlayData_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghRo_F07EjREUm_eEg9op9ZrizDdHbC6yJXmey8ih3R-NVCd6DKcPDoEbPuVzASeR1sOGTxY1kq1I4FZwPUkbGVjVAtDI3O5PYXH-HgINF7egAFCHyKOaj9KwwdOaAqTNhqlIDS_cWZP4/s1600/OverlayData_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now you want it to stay when you move with the screen? That'd be so hard to do! Well, actually, it'd be easy, but I'm not gonna do it. Okay, if I do it you stop asking me things, right? So take this:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3x-6zazb3iG74T0USrYk5YTV5W1hl8Qd-mVA9g6ZYRdlB7G0X7OBto8qazS1gD005BXCj89Nje0HWNgNba_5HMchwBFLZR8k0-XpJWG0iCZwjIXf6IBqQ2mELiXTkBXngOQdNC0Dq1Vg/s1600/OverlayDataScrolls_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3x-6zazb3iG74T0USrYk5YTV5W1hl8Qd-mVA9g6ZYRdlB7G0X7OBto8qazS1gD005BXCj89Nje0HWNgNba_5HMchwBFLZR8k0-XpJWG0iCZwjIXf6IBqQ2mELiXTkBXngOQdNC0Dq1Vg/s1600/OverlayDataScrolls_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
WHY DON'T YOU GO AWAY AND STOP READING THIS TEXT? I'm tired, OK? I want my bed, drink a coffee maybe, but I'm not doing anything else! It's enough work for today!</div>
<div class="separator" style="clear: both; text-align: left;">
WHAT? You want more work for me? This never ends? Oh, it's the last request? OK, I hope it is. WHAT? An underwater entity? With customizable area, like Triggers? And toggleable? Oh my God... All right, all right, take your request:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgboU0_MgIbe1iusEal7NX0ZfaEohLyEcHNtHuFz8SNNUY9kweT9vGp3_RFEqoUD3zbe4pX18oYZCiU2NTqA1DgaDf7nUAUSaTFAqLPUNnlws306mLaP7ayECC-bYxc1DQbWwIiOY-SL0c/s1600/Underwater_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgboU0_MgIbe1iusEal7NX0ZfaEohLyEcHNtHuFz8SNNUY9kweT9vGp3_RFEqoUD3zbe4pX18oYZCiU2NTqA1DgaDf7nUAUSaTFAqLPUNnlws306mLaP7ayECC-bYxc1DQbWwIiOY-SL0c/s1600/Underwater_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglKqddAJYWFKJd959VBtaEdThi2jwnGRd2QSe1B0WJox5ZWJNCj92sBbj8x624DnwogOfO8iy5k-IP4UnyOoXRU3v9HutmwSwj9oBj1YuZ78jfpZc9bFrFye74jhV7UTLXs7nupY773OI/s1600/Underwater2_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglKqddAJYWFKJd959VBtaEdThi2jwnGRd2QSe1B0WJox5ZWJNCj92sBbj8x624DnwogOfO8iy5k-IP4UnyOoXRU3v9HutmwSwj9oBj1YuZ78jfpZc9bFrFye74jhV7UTLXs7nupY773OI/s1600/Underwater2_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It's enough for a "Quick" Update, isn't it? Well, I see you in my next post!</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-5875476712979113891.post-88429497956989810152013-12-07T18:29:00.000-02:002013-12-07T18:31:41.072-02:00Quick Update for Mari0 +Portal #7<div class="separator" style="clear: both; text-align: left;">
Do you like the gel effects in boxes? Well, if you already tested it in my newest update, you may have noticed that you can't place gel if you're grabbing a cube, and releasing a cube against a gel will make the game "see" the gel as a wall, and put the cube behind you. Well, now that's fixed!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO-F-4wKN2hK8fppix_qOWYKzJp_xH_6XCk_-EmNnQ5iMZw4rEifAgRMXFqoBJkT0MDBs2D07ZnyTS55TOnqPpdbq_oPujuaoX1a8Y8IefWTNdlq3ExPznWiFZZTRptJGf_a_IDlWyhiY/s1600/GelCube_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO-F-4wKN2hK8fppix_qOWYKzJp_xH_6XCk_-EmNnQ5iMZw4rEifAgRMXFqoBJkT0MDBs2D07ZnyTS55TOnqPpdbq_oPujuaoX1a8Y8IefWTNdlq3ExPznWiFZZTRptJGf_a_IDlWyhiY/s1600/GelCube_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Do you like portals? And automatic portals? Do you wish to make a "Blue Portals" in Mari0? Well, now you can too!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioUZz3iopUBhZj87u0xR7Nn3liabhVxzxQrhR13ErXdaZqjcm0KpU8khGl_CBiVobR2GJX6svbFao8JCzDVEVPIWheffHOy_bkfrcDeL7RhUdrAbMQleea8TpyWZvHLUp5M398edygT5k/s1600/AutoPortals_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioUZz3iopUBhZj87u0xR7Nn3liabhVxzxQrhR13ErXdaZqjcm0KpU8khGl_CBiVobR2GJX6svbFao8JCzDVEVPIWheffHOy_bkfrcDeL7RhUdrAbMQleea8TpyWZvHLUp5M398edygT5k/s1600/AutoPortals_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Do you like to emancipate Companion Cubes? And do you like the particle effects they make after passing through the emancipation grills? Besides you're a murderer, now you can murder them with style!</div>
<span id="goog_1929270060"></span><span id="goog_1929270061"></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrFcGtr_9DQkUT2fvLaAfgkDHuADlzhpwYrbyE4_q05QsR26IvaejD4wcVq74b0aDkjp8ckNKdl2q7XNDIQbl2jMkIP9OdXUIk9VIxjoPGnf8qapA5Um2lxOnRNbjzNik7QYSOgCcOy0/s1600/Emancipation_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKrFcGtr_9DQkUT2fvLaAfgkDHuADlzhpwYrbyE4_q05QsR26IvaejD4wcVq74b0aDkjp8ckNKdl2q7XNDIQbl2jMkIP9OdXUIk9VIxjoPGnf8qapA5Um2lxOnRNbjzNik7QYSOgCcOy0/s1600/Emancipation_GIF.gif" /></a></div>
<br />
Do you like custom sounds? And an unlimited source of custom sounds for musics, sound effects and dialogues? Well, this feature was already added a long time ago, but never worked. Now it does!<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="224" src="//www.youtube.com/embed/VguQdrmyDCE" width="400"></iframe><br /></div>
<br />
Do you like bugs? And bugs that crashes your game whenever an enemy is in it? Well, neither do I, but now you don't need to worry about it anymore, because Qcode (a great user from <a href="http://forum.stabyourself.net/" target="_blank">Stabyourself.net</a> forums) fixed it for me!!!So, I see you in my next post!Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-5875476712979113891.post-91400514741453867692013-11-25T02:49:00.001-02:002013-11-25T02:49:27.076-02:00Quick Update for Mari0 +Portal #6<div class="separator" style="clear: both; text-align: left;">
Do you like in Portal 2 when cubes are covered by Repulsion Gel and start bouncing around through the chamber? I love it. So why not add it to Mari0 +Portal? Not only that, but also making cubes slide quickly if they're covered with Propulsion gel... And what about a cube you can't touch, like if it where... hmm... covered with Deadly gel? Yes, this all is now possible.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfKBJduFg5mJDy17Orpw_aXO-jqVHWpWwH2wqbaCfdZXSEEMT4D4fRGCG1VNsj2RDTnkvXVIO46vhAVrAcEPg0VzqbsanYL8BC-b4jWZhwHxDcKjuqOEe2Alt3uIt6hraK1EMpGA-9S0s/s1600/BouncingBox2_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfKBJduFg5mJDy17Orpw_aXO-jqVHWpWwH2wqbaCfdZXSEEMT4D4fRGCG1VNsj2RDTnkvXVIO46vhAVrAcEPg0VzqbsanYL8BC-b4jWZhwHxDcKjuqOEe2Alt3uIt6hraK1EMpGA-9S0s/s1600/BouncingBox2_GIF.gif" /></a></div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj49VPfBBZY8St-XOlAaGnzrGtK645uRToJIsmtpfzZB6b2XLlToOgvcRZVhb5CJsaqLZZT1gMC7V2xB04vvDcczrRlkJo2eeHgVzCvkS5ZqQtyuWjNpGUvG1oGIzBVN4h3GfVPTYWa4nA/s1600/BouncingBox3_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj49VPfBBZY8St-XOlAaGnzrGtK645uRToJIsmtpfzZB6b2XLlToOgvcRZVhb5CJsaqLZZT1gMC7V2xB04vvDcczrRlkJo2eeHgVzCvkS5ZqQtyuWjNpGUvG1oGIzBVN4h3GfVPTYWa4nA/s1600/BouncingBox3_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Now you can have commands to spawn boxes. They're organized like this:<br /><b>"enemy spawn box [pos. x] [pos. y] [speed x] [speed y] [box id] [gel id]"</b></td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs0CthRqwBHTg6rMOK7yNQGOvGvs1_mMfFf2JPm7e0mUO7ASmOFAHzJpSWiORQVALfEFpQcvsw9CJR0FZA9kT2x3hUVp2CSKec443uGGaWUuWjChivdBDgdUETBmNEoRLXmxRG9wXEcbg/s1600/QuickBox_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs0CthRqwBHTg6rMOK7yNQGOvGvs1_mMfFf2JPm7e0mUO7ASmOFAHzJpSWiORQVALfEFpQcvsw9CJR0FZA9kT2x3hUVp2CSKec443uGGaWUuWjChivdBDgdUETBmNEoRLXmxRG9wXEcbg/s1600/QuickBox_GIF.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYdMVOs2gn1uVlb0TFRuteOk203gMMAGXflhuWBN_jGHMZY1GkZZF7aZD5DH-SPZX_DbNqQdYe6BFEg8uG44pnj-pdYV5kEOaEciueXiq-ydui_PRIYsMUdtg5pnuSdH4KK8QjnozdWfc/s1600/BouncingBox4_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYdMVOs2gn1uVlb0TFRuteOk203gMMAGXflhuWBN_jGHMZY1GkZZF7aZD5DH-SPZX_DbNqQdYe6BFEg8uG44pnj-pdYV5kEOaEciueXiq-ydui_PRIYsMUdtg5pnuSdH4KK8QjnozdWfc/s1600/BouncingBox4_GIF.gif" /></a></div>
<br />
And you know what else? They should also go slower sometimes. So, why not have a Slowness gel?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHZlA9vvliXjGhbwV56cy7imUQNnk5frPqpTRVShTmF7_LYAns5_LmSBxsZpud7gs_-ahRezB6F9c17uugl6Ff52imLhjxgC-yJop7ChswldL1aamdINIUdvrhdGzSMWFEryDrpIbw8wk/s1600/SlowBox_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHZlA9vvliXjGhbwV56cy7imUQNnk5frPqpTRVShTmF7_LYAns5_LmSBxsZpud7gs_-ahRezB6F9c17uugl6Ff52imLhjxgC-yJop7ChswldL1aamdINIUdvrhdGzSMWFEryDrpIbw8wk/s1600/SlowBox_GIF.gif" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_9nJslnvmaqTDtaxWRICRH50k8YT7g4pDUKkQngIxmG3sdVDgrHTIRjGxCTKWtCsmyPp-kTnYXgsbwBGaBD_b_rftcbXmKwjmZ1pnfnukXRoLKAQz2f-12UjJ-Xr8tgfwf0Xtuq4S9oQ/s1600/SlowPlayer_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_9nJslnvmaqTDtaxWRICRH50k8YT7g4pDUKkQngIxmG3sdVDgrHTIRjGxCTKWtCsmyPp-kTnYXgsbwBGaBD_b_rftcbXmKwjmZ1pnfnukXRoLKAQz2f-12UjJ-Xr8tgfwf0Xtuq4S9oQ/s1600/SlowPlayer_GIF.gif" /></a></div>
<br />
And a bonus: something I wanna finish for the Christmas:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk_1j1Lv_tORYCQzprnwCgeP_jem6ZibN6YaB2TlnEvbzGWDoTub4cqnrf8mYzs-ss17kXeNJXMQxel2ola6Zf_RH4iOjWSU4-g-uGQ-dC2dR6TPEjssJXzW0nrKF5ruyDBUGUPcBPHFU/s1600/ChristmasTest_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk_1j1Lv_tORYCQzprnwCgeP_jem6ZibN6YaB2TlnEvbzGWDoTub4cqnrf8mYzs-ss17kXeNJXMQxel2ola6Zf_RH4iOjWSU4-g-uGQ-dC2dR6TPEjssJXzW0nrKF5ruyDBUGUPcBPHFU/s1600/ChristmasTest_GIF.gif" /></a></div>
<br />
There are too much GIFs for a single Quick Update. So I see you guys in my next update!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-77339044595104048842013-11-16T22:28:00.004-02:002013-11-16T22:39:16.408-02:00Quick Update for Mari0 +Portal #5Have you ever played Portal or Portal 2? Well, there are some things on these games that we don't have in Mari0. But some of them can be already seen in Mari0 +Portal 0.9.3 prerelease. For example: remember the Portal crosshair?<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://images.wikia.com/half-life/en/images/d/d4/Portal_crosshair_last_blue.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="196" src="http://images.wikia.com/half-life/en/images/d/d4/Portal_crosshair_last_blue.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Image by "Half-Life Wikia"</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://images.wikia.com/half-life/en/images/b/bd/Portal_crosshair_no.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="196" src="http://images.wikia.com/half-life/en/images/b/bd/Portal_crosshair_no.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Image by "Half-Life Wikia"</td></tr>
</tbody></table>
<br />
Well, now they can be added to your mappack easily:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZE_JkPpMSrF4F4P1FCLjQ4mwYskFz0YB17IokMPbZb1VwbsbM9niMm_7J6UWh8Gv7J54oBbU9kg163KiLufY-NijwP4jtPyZz7oJk8ghgUsMuy2-sVWg5ga-FElkNUcybVlj7bHbcys/s1600/GameMouse_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZE_JkPpMSrF4F4P1FCLjQ4mwYskFz0YB17IokMPbZb1VwbsbM9niMm_7J6UWh8Gv7J54oBbU9kg163KiLufY-NijwP4jtPyZz7oJk8ghgUsMuy2-sVWg5ga-FElkNUcybVlj7bHbcys/s320/GameMouse_GIF.gif" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Detects every possibility of portals and grabbing cubes!</td></tr>
</tbody></table>
And even a special one to the menu (decorative, you don't need the mouse in the menu):<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLR3SqQttcHddsXC5NLlcvP0XwCPJpLI1b9KkVk7D5hQvv5UOpMuhyxdRV-bOIBQhluopaEQnt8FYBlRjCwiZemf2ipuRiOYIjd1tenDh3yqRLsSCuw7NG_m8wUcRX5-RbS1V2DsehyRM/s1600/MenuMouse_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLR3SqQttcHddsXC5NLlcvP0XwCPJpLI1b9KkVk7D5hQvv5UOpMuhyxdRV-bOIBQhluopaEQnt8FYBlRjCwiZemf2ipuRiOYIjd1tenDh3yqRLsSCuw7NG_m8wUcRX5-RbS1V2DsehyRM/s320/MenuMouse_GIF.gif" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">One of infinite possible pointers...</td></tr>
</tbody></table>
And the best of all: they can be customized per mappack! You can make them however you want. But I must say: in order to get the quality of the images, you'll have to make one image per possibility. In the total, it'd be 288 images for the portal crosshair plus one for the menu pointer! But you can use/edit the ones shown in the GIFs above:<br />
<br />
<a href="http://www.mediafire.com/?9t06fqwp6uzvihn" target="_blank">Custom Mouse Pointer - Download</a><br />
<br />
To make your own pointers, you must name the textures like this:<br />
<b>a-b-c-d-e(-f)</b><br />
<b><br /></b>
<b>a:</b> The portals you can shoot (<b>0=</b>none; <b>1=</b>Portal 1 only; <b>2=</b>Portal 2 only; <b>3=</b>Both Portals).<br />
<b>b:</b> "<b>true</b>" if Portal 1 exists, "<b>false</b>" if not.<br />
<b>c:</b> "<b>true</b>" if Portal 2 exists, "<b>false</b>" if not.<br />
<b>d:</b> Last portal shot (<b>0=</b>none; <b>1=</b>Portal 1; <b>2=</b>Portal 2).<br />
<b>e:</b> "<b>true</b>" if grabbing a cube, "<b>false</b>" if not.<br />
<b>f:</b> Optional: overlay according to player's portal (<b>none</b> for default; <b>1=</b>Portal 1 color; <b>2=</b>Portal 2 color).<br />
<br />
Other than that, there's now a feature I've always wanted to have, but I've never known how to do. But now that I know how to program using LUA and LÖVE, I decided to add. It was EXTREMELY EASY to add, just took me 2 minutes, but it's pretty awesome:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkJUndKWXn7kfXOEWjXCjPwV7cBOk4Zh-hEh0MvxLRCJeSON5gPCbK43BICdbXxsfLcCxnr4NY-LqpGz8we9GVzBZ88vz9W-o39tOHyJn5ZeI8L38bR0xWVWqaiLlVTJQhf_CenYtabXM/s1600/BouncingBox_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkJUndKWXn7kfXOEWjXCjPwV7cBOk4Zh-hEh0MvxLRCJeSON5gPCbK43BICdbXxsfLcCxnr4NY-LqpGz8we9GVzBZ88vz9W-o39tOHyJn5ZeI8L38bR0xWVWqaiLlVTJQhf_CenYtabXM/s320/BouncingBox_GIF.gif" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Bouncing cubes!!!</td></tr>
</tbody></table>
Another thing I wanna add in the future is making boxes bounce by being merged on gel...<br />
<br />
Also, another thing noticeable in the GIF above is that boxes can now be spawned like enemies. they're not enemies, but they work like one. Just put a Commander with the command:<br />
<span style="font-weight: bold;">"enemy spawn box [x] [y] [speed x] [speed y]"</span> and you're done!<br />
Also, if you wanna download it, just check my thread on <a href="http://forum.stabyourself.net/viewtopic.php?f=13&t=3477&p=74876#p74876" target="_blank">Stabyourself forums</a>!<br />
<br />
But that's all for this update. Thanks for reading and I see you in my next post!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-68643724122733964152013-11-03T17:32:00.000-02:002013-11-03T17:32:28.288-02:00Quick Update for Mari0 +Portal #4Now we're getting always closer to the 0.9 update. But, 'til there, here are somethings I've already made:<br />
<br />
Staircase feature: Now that you'll be able to have invisible colliding blocks (with the Collider entity, that I haven't made yet), and now that you'll be able to have custom collisions per tile (with the Pixel Collision property, that I also haven't started yet), there's something that was worth it to be done: staircase features! You can "climb" objects (like tiles or cubes, for example) if they're half-a-block higher than you (or less). So you can now simulate half blocks from Minecraft and you'll not need to jump to get on top of them!<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2A7pWugdbd1YzE2u5ZwdY7759Af_e5tdTPFhhwTtfTaYfQ6mpzXhYgDcrmlCwEhsqKbrBFy2KxTpO7RpNrEjnkK6B5A5vNrJAbq_Qv2rMiRCLNLpugwGBAC-q8pI2yqb5BS3T6Ix6Y00/s1600/Staircase_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2A7pWugdbd1YzE2u5ZwdY7759Af_e5tdTPFhhwTtfTaYfQ6mpzXhYgDcrmlCwEhsqKbrBFy2KxTpO7RpNrEjnkK6B5A5vNrJAbq_Qv2rMiRCLNLpugwGBAC-q8pI2yqb5BS3T6Ix6Y00/s1600/Staircase_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Why jump if you can walk?</td></tr>
</tbody></table>
<br />
Another feature I worked hard on was a cheat bar (just like in Minecraft or Source games). Just press "c" on your keyboard and have fun! They use the same commands from Commanders (in fact, this is a Commander, but exclusive for players).<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg88eye4FSY9et8XnTrvPY_1IzQQQ84MJGe9oywbvcM8IGMCCJzODhmgFwct_oVQn3brwWBx4WekU4VVSxKfcv4UlADWh8GMs_zetkHC8Ur9UY9sqF-orUiqU9mZGnXN6lGQDhvXhLJog8/s1600/CheatsCommander_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg88eye4FSY9et8XnTrvPY_1IzQQQ84MJGe9oywbvcM8IGMCCJzODhmgFwct_oVQn3brwWBx4WekU4VVSxKfcv4UlADWh8GMs_zetkHC8Ur9UY9sqF-orUiqU9mZGnXN6lGQDhvXhLJog8/s1600/CheatsCommander_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">No needing of sv_cheats 1!!!</td></tr>
</tbody></table>
<br />
I made both features have an option on variables to be disabled. If you have custom variables on your mappack and want to disable both, just add <b><i>goesupstairs = false</i></b> and <b><i>cheatcommanderallowed = false</i></b>.<br />
And I see you guys in my next post!Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-5875476712979113891.post-87315026164485792142013-10-28T17:43:00.000-02:002013-10-28T17:43:01.824-02:00Quick Update for Mari0 +Portal #3The Environmental Triggers will now provide a <b><i>timeloop timeOff timeOn</i></b> command, that'll give you constant pulses of output:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHXHD90qnS49YoaP7UT8MdyMiJlXfeeYV1htOhJVDKAek-ma9LaXyw-U5JM6ApT6xRMcjFZMYqCd3e1FEqPR-7gzXKynmd6GjPkN-v0YpnwbdHOYpA-qYgDrY4ipUJRjylslzqiF1N4Bw/s1600/Timeloop_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHXHD90qnS49YoaP7UT8MdyMiJlXfeeYV1htOhJVDKAek-ma9LaXyw-U5JM6ApT6xRMcjFZMYqCd3e1FEqPR-7gzXKynmd6GjPkN-v0YpnwbdHOYpA-qYgDrY4ipUJRjylslzqiF1N4Bw/s1600/Timeloop_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b><i>timeloop 2 1</i></b></td></tr>
</tbody></table>
I'm thinking on adding timeloop to the "Logic Gates" entity. They'll work just like Environmental Triggers, but instead of commands they would have "<b>Output/Input</b>" and "<b>And/Or/Not/Xor</b>" buttons. You'll be able to set their names relative to their correspondents, so if you want, for example, an AND gate for 4 buttons to open a single door, simply add 4 Logic Gates with the name <b><i>andgate1</i></b> (they must have the same name, no matter how you call them), for example, and the options <b><i>Input</i></b> and <b><i>And</i></b>, and link them to each button. Later, add another Logic Gate with the <b><i>Output</i></b> option and the same name (<b><i>andgate1</i></b>, in this case). Link the door to it and you're done!<br />
<br />
Shaders can now be changed/removed via Commanders. I can't test it on my computer (it doesn't support shaders), but I tested it on another one, and it works very well! Now you can make Acid Trip with automatic drugs-like effects, or a Space-themed mappack in negative! Just use the <b><i>shader1 [shader name]</i></b> or <b><i>shader2 [shader name]</i></b> commands!<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWTEqvLLUklw-R9EXCf4DJYmyqdpHtv5QS9yuQPp3hgj4sqtc3fhZDOiXvVdEalvVq4bi9fPK1-_L5oMdx18w1i1Mn5rgIB30Q7ZDj_5SwQbZm25RgkuZdC6MVwZQDhmU-WpBpx1XS2A/s1600/Shaders_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWTEqvLLUklw-R9EXCf4DJYmyqdpHtv5QS9yuQPp3hgj4sqtc3fhZDOiXvVdEalvVq4bi9fPK1-_L5oMdx18w1i1Mn5rgIB30Q7ZDj_5SwQbZm25RgkuZdC6MVwZQDhmU-WpBpx1XS2A/s1600/Shaders_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Perfect for themed mappacks!</td></tr>
</tbody></table>
<br />
Since I started working on the 1.0 update, I've always mentioned Commanders, but almost never Environmental Triggers. They also have a great potential, and also a lot of commands for testing game's events. For example: to detect if you have less than 200 seconds left on a level (actually, the "TIME" values from Mari0 are less than 1 second, but let's just pretend it isn't), just add an Environmental Trigger with <b><i>timepassed max = 200</i></b>, and link something to it; to see if you're playing on gelcannon mode, just add the command <b><i>playertype = gelcannon</i></b> (I'll probably make it work for each player as well); to detect if player 2 was killed by falling off a pit, do the command <b><i>player2 deadcause = deadlypit</i></b>. You can detect if a key was pressed on your keyboard or a button was pressed on your mouse as well, so if you want to add to your mappack a way to players to toggle, for example, underwater properties by pressing "Q", just add an Environmental Trigger with the command <b><i>keypressed q</i></b> and a Commander with the command <b><i>level set underwater toggle</i></b>:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPoq-zPkhusQRJZT_TQKPUNT2jBMuXIpeUSC59v_HSNzMlaGC2r8QwtjbqVp7IGBIw-_CnXwPNPh2-0Dw6U2U7Nb0M0FgjYnwODAsua6IPIDL2QRf4sCjJN8QclG0pFmyqP39K18tJ2xY/s1600/screenshot_0005.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPoq-zPkhusQRJZT_TQKPUNT2jBMuXIpeUSC59v_HSNzMlaGC2r8QwtjbqVp7IGBIw-_CnXwPNPh2-0Dw6U2U7Nb0M0FgjYnwODAsua6IPIDL2QRf4sCjJN8QclG0pFmyqP39K18tJ2xY/s400/screenshot_0005.png" width="400" /></a></div>
<br />
And the results of it:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5-w3tntSE3N9FGi5P0PtEfsGFKDfLHCBQenp5w2AVEyrnhLz68CwIrrwARxvyDHVhRUQlAHU4bgzc0-doayXqRiBWaSbWPtEqZS5wPAML_ou9Us1zl1pZXCjtrErs8l_SzZv7YR7BwpY/s1600/Keypressed_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5-w3tntSE3N9FGi5P0PtEfsGFKDfLHCBQenp5w2AVEyrnhLz68CwIrrwARxvyDHVhRUQlAHU4bgzc0-doayXqRiBWaSbWPtEqZS5wPAML_ou9Us1zl1pZXCjtrErs8l_SzZv7YR7BwpY/s1600/Keypressed_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The Aperture icon represents the key "Q" being pressed.</td></tr>
</tbody></table>
But this is enough for a single "Quick Update". So I see you guys in my next post!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-71852112502312495902013-10-21T00:07:00.002-02:002013-10-21T00:07:48.025-02:00Quick Update for Mari0 +Portal #2You may not know, but the animation properties were not working. Until today. I've finally got them to work properly, and, as a "bonus", I made a system that reads text files for the corresponding tile, so you can set it's properties (for now, the only thing it reads is the "animationspeed" property). I might also add properties for it, but I don't know yet.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbY8XU-g5HEF0-sxnrJCcP2naq65l2lNXNqS1AxxMAGyYVxwK3hyIbPsblcKu6GKd1_PMxBuGAmC9aBockC_avi07c36TaNq6Qn_doWHjPHidGvAKklrjUDqTybYdMovsXyyogSkcuOPs/s1600/Animation_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbY8XU-g5HEF0-sxnrJCcP2naq65l2lNXNqS1AxxMAGyYVxwK3hyIbPsblcKu6GKd1_PMxBuGAmC9aBockC_avi07c36TaNq6Qn_doWHjPHidGvAKklrjUDqTybYdMovsXyyogSkcuOPs/s1600/Animation_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">"Animation Once" and "Animation Loop" properties</td></tr>
</tbody></table>
They work very well with Commanders, as you can see. The only missing property I have to do is the "Pixel Collision" one. I think I've come up with a good way of doing them work. Instead of making only non-transparent pixels collide, I can make them require an extra file. In this case, an image. Each non-transparent pixel of this image will be translated as a collide-able pixel, so your tile can be drawn just as you want. Also, I never posted here, but some days ago I've got non-gelable property to work too:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuHjoNcqvvXdZkf5PuQUaX9QdQ_N3RnsrLhtCfCbibTnOXLB5P836iZYdmSk9StNBt3p_r97tTqq_2kLURQHnb9BOWz6IrAgfHX16cQeuhGCGL1s346tLfwL8ulh4GNzSIzrBBokHc2Yo/s1600/NonGelable_GIF.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuHjoNcqvvXdZkf5PuQUaX9QdQ_N3RnsrLhtCfCbibTnOXLB5P836iZYdmSk9StNBt3p_r97tTqq_2kLURQHnb9BOWz6IrAgfHX16cQeuhGCGL1s346tLfwL8ulh4GNzSIzrBBokHc2Yo/s1600/NonGelable_GIF.gif" /></a></div>
<br />
So I see you guys in my next post!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-61978312570835309912013-10-18T01:37:00.001-03:002013-10-18T01:37:06.384-03:00Quick Update for Mari0 +PortalI added player-specified spawners to the game (later I'll add a multigui for it, allowing you to customize where they'll spawn - like 5 blocks after the entity or whatever -, how they'll spawn - perhaps I'll add options to set player size, type, etc. - and who will spawn - for now you can only set 1 player per spawner or all of them in one single spot, but I'm planning on changing it).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYHQp5sHdmgYJY4f3xLa4SOm9H_d7PQS8sRq8diWHcu_1CpajibgubaSCc007B5PWF3Q-aoXdbOeR_S8y_7mvIu-8qpvVhJOo6rhJriLX6by3JRgudNOtWboE5BQqCm0jC7SgNyyx-wWo/s1600/screenshot_0001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYHQp5sHdmgYJY4f3xLa4SOm9H_d7PQS8sRq8diWHcu_1CpajibgubaSCc007B5PWF3Q-aoXdbOeR_S8y_7mvIu-8qpvVhJOo6rhJriLX6by3JRgudNOtWboE5BQqCm0jC7SgNyyx-wWo/s200/screenshot_0001.png" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTNMvlECUQpQAFcn7AbOCQPS_BzQRhxAgMVQP5Lb5jC9BySEKZi11_wG_5nDFEouRLk2yToFQao958vIODEunWgSj1A_phuabmk596FGX9qjcVCWxpZvvdFkT3TPQ8kkOINEXWak1v-T0/s1600/screenshot_0002.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTNMvlECUQpQAFcn7AbOCQPS_BzQRhxAgMVQP5Lb5jC9BySEKZi11_wG_5nDFEouRLk2yToFQao958vIODEunWgSj1A_phuabmk596FGX9qjcVCWxpZvvdFkT3TPQ8kkOINEXWak1v-T0/s200/screenshot_0002.png" width="200" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4ewzaak7w-6lRcd9ec5MN5fEnM_gHq3_FtTOJj2TAbQv8L6I7fEvHqRGzSOEU-1xxnBFscwjdew9lgbYm94mSHGl47Vy9P0D3jI__ZD8QsyF1UYBVYP9-IUVS8rwpJQPjfjxLMN_t_w/s1600/screenshot_0003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4ewzaak7w-6lRcd9ec5MN5fEnM_gHq3_FtTOJj2TAbQv8L6I7fEvHqRGzSOEU-1xxnBFscwjdew9lgbYm94mSHGl47Vy9P0D3jI__ZD8QsyF1UYBVYP9-IUVS8rwpJQPjfjxLMN_t_w/s200/screenshot_0003.png" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN3wEZsOBkAUCoMWbMJJlXIOQkBhsmItdQdQrNDac_74F79KPM6AtZYq4ulUuB3JXuHmmp2IBn5gi88CjFCpJPMJiezCmFCYwP-i8b3foqS5QR2j7equgH2LJ-0AT_M2dIJaqzLZYJ4Xo/s1600/screenshot_0004.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN3wEZsOBkAUCoMWbMJJlXIOQkBhsmItdQdQrNDac_74F79KPM6AtZYq4ulUuB3JXuHmmp2IBn5gi88CjFCpJPMJiezCmFCYwP-i8b3foqS5QR2j7equgH2LJ-0AT_M2dIJaqzLZYJ4Xo/s200/screenshot_0004.png" width="200" /></a></div>
<br />
I'm very close to finish Commanders and Environmental Triggers too.<br />
And I'm planning on releasing a version <span style="color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 26px; font-weight: bold; line-height: 30px;">v0.9</span> before the <span style="color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; font-weight: bold; line-height: 18.1875px;">Super Mega Awesome </span><span style="color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 26px; font-weight: bold; line-height: 30px; margin: 0px; padding: 0px;">1.0</span><span style="color: #333333; font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; font-weight: bold; line-height: 18.1875px;"> Update </span>release, because people are requesting a lot for the updates (mostly because of Commanders and Environmental Triggers), so I'll release this one first (with the Commanders and Environmental Triggers) and keep working on 1.0 (with Triggers, Collisions, Animations and many other things).<br />
This is the <b>Quick Update</b> of today, and I see you in my next post!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5875476712979113891.post-60081498846510019112013-10-10T00:21:00.001-03:002013-10-10T00:21:14.431-03:00Non-Update UpdateIt's been a while since my last Mari0 +Portal update. I have a lot of things done already, but there are still a lot of stuff to do. So, to keep you guys updated on this long "non-updates" time, here are some of the things already done:<br />
<br />
<br />
<ul>
<li><b>Online Updater:</b></li>
</ul>
<div>
If you don't like visiting sites to see if there's an update for whatever game you play, then you should be safe. Even making it on Mari0 +Portal, I made it planning on making it being "universal", which means that not only on Mari0 +Portal, but in all of my future games (including LinkIt!) you'll get this just by having Internet connection! I made this online updater to allow me to change whatever I want in these games/mods, so if, for example, you have a bug that crashes the game, I can fix it online and you'll not need to download the game again anymore!</div>
<div>
<br /></div>
<div>
<ul>
<li><b>Tileset Multi-Customization:</b></li>
</ul>
<div>
Now you'll be able to set whatever custom texture you want for each property of your tiles by just adding an image named "[tileid].png" to a folder named "tiles". It'll check for the properties of each tile id and search for it's custom texture. Very useful for custom coin blocks, custom animations, custom block debris, etc.</div>
</div>
<div>
<ul>
<li><b>Commanders:</b></li>
</ul>
<div>
I know you guys already know how the Commanders works, but now I can safely say that they're VERY close to it's finish! I've already computed most of the commands, and some will be added in future version (together with their correspondent features), but for now they're working very well!</div>
</div>
<div>
<br /></div>
<div>
And some examples, if you like images:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZb4fcF0K1i6-57mGUHOU9Ixw6ZIf1i-mvZh-hlwIvvVD7a82cK8-jRleIHBsSwryn9Z5NCclY5z2umN9PsYliSFgjIQK3zAcpzjuEc32kUcOEsZeEgZ3mfm9Hzd1-S04iwsMtNzfMEMM/s1600/EnemySpawner_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZb4fcF0K1i6-57mGUHOU9Ixw6ZIf1i-mvZh-hlwIvvVD7a82cK8-jRleIHBsSwryn9Z5NCclY5z2umN9PsYliSFgjIQK3zAcpzjuEc32kUcOEsZeEgZ3mfm9Hzd1-S04iwsMtNzfMEMM/s1600/EnemySpawner_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>enemy spawn goomba [x] [y] [speedx (optional)] [speedy (optional)]</b></td></tr>
</tbody></table>
</div>
<div>
And much more! Click on "Read more" for more animated GIFs and more informations!<br /><a name='more'></a>(smart place to put the "Read more" thing, isn't it?)</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg40YCS135n_wWKflVTMVaihEa_tpA9H0qv_FlZYa77QO_OXNbmdDya2sUL5S3FcE8t6M3pelrZ6FpENdWMkGIX3qBYazIYJSW6t9qUUz01zjdypiri7-HV7r_LFR4I1hSH1JirQLEQ128/s1600/Spriteset_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg40YCS135n_wWKflVTMVaihEa_tpA9H0qv_FlZYa77QO_OXNbmdDya2sUL5S3FcE8t6M3pelrZ6FpENdWMkGIX3qBYazIYJSW6t9qUUz01zjdypiri7-HV7r_LFR4I1hSH1JirQLEQ128/s1600/Spriteset_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>level set spriteset [overworld/underground/castle/underwater]</b></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3VAHaB_6FrxcjM4kw47mB7TsxBLlbI9aDjlSJ3VwYWYKatH3-zVWtwnOU49FEeAbxhMSS0WSrGBOx5TB17uWLFERJSXzK3iw2C7CHWvEaNJOBjU0VTZk6u03mouexUZ8PqPgZ4j-AUD8/s1600/Underwater_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3VAHaB_6FrxcjM4kw47mB7TsxBLlbI9aDjlSJ3VwYWYKatH3-zVWtwnOU49FEeAbxhMSS0WSrGBOx5TB17uWLFERJSXzK3iw2C7CHWvEaNJOBjU0VTZk6u03mouexUZ8PqPgZ4j-AUD8/s1600/Underwater_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>level set underwater [true/false]</b></td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWfWwgKmeEsQfvD9Bj3I9hgkNkCW03bWrHhRBWnUqGBbo2XOLHmmEY7yjZed_-aPELvhz8TupD8fy5kphCE-1OqxgQy8gZNnUeSnX6zLkYkzcmBanJcFSjGCXpbuWJF2JgMlQjsoLonY8/s1600/Cheats_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWfWwgKmeEsQfvD9Bj3I9hgkNkCW03bWrHhRBWnUqGBbo2XOLHmmEY7yjZed_-aPELvhz8TupD8fy5kphCE-1OqxgQy8gZNnUeSnX6zLkYkzcmBanJcFSjGCXpbuWJF2JgMlQjsoLonY8/s1600/Cheats_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>cheat portalknockback toggle</b></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfZExXkiSIa9Ol_e8Higw-mMBdZJnAen9Srsat6iDlyKi1XIOtMfZUbSeoIwpIW7v39enXkZrs8jc3-Dk6jgxmRAAdkLyGMtIP6ixXB8vi6ydLK8iHgRbtU8D3uY_1jPWizc-c26VdH8/s1600/Playertype_GIF.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfZExXkiSIa9Ol_e8Higw-mMBdZJnAen9Srsat6iDlyKi1XIOtMfZUbSeoIwpIW7v39enXkZrs8jc3-Dk6jgxmRAAdkLyGMtIP6ixXB8vi6ydLK8iHgRbtU8D3uY_1jPWizc-c26VdH8/s1600/Playertype_GIF.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>playes setplayertype [portal/gelcannon]</b></td></tr>
</tbody></table>
<div>
And many others too! Here you can check most of the new commands that are coming in this update (but keep in mind that some are not going to be added in this very next update, some may have changed and some were added): <a href="http://forum.stabyourself.net/viewtopic.php?p=81722#p81722" target="_blank">Stabyourself's Forums Thread</a>.<br />
<br />
But you may have been asking: "Why is it taking so long (again)?". The answer is: I'm still on school (but luckily this is my last year), and I'm also making 2 courses, so sometimes it's hard to find some free time to work on my projects. Luckily, here in Brazil we have an entire week of recess (it's actually on this week, but my school will delay it to next week). That means that I'll have a lot of free time to work on this, which means that my next release will not take as much time as it is actually taking to get released. You'll soon have access to all these features and will be able to create mappacks with all kind of advanced settings for it. There'll be even Triggers, Collision, Underwater Region and Logic Gates entities! So keep calm. It'll just take a little bit more time to have this release ready for you! And I see you in my next post!</div>
Unknownnoreply@blogger.com0