[Updated May 8] Codename: A Forest, environment testing video


#1

[May 8]

I’ll keep using this post to put updates on the game I’m currently developing for fun. The codename of my project is “A Forest”… not very creative, but the title will change later.

The production philosophy for this project is to keep graphics minimalistic (but appealing) and to focus in the gameplay features.

I want to built a story-rich metroidvania-like game with emphasis in exploration and a bit of resource gathering. I have a lot of ideas but for now I’m focusing into create a pixeled natural environment that feels responsive.

In this video you can take a look at:

– A complete implementation of my procedural ground and grass decoration algorithm discused earlier (complex shapes merging, random flower, rocks and “mineral shine” patterns)
– Falling of ground debris when ground is hitted from above.
– Water FX.
– Simple movement pattern for the fireflies spawning from the flowers.
– Complete behavior algorithm for fish.




[May 5]

So, I put together a commented example of this algorithm.

It’s a simplified version of the one implemented in my game, so anyone can add more features to it. It’s not perfect, it glitches on some specific circumstances. Mine is highly adjusted for the game I’m developing, and you must debug this version for your own purposses, but the basic idea is there.

For example, it glitches when ground blocks share edges (for some circumstances that’s not a problem in my game):

glitch

So, avoid that or improve my method.

Feel free to use the sprites I improvised for this example. There is an SVG file bundled with the project, it contains the vectorial designs for the sprites. If you want to modify the tileset I recommend you a free program like Inkscape.

Download from Google Drive




[May 4]

I’m working on a system to design more levels more quickly and get rid of putting each texture and each decorative object in place.

So I made a procedural system to do the hard work for me.

For now it looks very simple, but I can generate even more decorative elements with the same algorithm.

The idea is to be able to design levels just by placing large blocks in the design window that the game completes during runtime.

Here are some screen captures:

1.

At the design window:

During runtime:

2.

At the design window:

During runtime:


#2

Wow I like the ideas!
How you do ? With panel sprites or each case on grid are one Sprite ?
Also for merge two shape what is used :star_struck:


#3

In fact, each “block” (the water sprite, the ground sprite) is just a stretched 1x1 pixel picture of a solid color. I created sprites that I called “sensors”, the algorithm populates the inner and outer margin of each block of ground with them; then finds the sensors that intersects the ones from others ground blocks to find overlaps and the inner and outer corners of the merged shape. There are sprites for the rocky soil texture (one sprite), the water surface (two sprites, it’s animated), the grass (three sprites), the edges and corners of the soil (three sprites), etc. The algorithm decides where to create these sprites and how to flip them based on the edges and the sensors. Then it randonmly puts some flowers here and there (that changes every time I run the level). Everything is built with very tiny simple sprites. Finally, the algorithm get rid of the sensors. All of that happens at the beginning of the scene.


#4

The sensors in debug mode:


#5

Hmm… it would be amazing to see a sample project with this, or maybe some of the events.


#6

How did you do that, please show events


#7

I put together an example, hope you’ll find it useful.


#8

On request, I made an example. It shows the basics of it.


#9

That’s awesome. Thank you for doing so!

@Bouh: I know you had been digging into procedural generation. This might be useful to look at as another way to do that, if not get something as an official example with credit to Erdo?


#10

Nice.

4ian bundled an example project of mine (showing how to put together a simple slot machine) in an early version of GD. That was cool. But it’s not necessary to give me credit for a full implementation of this procedural method (that will require hard work at the front end side).

I added some extra advice in the post.


#11

My method of dungeon generation was based on template of rooms, I just used external layouts to place templates together in one or two directions that never intersect.

The approach here is different and very interesting!
Make an example I don’t know… it should be clear and polished.
An article on the wiki explaining the basics would be much more interesting.

People need to understand how it works to control the generation.
Not just use it for their games.


#12

Oh no, I was not saying to made this thing a bundled example, it requires a lot of work, indeed.

A lot of time ago, when I was fighting dragons, in another life, I made an experimental dungeon generation algorithm in C++. I don’t have the source code anymore, but it was aimed to be completely random.

It worked by segmenting a plane into several large rooms. Then it created (at least) one entrance and one exit for each large room, and filled each large room with random walls, thus creating several small rooms within each large room. Then it mades sure that there was a clear path between the entrance and exit of the large room and that each small room was connected to one with an exit to the path between the entrance and exit of the large room.

The algorithm worked fine, but graphically it was just a black plane with white lines (like a maze from an ancient DOS game), and I never used it for more than just the exercise of do it.


#13

-----[Updated May 8]-----


#14

It’s amazing. Congratulations. :star_struck::+1:


#15

Thanks! I’m going to share an update soon! :slightly_smiling_face: