Saering

LD 41

Happy Quiz Updated!

Hello! Our game Happy Quiz have been updated with some patched issues. If you haven't played it yet, make sure to do it, it's a funny quiz mixed with another interesting genre ! :D

https://ldjam.com/events/ludum-dare/41/happy-quiz

happyquiz.png

LD 42

RIP 3ds Max

20180811_071253.jpg

Day 1266, we're still waiting for 3Ds Max to get installed!

We made it !

title 640x512.jpg

We just finished our jam ! Hope it went well for everyone ! :) I can't wait to try out games, here's the link to discover ours : https://ldjam.com/events/ludum-dare/42/$108812

Cheers!

Already a video of our game on YouTube :D

Really funny seeing someone playing our jam game ! :) Check this out : https://www.youtube.com/watch?v=ilCq8Ir1e0I And if you want to try out the game, feel free to do so https://ldjam.com/events/ludum-dare/42/loneliness

Where is the elevator going ?

ezgif.com-optimize.gif

Find this out here : https://ldjam.com/events/ludum-dare/42/loneliness :D

Also if your games are available on browser feel free to share them in the comments, I'll give them a try :)

Hello friends of the night !

03.jpg

Why don't you come and discover what's behind the door ? :D https://ldjam.com/events/ludum-dare/42/loneliness

60 ratings !

Thanks everyone for the ratings ! Make sure to try out our little horror game if you haven't already! https://ldjam.com/events/ludum-dare/42/loneliness

Also don't hesitate to share your games here :)

Want to play some horror game ?

title 640x512.jpg

Then come and try our game "Loneliness" :D https://ldjam.com/events/ludum-dare/42/loneliness

70 ratings !

Thanks a lot to everyone, our team really appreciate !

Come try our game if you have not already :) https://ldjam.com/events/ludum-dare/42/loneliness

LD 43

ABORTION BOY

ab_screen01.jpg

Come save this fetus from abortion in a procedurally generated uterus ! He must be sacrificed since he has the Fortnite syndrome but he still deserves to live !

https://ldjam.com/events/ludum-dare/43/abortion-boy

How to make a simple procedural level generation in a few hours ?

Hi !

During Ludum Dare #43 I had the pleasure to work on Abortion Boy, a pretty gore game that we had so much fun to imagine and create ! Though it's not the main feature of the game, Abortion Boy has a procedural level generation system that allows you to play the game over and over and never play the same level twice.

The system I used is pretty simple so seasoned programmers won't learn anything, but I know there are a lot of very beginners devs here and I believe this breakdown can be a good way to show them it's not so hard doing things that can seem impossible to do in a few hours !

abortionBoyImageLD.jpg

What is a procedurally generated level ?

Procedural generation is used to create a lot of data randomly using algorithms. In video games, this is obviously a great way to do things since it will make the game random at each generation and give it a less predictable gameplay.

Let's get into it !

So, what I did is a simple maze only made of rooms of the same exact size, only the exits will change. What we want is generate a grid of indexes through code, then use these indexes to instantiate rooms. But how do we represent a maze in code ? Well, a good way to do it is to work with a two-dimensional array of integers. Each cell will represent a room for the game. So let's declare it.

BRAKDOWN_1.jpg

Since we are talking about a game jam and you can't really know what will be the rooms size, how many of them there will be in the game, let's declare some variables to make the system more modular.

BRAKDOWN_2.jpg

Now, what do we do with this ?

Well, now let me explain the process which is very easy ! We're going to generate a main path (the first cell being our spawning point, the last one being the level end), then we will add rooms on empty cells to make the whole level less linear. Let's do the main path first !

It will look something like this :

BRAKDOWN_4.jpg

First, we want to choose a first cell. Let's just declare two values : one for the x, and one for the y. The y will at first be 0, and we want the x to be random. With that, the first cell will be a random one in the first line. We can now say that, in our array of integers, the first cell has a given index (all the cells being 0 by default).

BRAKDOWN_3.jpg

