Randomly generated scenes and enemies

bramcorvus

  • Posts: 9
Hi, I'm new to stencyl, I've reading some posts here but I can't find the right answer to my doubts here.
I'm thinking about creating a rogue-like game but before a more simple puzzle game, so I want to know how does stencyl manages to create randomly scenes based on rules, like the rooms in a rogue-like game (for. ex. Pixel Dungeon, for Android) and as well, how to generate actors, like the pieces in tetris and a enemies generator/recycler.
I mean, do I have to code or does it have the tools for it?

A lot of thanks in advance,
BramCorvus

Tuo

  • *
  • Posts: 2469
The idea of any random design is a strong knowledge of using random number generators (RNGs). For example, you can name your levels "1", "2", "3", "4", etc. and then use conversions with an RNG to switch scenes:

switch to scene [scene with name [[RNG from 1 to 4] as text]]
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

bramcorvus

  • Posts: 9
So, I can only make that possible coding, isn't it?
I guess I'd have to make Scene01, ..02, ..03 based on different tylesets, and put a behaviour to spawn different objects in the scenes, save them temporary as scene01-01 scene01-02... etc. to make for ex. 1st floor of dungeon, and the same with enemies, am I right?
so my next question would be.. how do I mark that special spots?

Tuo

  • *
  • Posts: 2469
I don't quite understand what you are trying to do. If you want random spawns, create the enemies with code in random x/y locations...
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

bramcorvus

  • Posts: 9
Ok, I got that about the enemies.

About the other thing, I'm trying to figure out how to make a level, let say when you start the game, there are a lot of rooms that are randomly created, randomly connected as well and they all together become a level, so there is a level generation only before tha player is going to start a new level.
By now, I only have in mind that I should create many rooms for each kind of level, so when a player enters a new level, the level is created by choosing some number of rooms, chosing them randomly with 1 entrance and 1 exit.

My char walking test by far: http://nekrosith.deviantart.com/art/HR-walking-test-01-433200065

linai

  • *
  • Posts: 28
So, i take it you are more interested in procedural level generation? If so, yes, it is possible but certainly not trivial. It will involve a good amount of work and is going to be quite a steep learning curve, especially if you do not already have programming (specifically the logic of programming) experience. Basically, it's not going to be a simple matter of stringing together a few blocks, but it is possible.

Tuo

  • *
  • Posts: 2469
As linai put it, creating randomly-generated levels is a coding challenge. I've played around a LOT with RNGs myself ever since 1.1, so I know how crazy it gets quickly.

If you want to see an example of one yourself, in the games section of the StencylForge, I have some "infinite" demos. The "Demo- Infinite Platformer" or "Demo- Infinite Climb" should be rather understandable even if you are somewhat new to coding. If you want to see a really infinite platformer though (that is infinite in both directions at once), my "Demo- Truly Infinite Platformer" is one of my trickier demos, but it goes over the idea for doing a full platformer that is pseudo-random (one of the trickiest things is to have catches in place to make sure that there are no impossible situations) in any direction that the player wants to move in.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

bramcorvus

  • Posts: 9
Well, I know programming, Java, C++, etc. just that I'm new to Stencyl yet.
Thanks for the advice, I'll check your demos.

bramcorvus

  • Posts: 9
Btw, if you still don't undesrstand what I try to do, I try to make a roguelike, like this https://play.google.com/store/apps/details?id=com.watabou.pixeldungeon

dripple

  • Posts: 747
Well, I know programming, Java, C++, etc. just that I'm new to Stencyl yet.
Well, it's similar to the classic languages. When it comes to use Stencyl for a rogue-like, then you simply loose the benefits of the Scene designer, that's all. You'll have to dig into the tiles API to create your dungeons procedurally.

/dripple
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper