c13303's Forum Posts

  • Hi fellow developpers

    I'm trying to import jsfxr in my project, first time I'm using the script feature.

    (this is the famous JS sound generator : sfxr.me )

    In main.js, I'm using :

    	import * as sfxrModule from "./sfxr.js";
    

    But I got this error :

    Uncaught TypeError: Cannot set properties of undefined (setting 'jsfx')

    The code is at the beginning of the script file :

    (function(root, factory) {
    	if (typeof module === "object" && typeof module.exports === "object") {
    		module.exports = factory();
    	} else {
    		root.jsfx = factory(); // error at this line
    	}
    }

    Any information about this ?

    Thanks

  • Hi !

    I'm using C3 for an art project so it has to stay alive for a very long time (a day long)

    The game itself takes a lot of CPU but it goes alright when you play.

    When the game is idling, it goes back to a very minimalistic scene, so I thought it would not use CPU/memory. The only event is like "goto layout X when any key is pressed". No sound or anything.

    But actually Chrome still goes "out of memory" after some time, game after game, (30 minutes~1 hour, depending the computer) and I don't understand how it is possible since the game does absolutely nothing when it gets back to intro scene.

    I'm no memory expert but still I tried to watch debug tools :

    - C3 intro scene shows : 3,7% CPU, 0% GPU, 49.6mb images

    - In memory tab in dev tools for Chrome, I see JS memory heap is constantly increasing, even when the game goes back to intro scene

    Could it come from there ? It sound logical that the browser will go out of memory if the use is always increasing. How to avoid that ?

  • Hi ! I did a vaporwave museum virtual space with a "3D" engine of my own, made with Construct 3, exclusively done with sprites. Original 2000s era GIFs are exhibed in there.

    This is also a multiplayer persistant world, supported by node.js server, so you can meet your friends in the virtual space

    I've done that for an exhibition on Vaporwave and liminal spaces, opening this thursday june 15th at les Ateliers du Vent, in Rennes, France.

    this is a beta version, and sorry for the french accent of the TTS (well, I'm not sure, would non-french people get their computer tongue accent ? please tell me ;-) )

    vaporwave.5tfu.org

  • Okay thanks both Ashley and WackyToaster I think this is giving a clear answer and explanation to my question !

  • Well Vampire Survivors is the Phaser example for me here

  • Thanks for replying guys !

    alextro : Thanks for this file ! Super nice for testing. You actually did it yourself ? Well I notice a little stuttering from time to time by my side, and I think we're still far from the Vampire Survivor's amount of ennemies, but I believe there's still have room for optimization ? However I'm afraid this is already showing that something coded with Phaser could be more efficient from that point of view ...

    Beside that, it looks like a nice starter for the project I think I'll try to tweak it and see what happens.

    KryptoPixel this file bring an enenmi movement and the beginning of the crowd pushing stuff, that could be a starter for you too.

  • Hi everyone,

    For those who know a bit Construct 3, I was wondering what you think about using it for a bullet hell game (with tons of sprites on the screen, and collision management) regarding the performance.

    I'm using Construct for more than a decade so I know very well (I think) the software.

    Since C3 automatically do a ton of basic things, I'm thinking (and I may be wrong) that it's using average optimisation for components so it can be useable for many different purposes. So that C3 is not the most optimized engine you can have for a specific kind of game.

    I was surprised to read that Vampire Survivors was made with Phaser, the game doesn't lag for me and I've never seen that much sprites exploding on screen in a game. So I figured that now JS/HTML5 and nowadays computers can manage this kind of sprite explosion hell game.

    But would C3 do ? Back in the days I did some test on C2 and it wasn't very good, even with me trying to optimize (disabling collisions and stuff like that). But these were old computers, old browsers and things may have changed. Also C2 is not C3.

    Is there a reason to think that today Construct 3 wouldn't be as optimised than a hand coded thing ? Or at least that kind of game is more difficult to optimize with C3 ? Should a pro better go Phaser instead ?

    Personnaly, I think I've made my choice and will use C3 for my game (I'm not a profesionnal), but I'm quite curious about the answer to that question.

    Thanks for any info about that.

  • Well I did find a fix by adding a H.264 source to the video object, with a mp4 video.

    And the iphone plays that one.

    And now the sound is back.

    Very strange. Maybe the webm video has a wrong codec and it make the whole sound fail.

    So I can move on and the problem is fixed for my project.

    Still something disturbing : any other C3 project still run without sound on Iphone (those from the C3 website)

    Example : I make a new project, audio object, tap object, import a mp3 converted into webm. Play the audio on tap : no sound on iPhone. No errors in console.

  • Hello everyone,

    I'm working on a nice professionnal project since a couple of week. Everything was going fine, it was playing a background video and music, it worked on iPhone. I actually have an old build with all these working.

    But suddenly, after a couple of little updates unrelated to audio/video, these stopped working on the iPhone. With remote preview or on the server, they just don't play no more.

    So I did a minimal project with just a webm video + webm sound to sort it out. They are triggered by a first tap button. Nothing happens on the iPhone.

    Note : the sound demo projects included in C3 (audio FX, positionned audio) don't have sound anymore on my iPhone either. I don't know if they were they supposed to work before. I updated my iPhone (iPhone SE 2020, not old) but it's not better.

    I don't understand at all.

    If anyone is kind enough to check this minimal project, you can get it here :

    drive.google.com/file/d/12P9qEjL7YfySE9He_8VNmylqrgin1x7I/view

    and tell me if "audio effects" and "positionned audio" are supposed to work on iPhone. So maybe it's my iPhone even if there arent any reason for that ...

    Thanks !

    Even just to check if it's just my iphone or everyone.

    Thanks

  • Hi, so I have my text.json which has been imported into the Files folder of the project.

    I want to put into dictionary.

    How can I access the string from the file ?

    Tagged:

  • YAD stands for You Are Dead, and is a simulator of life after death, and is a demo for the 3DmatinEngine.

    It's a simple "3D" representation of a 2D map.

    http://webmecano.com/c2/yad/7/

    Use arrows to move and space bar to drop a snake.

  • Hi ! I aim to detect the mouse movement for a FPS game : left and right.

    So, yes of course I can use the comparison between Mouse.X and OldMouse.X to know if the cursor has moved to the left or the right . But it's not working any more one the cursor has reached the border of screen (Mouse.X stays at 0) so I can't detect that the mouse is still moving to the left.

    Does anyone think of a way to achieve that ?

    Thanks

  • there's many ways to do it, and depends of what you're calling "a door" in your gameplay.

    you can basically do it with a sprite with a solid behavior (to block movement and bullets) and a rotation behavior (to open / close) with events to make it open close and open on demand (at sprite collision ? when a key is pressed ? that's up to you)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use the tilemap method positionToTileX and positionToTileY to get tile position (col/row) from screen coordinates.

    it would be something like

    col : tilemap.positiontotileX(sprite.x)

    row : tilemap.positiontotileY(sprite.y)

  • Hi,

    My nodejs server receive this array from C2 (via websocket) , I already have parsed the data with JSON.parse()

    console.log(array)

    [ [

    [ -1 ], [ 0 ], [ 0 ], [ 0 ] ], [

    [ -1 ], [ 0 ], [ 0 ], [ 0 ] ], [

    [ -1 ], [ 0 ], [ 0 ], [ 0 ] ], [

    [ -1 ], [ 0 ], [ 0 ], [ 0 ] ], [

    [ -1 ], [ 0 ], [ 0 ], [ -1 ] ], [

    [ -1 ], [ 0 ], [ 0 ], [ -1 ] ] ]

    But for now I didn't find a way to read all the values.

    Apparently array[x][y] does not work. because array[0] returns undefined and array[0][0] makes an error.

    Can anyone help ? thanks !