You can determine the room to be whatever you want. My index 1 means the room will have exits on left and right. Knowing that, we can randomly choose where the path will now go. If it goes left, then we want to substract 1 to our cellX variable. If it's going right, then we want to add 1 to it. When you're done, you can generate a second cell with correct exits : if the previous cell is on left, then you want the new one to have a left opening.

Do the exact same thing for the cellY variable. If your random path decides to go down, then do not change the cellX value but add 1 to cellY. * Be careful ! Arrays can be tricky because you can't see what is going on inside of them, but you need to add and not substract* to go down (note that it also depends on the generation system you're making, but in my case, it's working by going down). You can also use Unity debug methods to visualize your array in console, something like this :

BRAKDOWN_6.jpg

We want to stop the calculations when our path has reached the last line and can't go down anymore. To do this, just use a while loop, whose condition will be some boolean like "hasReachedEnd" or "mainPathGenerated".

BRAKDOWN_5.jpg

Yeah ! We now have our main path !

The next step is actually pretty easy. We're simply going to fill the level where the main path didn't go. To do so, just loop through all of your array cells, and whenever the cell index is a 0 (which means it's not on a main path, since default int value is 0), just set a random index ; since it's not the main path, it's not a problem if there are dead ends.

BRAKDOWN_7.jpg

You're now actually done with your level generation, but there are still some issues to fix : first, there are exits that leads out of the map, second, there are exits that lead into closed walls.

BRAKDOWN_8.jpg

And now you will understand why working with array of integers is very useful ! What I did is simply create two methods : one to close the out of the map openings, and another one to close dead ends. Each method just loop through the array, and compare each case with its 4 neighbors. Knowing my indexes, I know that if a room with an index of 2 is up to a room with an index of 6 for example, then I need to change if for a room of index 1 to close the dead end.

It takes some time setting up this system, and I did it in a very badly optimised way since I just wrote an endless stack of if statements, but, since I'm just comparing and changing integers, the code runs very fast and there's absolutely no latency during the indexes generation. Using Unity diagnostics library, we can see that the system takes 0.018 seconds to generate 2500 indexes!

BRAKDOWN_9.jpg

Of course this is just generating the indexes, it will take time if you want to generate 2500 rooms with environment, props and everything haha, but you get the idea.

And we're done !

There's nothing more to do ! You now have a simple but very useful generation system you can use to create nice little games, and of course, once you've clearly understood your code and your system, you can get on more complex things like having different room sizes, or maybe use a three-dimensional array to build a level on x, y and z axis !

Keep in mind that I didn't mean to do a tutorial, I simply wanted to give my feeling about procedural generation, and try to show it is not necessarily as hard as it can seem to be. Once I had my system working, I only had to change the offset between rooms to match with the assets I got from my friends, then I added empty GameObjects all over the game to spawn random objects at each generation. Each level also had a different size, different game assets, changing colors and visual effects. Those little steps are ridiculously easy and are not 100% procedural but they give the whole thing a very nice random feeling.

Thanks for reading this post, I hope you enjoyed it ! Don't hesitate to try out Abortion Boy and tell us what you think of it ! ;)

60 ratings already!

abortionBoyImageLD.jpg

Huge thanks for the 60 ratings, make sure to try out our game !

Also if you have game that can be played in browser don't hesitate to share :)

ABORTED

AB_screen05.jpg

Isn't playing a fetus a great way to start the week ? ABORTION BOY !

1000 downloads on itch.io!

Thanks to Abortion Boy, I reached 1000 downloads on my itch.io account! It might not be a big number for some of you, but it's still a pleasure! Make sure to try the game if you didn't already !

1000DL.jpg

Also you can share your games in the comments, I'll play and rate as much as I can tomorrow ! :)

Some updates on Abortion Boy!

AB_update.jpg

Hey !

We changed a few things on our game Abortion Boy based on the feedbacks we took good note of. We're not changing the download link on the Ludum Dare website since it would be cheating, so make sure to play the first version if you want to rate us, however you can find an updated version HERE and see the few updates that have been made ! :)

LD 44

Ready for my first compo!

I'm in for my 4th Ludum Dare, and for the first time I'm trying a 48 hours compo :D Hope it will go well, I'll share some of my process on my Twitter for those who are interested !

https://twitter.com/SixRobin1