WackyToaster's Recent Forum Activity

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)

  • Not that I'm aware off. Worst case I assume it has some performance overhead which is not really a drawback but a trade-off.

    ...or else it wouldn't be something off by default

    The reality is it's probably off by default simply because most layers don't need to be HTML layers. It would make no sense to make it a default if by default it's not needed.

  • Hmm I don't think this is possible with the build in plugin. The first issue is that, as you noticed, there's no way of deleting part of the ongoing recording. Deleting it before download may be possible, but it will still continously record footage, possibly until it runs out of memory (and crashes or something).

    Not sure how I'd tackle this problem.

  • I'd go the array route.

    1. Array with your dataset

    2. Sort Array based on amount

    3. Loop through array, copy the current entry into another Array. Compare the "loopindex" amount with the "loopindex+1" amount. If the comparison is true, repeat the loop, otherwise stop the loop.

    4. You now have an array that contains all fruits that tied for the highest amount (one or more)

    5. You can output a random entry from that array like Array.At(floor(random(0,Array.length+1)))

  • Yes, overlapping buttons can cause both of them to be clicked. When you hide a layer (or overlay something), you should probably also set it to non-interactive (system > set layer interactive)

  • Yeah this is one of the quirks you'll have to deal with. Is this a solid or a jumpthrough platform? Either way the platform behavior has a bunch of quirks like this which aren't exactly fixable, because it works perfectly for project A but not for project B and fixing it for project B breaks project A.

    In a way it even makes sense, the character steps off the platform, but the platform moves under the character before it can fall. Maybe you could try to add the platforms velocityX to the character when it steps off so the character sort of gets flung off at the same speed the platform moves, so the platform can't catch up to the character anymore?

  • I don't think this is gonna get implemented, it's just not a feature that would be used a lot, apart from some gimmicky stuff (in regards to games that is, since Construct is a game engine first and foremost)

    However, Construct does let you add javascript. It seems quite benign actually to add the functionality you want with a few lines of code.

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

  • You will own nothing and you will be happy.

    But really though, it's just more sustainable and predictable from a business perspective. Why pay for that subscription? Because I think it's worth it for me. People gladly pay subscriptions for stuff like netflix without batting an eye but as soon as it's a useful tool, suddenly it's terrible and bad. It's not even expensive either. Adobe Creative thingy costs 60€ per month, 3ds Max costs 274€ per month.

    And wait till you find out about taxes.

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 25 followers

Connect with WackyToaster

Blogs