Level Shuffle
Moderators: Flumminator, Zomis
- TheOnyxGuy
- Posts: 687
- Joined: Wed Oct 30, 2013 5:32 am
- Location: Russia
- Contact:
Level Shuffle
Creating a separate topic for it because I did a little tiny update.
In short, it's just one level randomly generates it's layout. For the most part it's just some walls, some rocks and bomb, and also a specific amount of gems that always matches the amount required for completion (it's always 90/90, but maybe I will find out a way to make it pick value randomly as well). Oh yeah, I also added this sort of "biome" thing where some patches of sand are instead replaced with "emc_grass".
Video
Download:
Previously known as Eizzoux (boooo)
Re: Level Shuffle
This is just cool! 
Also, the transition from the main menu to the game screen is just as simple as it is impressive!
Very well done!
Also, the transition from the main menu to the game screen is just as simple as it is impressive!
Very well done!
Re: Level Shuffle
Hello TheOnyxGuy,
This is a cool levelset. Can you please explain a bit about the special things you implemented in it?
I am especially curious about the file data.tga.
John
This is a cool levelset. Can you please explain a bit about the special things you implemented in it?
I am especially curious about the file data.tga.
John
- TheOnyxGuy
- Posts: 687
- Joined: Wed Oct 30, 2013 5:32 am
- Location: Russia
- Contact:
Re: Level Shuffle
Well, I mean, it's mostly global animations. First off is the spinning cube itself that just has the ".anim_event_action: menu.button.game" in main menu '.MAIN', so when you click on it the game automatically clicks at the target specified in '.anim_event_action' parameter (it can click on main menu buttons, panel and tape buttons and other global anims, not game elements though). When you click on it or just start the game normally, it cuts to the '.PLAYING' screen starting with the global anim that uses the same texture as the main menu cube one (except that illusion is kind of broken with the introduction of level intro screens, but it's understandable why they're here), but instead of being clickable, it just moves up with '.step_yoffset' and '.step_delay' parameters, plus fades out with '.fade_mode' and '.fade_delay'. Oh yeah there's also another animation that is just a bunch of empty space tiles stacked together with '.draw_masked: false', '.stacked_xfactor' and '.stacked_yfactor' to cover the whole playfield with black squares. It first stays solid for few seconds before automatically switching to another one that just uses the same sprite, plus masking and stacking parameters, but it also fades out to finally reveal the level.
Oh yeah, right, you probably meant the randomization of level itself? Right, it mostly utilizes Group elements which is what allows you to customize how something can turn into one of sixteen elements provided in it's properties, plus instead of picking randomly the order can be deterministic with different choice types like "loop" (from first to last and repeat), "linear" (from first to last and then just keep using the last one), "pingpong" (side to side, so it goes from left to right to left to right and so on) and others. Basically, I utilized these deterministic choice types, especially linear and loop, to keep the same gems across the whole playfield without any loss or extras, it's kind of too long of a story to explain everything. There is a little nuance to these Group elements though, which I wanted to make a bug report about, although I'm not sure if that's a bug or possibly intentional behavior that could be played around with, but I'm always forgetting about it and never happen to finally get to it.
It's actually really simple. The file is just used for two things:
- Editor lock
- The "don't delete scr.dat" lock
In the second case I utilized the 'include:' parameter that allows you to separate conf file's code into different files that are then included into it with 'include: filename.conf'. When you delete the file (or rename it, or just move it out of the folder), some global animations change to how they're written in graphicsinfo.conf since they were originally overwritten in the 'scr.dat' file and basically changes levelset's presentation... a little bit, ya know. There's not that much to say really, it's all just some tricky play with global animations and a little bit of custom elements in the gameplay.
Previously known as Eizzoux (boooo)