Level Shuffle

All about creating levels and level sets, custom elements and custom artwork.

Moderators: Flumminator, Zomis

Post Reply
User avatar
TheOnyxGuy
Posts: 687
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Level Shuffle

Post by TheOnyxGuy »



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".

Not really a real version number, just a joke. It's just kind of "Update 1", that's it
Not really a real version number, just a joke. It's just kind of "Update 1", that's it
levshuf1.png (220.17 KiB) Viewed 971 times

Cracking some random nuts
Cracking some random nuts
levshuf2.png (479.15 KiB) Viewed 971 times

Blowing up some random bombs
Blowing up some random bombs
levshuf3.png (512.35 KiB) Viewed 971 times


Video


Download:
87159482__tog_levelshuffle_upd1__91562503.zip
The file (do not ever delete scr.dat)
(343.38 KiB) Downloaded 38 times
Previously known as Eizzoux (boooo)
User avatar
Holger
Site Admin
Posts: 4455
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Level Shuffle

Post by Holger »

This is just cool! :D

Also, the transition from the main menu to the game screen is just as simple as it is impressive!

Very well done! :)
BrownSky
Posts: 115
Joined: Mon Sep 24, 2018 4:04 am

Re: Level Shuffle

Post by BrownSky »

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
User avatar
TheOnyxGuy
Posts: 687
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Level Shuffle

Post by TheOnyxGuy »

BrownSky wrote: Tue Jun 23, 2026 9:23 pm Can you please explain a bit about the special things you implemented in it?
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.
BrownSky wrote: Tue Jun 23, 2026 9:23 pm I am especially curious about the file data.tga.
It's actually really simple. The file is just used for two things:
  • Editor lock
  • The "don't delete scr.dat" lock
In first case it's two global animations first one being yet again a large black rectangle of empty spaces covering the whole screen, and the second one just being a custom sprite (in this case data.tga) that only appears after some time with '.init_delay_fixed' and '.init_delay_random' and then just basically repeatedly "animates" into itself and simulating the Escape button over and over with '.anim_delay_action' so the game basically furiously spams Escape to leave the screen. I utilized this trick quite a few times in few levelsets I usually made either as little experiments or even bug reports. Here's few examples where I also did the editor locks: GOKOBAN!, Trying out some things from the update (not all yet), Reflektor Demo 6: Optimized Edition (april fools), Music doesn't start up on title screen with very specific setup. Plus there's a couple that aren't publically available, so to say, but I specifically sent to Holger that also have their own editor locks, for one reason or another.
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)
Post Reply