NECRONOMICRON's Forum Posts

  • Thanks for posting this, it seems really useful!

    I'm curious as to how it works, and whether something similar can be replicated and modified for different level types in a Construct 3 event sheet without plugins.

    Would you mind explaining how it generates mazes (and how it avoids overlapping structures, are arrays used & how, can the maze be changed later without breaking things, etc)?

    Well, I'm a Spanish speaker, although I'm proficient in technical English, some things are translated by Google Translate. So I hope you can understand it.

    Part 1: Technical Manual - ProceduralDungeon (SDK Plugin) The ProceduralDungeon plugin acts as an in-memory state manager that translates mathematical rules into a two-dimensional matrix (Grid), which is subsequently rendered in the Construct engine. 1. System Architecture Memory Grid: Uses a two-dimensional array (this.grid) to represent the map before it exists on screen. 0: Empty | 1: Floor | 2: Wall | 3: Corridor | 4: Door | 5: Secret Room. BSP (Binary Space Partitioning) Algorithm: Partitioning: Recursively divides the total map area into two smaller rectangles (sheets), provided they do not reach the defined minimum size (Min Room Size). Room: In each final "sheet," a random room smaller than the area of ​​the sheet is generated. Hallways: The center of the rooms is used to create L-shaped halls that connect the divided sheets. Entity Layer: The plugin stores the logical coordinates of enemies, chests, bosses, and lights in a this.entities object. This separates the logic (where things should go) from the instantiation (where the sprites are actually created). 2. Plugin Lifecycle Setup (Configuration): References to Construct 2 Sprite objects are registered. Generate (Calculation): The BSP is executed, the data in the this.grid array is populated, and the positions of entities are calculated in this.entities. Spawn (Display): The this.grid is traversed. If there is a "1", a "Floor" sprite is created at that x,y coordinate. The process is repeated for entities. Part 2: Replication Guide in Construct 3 (Native Events) In Construct 3, you don't have plugin .js files, so we will use the C3 Array Object to replicate the "Grid" logic and the Function system for BSP recursion. Project Preparation: Array Object: Create an Array object called DungeonMap (Width: Width, Height: Height, Depth: 1). Global Variables: MapWidth, MapHeight, MinRoomSize, MaxRoomSize, RoomCount. B. The BSP Algorithm (Recursion Simulation) Since we don't have a "Leaf class", we will create a Function that uses an Array as a "Stack" to process the divisions. SplitRoom(x, y, w, h) Function: Condition: If w > MaxRoomSize OR h > MaxRoomSize -> Proceed to divide. Action: Calculate splitX or splitY randomly. Action: Call the same SplitRoom function for the new zone A and zone B. If it is the final leaf: Generate room (draw 1s in the DungeonMap Array). C. Spawning System: To convert the array data into a game: Event: System: On Start of Layout. Action: System: Call Function "GenerateDungeon". Action: System: For "x" from 0 to MapWidth - 1. System: For "y" from 0 to MapHeight - 1. Condition: DungeonMap.At(loopindex("x"), loopindex("y")) = 1 (Floor). Action: System: Create object (Floor) at loopindex("x")*TileSize, loopindex("y")*TileSize. Condition: DungeonMap.At(loopindex("x"), loopindex("y")) = 2 (Wall). Action: System: Create object (Wall) at loopindex("x")*TileSize, loopindex("y")*TileSize. D. Dynamic Lighting System: C3 has a much simpler lighting engine than the Destination Out "hack" we use in the plugin: Lighting Layer: Create a layer called Light. Add the "Multiply" or "Dest. Out" effect (if you want holes) to this layer. Light Object: Create a blurred sprite. Effect: Apply the Additive effect (for color) or simply use the sprite to create the hole. In your spawn events, simply use: System: Create Object (Light) on the "Light" layer. For the "Reddish/Blue Touch": Light: Set Effect Param (0, Color_R, Color_G, Color_B). Note: C3 allows you to change the color of layer effects or sprites directly. Condition-Based Boss System: Instead of the plugin "guessing" when the boss appears, it uses C3's State Logic: Event: System: Every tick Condition: Sprite_Enemy: Count = 0 (This checks if there are no enemies left). Action: System: Set Global "BossActive" = 1. Event: System: On Global "BossActive" changed Condition: Global "BossActive" = 1 Action: System: Create Object (FinalBoss) on ExitX, ExitY. Migration Summary: C2 Plugin Construct 3 Equivalent this.grid (JS Array) Array Object (from C3) Leaf.split() (Recursion) Function (with loop or stack) this.entities (List) Object Variable or Family (Family is better in C3) JS Rendering System: For + Create Object

  • Hello everyone in the community!

    I want to share with you the technical heart of my current project: Infinite Pac-Man. The basic idea is straightforward: to create a Pac-Man game with procedurally generated, infinite mazes, but with updated music and mechanics. However, as a developer, I imposed an unbreakable golden rule on myself: the Artificial Intelligence and the feeling of control had to be 100% faithful to the original 1980 arcade game.

    I didn't want to use Construct's default Pathfinding or solid physics; I wanted to replicate the exact mathematics of the classic grid. And I confess that programming it entirely from scratch using the JavaScript SDK was a real headache.

    I spent days battling classic bugs like Gravity Wells (ghosts trapped in orbital loops) and the eye "vibration" (which, when colliding with walls in Eaten mode, would enter infinite spinning cycles). Through trial and error, I developed a grid-based movement system that doesn't use physics, but rather Euclidean distance calculations and logical movement rules.

    To ensure everything runs autonomously, cleanly, and without cluttering the event sheet, I created four technical tools. Here's what each one does:

    1. Behavior GhostMovement (The AI ​​Brain)

    This is the logic engine for the enemies. It doesn't use the solids or physics system, but instead evaluates the map using a strict grid system (32x32).

    Targeting System: Depending on its personality (Blinky, Pinky, Inky, Clyde) and current state (Chase, Scatter, Frightened, Eaten), the behavior calculates a target (X, Y) coordinate.

    Look-Ahead Pathfinding: At each tile center, the ghost scans the valid neighboring cells (filtering walls using the Tilemap ID). It calculates the distance from those cells to its target and chooses the shortest path, always blocking the possibility of a U-turn unless the cells change state.

    2. Pacman Movement Behavior (Player Control)

    Making Pac-Man move smoothly while remaining anchored to a grid requires technical precision.

    Input Queuing (Key Buffer): To achieve the famous cornering effect, the behavior registers the key pressed a fraction of a second before reaching an intersection. Upon reaching the exact center of the tile, it automatically applies the turn, preventing the player from getting stuck in corners.

    Grid Alignment: It keeps the sprite aligned to the X or Y axis while moving, checking in advance if the next tile is a walkable space (walkableID). If it's a wall, it stops the movement abruptly at the exact center of the cell.

    3. ArcadeGenerator Plugin (The Architect)

    This plugin builds the world. It is responsible for creating the environment in real time on a Tilemap object.

    Procedural Generation: Uses traversal algorithms to carve mazes, ensuring that there are always connected paths and zero dead ends.

    Bitmasking (Autotiling): Reads a numerical matrix and applies the correct visual tile based on the neighbors of each cell, automatically injecting corners and junctions.

    Fixed Central Structure: Reserves and draws the "Ghost House" in the exact center with its rigid walls and invisible door, guaranteeing that the respawn point is never corrupted.

    4. Behavioral Tilemap Spawner (The Villager)

    Once the maze is built, the level needs life. This behavior scans the terrain to place items (pills).

    Scanning and Generation: Traverses the main Tilemap looking for the Target Tile ID (the cell where the object should appear).

    Exclusion Filter: Allows linking a second Tilemap (the floor tilemap). If the ID matches the forbidden zone (like inside the house or on top of the walls), the Spawner simply doesn't create the object, preventing visual or logical errors.

    It's been a tremendous technical challenge programming this solo. The base engine is already rock solid, so now I need to focus on the power-ups, the infinite difficulty curve, and the audiovisual polish.

    Fun fact: If you listen closely to the "Waka Waka" sound effect Pac-Man makes when moving... it's not the one from the original arcade. It's Shakira's "Waka Waka"! It's a little personal touch I decided to include in the project to add some humor :D.

    Has anyone else tried battling pure grid-based AI in Construct? I'd love to read about your experiences or get answers to any questions about the code!

    Any feedback is super welcome.

    I went a little overboard with the code for the demo, though it's not much XD.

    DEMO:https://infinitepacman.netlify.app/ MANUAL GENERATION

    DEMO:https://infinite-pacman.netlify.app/ PROCEDURAL GENERATION (F5)

    And here's just a sneak peek at what's coming with the plugins I've been working on. It's just a matter of changing and adding a couple of behaviors to what's shown above, changing the controls, adding the camera, and voila! We've gone from a 2D game to a 3D game. Ta-da!

    DEMO 3D: https://pacmaninfinite3d.netlify.app/

  • Wow, incredible! Great work on this! I'd love to test this out if you're interested in sharing. :)

    Any form of communication? WhatsApp, email, Telegram?

  • Hey, just saw the demo, its very impressive. Can you send me the plugin so I can study it?

    Email, sent---->

  • Hey, just saw the demo, its very impressive. Can you send me the plugin so I can study it?

    yup, whatsapp +56962775668 or construct2ppc@prevform.cl.

  • 3D World with Tilemaps and Sprites:

    Hey guys, I've finished the basics of a plugin that bridges the gap between three.js, the 3D engine, and C2 and its IDE. Basically, you can convert any 2D game to a 3D environment and 2.5D sprite design, something very similar to DOOM or Wolfenstein, with the only difference being that you design the level using three layers: Layer 0 for the floor, Layer 1 for the walls, and Layer 2 for the ceiling. This allows you to change areas, scenery, etc. Although it's still basic, it's already usable. Besides the Pedro3D plugin, there's a Pedro_Camera behavior and another for displaying sprites in the 3D environment, Pedro_Billboard. I have the code for mouse and keyboard input like in an FPS, and I'm thinking of adding it as a separate plugin or behavior, since it's quite a bit of JavaScript and needs to accommodate the Custom Movement behavior.

    I hope you like the demo, and again, if you want to try it, add it, or simply have it, let me know and we'll get in touch.

    DEMO: https://3dworldc2.netlify.app/

    UPDATE:

    Hey guys, while playing around with the plugin, I thought of designing it with other features, like adding SCREENS, or visual shortcuts to a URL. This would allow for games that load or redirect to other games, or design or post-design stages, something like a DLC... I DON'T KNOW.

    DEMO UPDATE:https://3dscreens.netlify.app/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That is super impressive. I'm surprised how fast it works, doesn't seem like there's any slowdown at all when I was playing it. Does the sand/water use some sort of physics behavior or it is all a custom behavior built into the plugin?

    I was wondering if you've seen some of R0J0hound's experiments with C2? He had some tests with pixel collisions and destructible environment. No clue if your methods are at all similar but just thought I'd mention it in case you find it useful.

    This looks very cool, I can see someone (re)making classic games like Lemmings or even Noita with something like this.

    Hi, I seem to recall seeing a few plugins or behaviors years ago that attempted something similar... I don't know who created them, but for my part, the crusade I embarked on was entirely self-programmed, starting from scratch, with the goal of providing you with the most simple tools possible to accomplish things that would otherwise be difficult or very difficult. Of course, in this plugin, I focused on recreating pixel-level destruction and control, reminiscent of Noita, Worms, and Lemmings, although Lemmings were all sprites. If you'd like the files, just ask and I'll send them to you.

  • Hey guys:

    I finally did it! Something I thought was impossible... Pixel-by-pixel destruction, and not only that, but also pixel-level generation of solid ground, sand, water, and acid, plus procedural generation and image masking with sprites or tiled backgrounds... It's insane!

    For a long time, I thought it was impossible to do with the C2 engine because the level of processing and control with JavaScript requires a lot of CPU and GPU cycles to control pixel by pixel and generate the changes. But by optimizing processes in ticks and using some new programming techniques, I was able to do this... Pixel-by-pixel destruction, perfect pixel destruction.

    TO TRY THE DEMO, YOU MUST HAVE A PC WITH A MOUSE AND KEYBOARD.

    DEMO: https://pixelperfectdestroy.netlify.app/

  • That looks neat! Is it similar to your destructible sprite behavior?

    Can you adjust the number of e.g. pieces created and force of explosion? Can you break off only parts of the sprite, e.g. the corner of the vase if it falls on the ground?

    It's similar, but only in concept; the mechanics and coding are different. Here, you destroy parts of the sprite by generating a square mesh, while in the other, you chip the entire sprite like glass, and it shatters using physics, both with and without volume. Check out all my plugins, behaviors, and a few shaders I've made. If you like them, send me a WhatsApp message at +56962775668 and I'll send them to you. There isn't much feedback here, and the idea is that if you come up with a plugin or behavior, we can implement it.

    I'm working on an AAA Autotile system to create auto-generated and destructible terrain.

  • esta genial, yo uso construct hace tiempo pero eso es muy bueno, yo no sabría como hacerlo así que felicidades

    Gracias, me puse a codificar PQ hay muchos comportamientos y plugins que onson de paga o son de difícil solución directamente en el ide, la idea es simplificar y mejorar C2, revisa los plugins, behaviors y Shaders que he hecho. Si te interesan mándame un whatsapp al ±56962775668, soy de Chile.

  • Looks cool!

    I did find a glitch though - if you take the sprite and drag it down from the green box over the beginning of the chain, it can break it and the chain sprites will begin glitching all over the place and slowly falling off screen. This only seems to happen with the 2 longest chains in the demo.

    Edit: ah I see the green boxes can also be moved. If you take them and pull them upward really fast you can break the chain that way as well. Happens with the 3 longest chains reliably. I think it might be due to physics behavior.

    Hola, si, estoy en conocimiento del bug que tiene el motor de fisicas, esto se debe a que el calculo del movimiento de ls fisicas es posterior al tick de movimiento y las 60 actualizaciones max. de C2 no alcanza a poner los eslabones donde corresponde. Esto se soluciona en parte aumentando el refresco e iteracciones, le puse 120 y 120, con eso quedo mucho mejor.

    Hi, yes, I'm aware of the bug in the physics engine. This is because the physics movement calculation occurs after the movement tick, and the maximum of 60 updates in C2 isn't enough to place the links correctly. This is partially solved by increasing the refresh rate and iterations; I set it to 120 and 120, and it works much better.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Hey,

    I'm trying to figure out a monster spawning method, where on condition the Spawner sprite creates monsters (based on its variables) at one of its specific image points.

    Question is, how could I simplify this with a Monster family and not repeat the event for each monster type...

    Not sure how to pass the moster type to the spawning function... Should I repeat a condition for each Monster there? Or there is a more elegant simplification?

    Thank You!

    Hi, I'm a little late, but better late than never :D.

    As I understand your problem, you have an indefinite number of monsters that appear randomly within certain parameters, and you want to simplify the process. Well, what I did was create an 8x8 spritesheet with a total of 64 monsters, and I put them all within a single sprite (although you could also use a family). Then I stopped the animation (value 0) and told the mouse that when you click each sprite (SingleMonsterBox), it should spawn a monster sprite and randomly select a frame from within the range of 0 to the total number of frames.

    With the MultiMonsterBox sprite, this is a single sprite with 7 image points. The same thing happens, except here I run a "for" loop with a loop index, telling it to iterate through the maximum number of image points and place a monster sprite at each one.

    I hope this method simplifies things for you and is useful for your project or a future one. Learning new things is always great.

    DEMO:https://demomonsterspawner.netlify.app/

    .CAPX:https://www.mediafire.com/file/7ybyrfqvsh76x85/demomonsterspawner.capx/file

  • Hey everyone!

    I wanted to let you know that I've just finished about 90% of a plugin I'm working on. It's a sprite breaker... a ShatterPhysics plugin. The idea is to give the sprite physics of shattering and exploding. I don't know if anyone else has done something like this or if it was even possible :D... But it was definitely challenging.

    DEMO: https://c2explode.netlify.app/

    DEMO2: https://breakglass.netlify.app/