WackyToaster's Forum Posts

  • Tbh, I need to learn to do this. Ashley told me about subclassing and I was like ermergosh. The problem is that, if I wanted to use that feature, I would need to move more into JS, while the behaviors let me still use the event sheet.

    It's easily one of the best features out there and I have a hunch it's woefully underutilized for how easy it is to set up. Subclassing and mixins should be high up on your list if you want to make modular stuff imo.

  • How about this:

    1. The bird does it's thing and flies off screen

    2. Instead of destroying it, just suspend it (disable it's behavior, there are various ways to do this: e.g. disable a group, set a boolean to false or a state machine) use the timer behavior to start a two second timer on the bird

    3. On timer, reset & enable the behavior of the bird again (as in give it back the rock) and set its position to Y = whatever height you want it to patrol and X = player.X + screen width/2 + some offset so it starts off-screen

    4. This would also be the place were you can test if the bird spawns outside of its patrol area (if player.X + screen width/2 + some offset > rightWall.X) If that's the case, you can instead just start the timer again, which would mean every 2 seconds the bird will check if the player is in the right position for the bird to spawn inside the patrol area.

  • const valueAt00 = scheduleArray.get(0, 0); // Correct method to use

    It's the incorrect method. The correct method is scheduleArray.getAt(0,0)

    In such cases I always recommend to consult the manual over gpt, because gpt will not be familiar with the API of Construct.

    construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/array

  • Yeah I've read your posts about js blocks but I'm not sure if there's a solution for it other than offloading more and more work into js directly. Keep js blocks minimal and handle the rest outside the eventsheet. Sure, Ashley could start fixing this somehow but it's one of these things that is straight up not relevant for a vast majority of users, so I can understand why he brushes it off.

    Managing per instance arrays, or dictionaries requires an amount of repetitive boiler plate every time you use it.

    This is one of the cases why I really dislike working with data structures in eventsheet context. Overboys addon does solve this exactly how I would envision it should be solved, like instance variables being able to hold arrays/json/data. But I'm at the point where I'm very comfortable in js so I'd just subclass the instance, give it a this.array and some methods to handle the data and call it a day. (If I ever manage to push out my current game, my next game will probably be 95% js)

    Anyway, I think this is fine. That's exactly why there's javascript, to handle the cases that the event engine can't. Advanced problems require advanced solutions.

  • No idea, I'd have to try the project. A different although silly idea I had was to record 30 videos at the same time, all offset by 1 second. So when a highlight is requested you can just save the most recent one. But that's kind of an absurd solution.

    I also found some js implementations of ffmpeg, perhaps something could be done with this?

  • Since you're already writing custom behaviors, what about just doing it in js directly? Surely the stuff you're looking for can be done with some js. Arguably there are cases that the event engine will not be able to handle as elegantly, but most games don't actually require this amount of complexity.

    Doing it via events, I'd think of adding an array per instance, with strings that then call mapped functions per string. If a string doesn't exist, nothing is called or acted upon, so no further overhead.

  • Hey that's kinda cool. Sadly attacking doesn't seem to work for me, maybe because I'm on german keyboard layout (Z and Y are swapped). I tried hitting pretty much all keys available to me to no avail.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Still kind of hard to tell what actually is going on but regardless, it's very unusual that mobile browsers would work different.

    Wild guess, but you have 2 "wait 0.75 seconds" actions inside the every "1.5 seconds" condition. So perhaps there is some weird overlap happening due to some rounding error. Maybe changing the second wait to be slightly shorter could fix it?

    Otherwise you'll have to post the project to check out because I don't think anyone can find out what would cause this without being able to check out the project myself.

  • You may be seing ghosting/blurring artifacts that are actually caused by your monitor rather than Construct. You can check this if you make a screenrecording, then play the recording and pause at a moment where the effect occurs. If it goes away the moment you pause, it is most likely your monitor having ghosting.

    You can also check testufo.com which has a bunch of tests and examples where you can check if your monitor is ghosting.

  • The engine is perfect to onboard non-programmers into programming. The eventsheets work surprisingly close to regular javascript, they just don't look like it and seem less obscure to a nooby than a bunch of textblocks with weird cryptic looking words. So by working with eventsheets, you also learn the overall logical structure that javascript uses without noticing it.

    Also as a general thing, not compared to a gameengine but rather specifically adobe. The support is just peak. You post a bug, you'll get at least an answer even if the answer is no. Adobe on the other hand... lol. I've had a bug with photoshop that would freeze photoshop when I use a wacom graphics tablet. No real solutions found to be anywhere, other users have the same problem. I've went through different iterations of photoshop, windows software, pc hardware and tablet hardware/drivers over the years and I've always ran into this problem again and again. Other drawing software works perfectly fine, so the issue clearly has to be fixed from Adobes side. It is unfixed to this very day in 2024 (I recently bought a new tablet, thought I'd give it another try and behold, the same issue again), I've first encountered the issue in ~2012, and repeatedly since then. It's been reported to Adobe multiple times by me and others, no fix for well over a decade.

    Alright that's enough adobe slander for today.

  • It's always hard to debug projects without actually having the project at hand. The codeblock you copypasted is also just kinda hard to read, a screenshot of the events is better. But ideally you can provide a project file that demonstrates the issue.

    One guess could be that "Wait 0.75 seconds" leads to some kind of issue. Wait in general is tricky to use and can lead to a bunch of problems.

    Also what exactly is a "duplication error in the first digit"? Can you post a comparison between the error and what the result actually should look like?

  • I gave my idea a shot but unfortunately I'm running into the issue that I cannot just discard older chunks. I'm assuming the first chunk aka the beginning contains some vital information/header, so the recording gets corrupted once the 30 second mark is passed because that first chunk gets removed. Keeping it also does not properly work and just creates some nice visual glitches in the resulting video if it works at all.

    I found very little information on this and no real solutions. Not sure if there is some kind of magic one could employ to get this to work. The only possible solution I saw (although in a different context) was this stackoverflow.com/questions/42127276/trim-or-cut-audio-recorded-with-mediarecorder-js

    But I have no clue how to actually implement this since it's for audio and not video.

    I can't post the c3p right now but here's the relevant js code which almost works but alas.

    	export class ReplaySystem {
    	constructor() {
    		this.stream = document.querySelector("canvas").captureStream();
    		this.highlightDuration = 10;
    		
    		this.mediaRecorder = new MediaRecorder(this.stream, {"mimeType": "video/webm"});
    		this.mediaRecorder.ondataavailable = this.dataAvailable.bind(this);
    		
    		this.replay = [];
    	}
    	
    	startRecording() {
    		this.mediaRecorder.start(1000);
    		console.log("Recording started");
    	}
    	
    	stopRecording() {
    		this.mediaRecorder.stop();
    		this.replay = [];
    		console.log("Recording stopped");	
    	}
    	
    	addChunk(chunk) {
    		this.replay.push(chunk);
    		if(this.replay.length > this.highlightDuration) {
    			this.replay.shift();
    		}
    	}
    	
    	dataAvailable(ev) {
    		this.addChunk(ev.data);
    	}
    	
    	captureHighlight(runtime) { 
    		const highlight = new Blob(this.replay, {type: 'video/webm'});
    		const url = URL.createObjectURL(highlight);
    		
    		runtime.callFunction("downloadHighlight", url);
    	}
    }
    
  • One of the feedbacks that I've seen pop up constantly is that "Scirra needs to release new features as early as possible so users can give feedback before everything is set in stone". So releasing early you cannot expect the feature to be fleshed out and perfect after a few weeks. I just think the flowcharts need more time to cook, and I hope they will indeed be cooking. Arcweave seems to have been around since 2018, and it's a dedicated tool for just this task, so I'm not surprised that it's much more fleshed out at this point.

    These examples are really good btw., very simple yet obvious use cases that should work.

  • I've looked around a bit and I think your best bet is to go the javascript route. It might not be as hard as it seems at first.

    Use the mediarecorder api, which I assume is what the plugin also uses under the hood

    developer.mozilla.org/en-US/docs/Web/API/MediaRecorder

    Specifically note this part

    MediaRecorder.start()

    Begins recording media; this method can optionally be passed a timeslice argument with a value in milliseconds. If this is specified, the media will be captured in separate chunks of that duration, rather than the default behavior of recording the media in a single large chunk.

    So you can specifiy to automatically record chunks of 1 second. Every second from then on will fire the dataavailable event.

    Within this event you can store the created data chunks however you please (e.g. an array of 30 for 30 seconds of recording)

    Then when the user requests the highlight you can combine them like so (and I think this should generate a blob url that you can then invoke a download on)

    function play() {
     var superBuffer = new Blob(recordedChunks);
    }

    It's basically what citron2010 suggested but handling it in js is going to be much easier than doing some roundabout way in events.

    EDIT: It should also avoid the issue with requesting permission. This should only request permission once, when the recording starts. After that it's just a continous recording, that you can tap in at any given moment to extract the last 30 seconds from.

  • I'd say this is not exactly a properly made tilemap, at least in the context of constructs tilemaps. This tilemap seems to assume that tiles can simply be stacked over each other (as if you have multiple layers of tilemaps) whereas the tilemap in construct is 1 layer, so tiles cannot stack, period. You can either create the missing tiles you need on your own or you can stack multiple tilemaps on top of each other to emulate the layering (I do not recommend that, it's going to be arduous to work with)