bscarl88's Recent Forum Activity

  • Using the drawing canvas, I'm drawing images to make trees, that I then load that image into a tree sprite that I'd like to share with peers that join in my multiplayer game. How do I save the images in a way that the peers can then download these drawn images when loaded in? It's p2p connection where 1 person is the host. I have a signal server setup in C3.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Made an update to create tree textures on the planet. Here's some examples of them after being printed, and how they look in game.

    In Game

  • I'm making a 2D space extraction game, but I really wanted to make true unlimited variation of my planets/play space. So I use math and magic to generate colorful shapes from scratch, and turn them into plants. These are not stitched together pre-defined art assets, these are generated from scratch. Each image shows at least 1 "Tree" and 1 "Flower".

    PLEASE NOTE - It's a very early build, and my game is fully placement art and heavily under development. It all looks out of place, but I wanted to show off the tech's variation capabilities. These were a few planets directly in a row, not just taking what I thought looked best.

  • Using the multiplayer tool, and playin in chrome, I'm using a tilmeap to draw solid walls around my base. When a peer joins my game, their game freezes up when their movement is enabled (8D or Custom) and the solids are enabled. As long as only one of them is active, they won't freeze up. The tilemap i'm using only has an event to enable it's solid, nothing else. Even removing all the code behind the peer's movement still ensures that it freezes up, so I don't believe it's in my events.

    Ive tried this with using sprites/solid instead of a tilemap, and I still get the same issue.

    Here's the full console log: GoogleDrive

    Here's the distinct errors im seeing in the Console:

    layer.js:70 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'GetScale')

    at Layer.GetNormalScale (layer.js:70:262)

    at Layer.GetDisplayScale (layer.js:70:164)

    at Layer.LayerToCanvasCss (layer.js:77:256)

    at CollisionEngine.TestTilemapOverlapDifferentLayers (collisionEngine.js:9:282)

    at CollisionEngine._TestOverlap_DifferentLayers (collisionEngine.js:7:125)

    at CollisionEngine.TestOverlap (collisionEngine.js:5:335)

    at CollisionEngine.TestOverlapSolid (collisionEngine.js:21:366)

    at EightDirInstance.Tick (runtime.js:8:206)

    at C3Runtime._BehaviorTick (runtime.js:81:41)

    at C3Runtime.Step_AfterPreTick (runtime.js:88:241)

    ...

    runtime.js:7 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'GetDt')

    at EightDirInstance.Tick (runtime.js:7:354)

    at C3Runtime._BehaviorTick (runtime.js:81:41)

    at C3Runtime.Step_AfterPreTick (runtime.js:88:241)

    at C3Runtime.Tick (runtime.js:84:178)

    ...

    Uncaught (in promise) TypeError: Cannot read properties of null (reading 'GetObjectClass')

    at js_cols.RedBlackSet.SortByTickSequence [as compare] (behaviorInstance.js:4:360)

    at js_cols.RedBlackSet.get_ (redblackset.js:15:95)

    at js_cols.RedBlackSet.contains (redblackset.js:15:245)

    at RedBlackSet.Add (redblackset.js:27:256)

    at C3Runtime._AddBehInstToTick (runtime.js:80:104)

    at BulletInstance._StartTicking (sdkBehaviorInstanceBase.js:4:317)

    at new BulletInstance (runtime.js:4:92)

    at C3.New (jsutil.js:16:47)

    at BehaviorInstance._CreateSdkInstance (behaviorInstance.js:3:208)

    at Instance._CreateSdkInstance (instance.js:7:108)

    ...

    instance.js:9 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'Draw')

    at Instance.Draw (instance.js:9:296)

    at Layer._DrawInstance (layer.js:66:6)

    at Layer._DrawInstanceMaybeWithEffects (layer.js:65:339)

    at Layer._DrawInstances (layer.js:59:99)

    at Layer.Draw (layer.js:57:191)

    at Layout._DrawLayerList (layout.js:54:546)

    at Layer.Draw (layer.js:56:185)

    at Layout._DrawLayerList (layout.js:54:546)

    at Layout.DrawMain (layout.js:52:113)

    at C3Runtime._Render (runtime.js:102:144)

    ...

    behaviorInstance.js:4 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'GetObjectClass')

    at js_cols.RedBlackSet.SortByTickSequence [as compare] (behaviorInstance.js:4:360)

    at js_cols.RedBlackSet.get_ (redblackset.js:15:95)

    at js_cols.RedBlackSet.contains (redblackset.js:15:245)

    at RedBlackSet.Add (redblackset.js:27:256)

    at C3Runtime._AddBehInstToTick (runtime.js:80:104)

    at BulletInstance._StartTicking (sdkBehaviorInstanceBase.js:4:317)

    at new BulletInstance (runtime.js:4:92)

    at C3.New (jsutil.js:16:47)

    at BehaviorInstance._CreateSdkInstance (behaviorInst

    ...

  • I purchased them years ago for 2 games I was working on, i'm trying to get back to them in C2 (since C3 won't open them yet) but I need the leadbolt, and "Game" plugins. I found the github to purchase these, and I did purchase them for a 2nd time, but it seems this user has been inactive. I have not received the files. Does anyone know how to contact this user, or how to re-obtain their mods?

  • You probably have a lot of locations that are on top of each other and you disable different layers to show these locations? This is an archaic and inconvenient method, it's much easier to have a location nearby and just move the character there when descending to a new level....

    In your case, you don't need multiple obstacle maps. You need to add new objects to the obstacle map when descending to a new floor, and recalculate the obstacle map.

    This all sounds confusing, I think a small example with two floors would help explain it better.

    This is all accurate, I guess I could move everything to the main layer, but I will need to bound the camera to the size of the main map, then let it unbound when the player's go to the underground (which will be off the visible main map).

    "The obstacle maps are based off of square size and buffer size. If you have a unique square size (32x32) vs (30x30) or buffer size (-2 vs -1) for example they will record into a separate maps. Giving the map a different name doesn't make it different."

    I saw this from another post, but couldn't get this to work. If I could change the buffer size on creation of the enemy, then maybe I could get this to work, but it doesn't look like there's an option for that. I think my best bet will be to move everything to one layer instead of overlapping assets. Very unfortunate that C3 doesn't have more flexibility with the obstacle maps/pathfinding.

  • Is this possible yet? I looked through a bunch of posts, and the only hope I could find is that it was a potential update for C3.

    I have an "Underground" layer in my game, and the pathfinding obstacles in the lower layer is affecting the enemies in the top layer. The closest I got was spending 8 hours givign each enemy multiple pathfinding behaviors, in hopes each would save their own map, but this proved incorrect

  • Ideally I'd like to have voice chat, then parameterize the volume and direction for proximity chat. Im not seein any options though. I imagine the javascript functionality could open the door for it, or would that require an additional server? I'm running my game currently on the C3 multiplayer engine as a coop game for up to 5 people.

  • I've been making games for years now, and have been programming for work for 12 years. I was reading up that C3 multiplayer has had improvements, but it's still not going to offer a low latency experience (and even photon can have lag). So I saw a post mention that doing your own thing through WebSockets and Node.JS backend is the best way to implement multiplayer.

    I will be offering 4 or 5 players navigating around a layout that is 10kx10k, I'm confident I can make my own, but I'd rather use easier tools to speed things up as I'm doing everything on my own. Has C3 multiplayer plugins or options improved? or should I create my own server setup since I have the knowledge/ability.

    I'm also trying to export the game to steam, steam deck, possibly mobiles at some point. Does C3 have Xbox/PS integration yet, or SteamOS for that matter?

    Tagged:

  • I ended up getting it to work by breaking out my into one line per math equasion in the event sheet. then set the array from the event sheet, pointing to the localVar i had setup.

  • To be able to load a json string into the array object it needs to be in a specific format. You can see that format with array.asJSON.

    Something like this should work in converting your json string into a 1d construct array json.

    function convert(in){
    in = JSON.parse(in);
    let out = {c2array:true,size:[0,1,1],data:[]};
    for(let i=0; i<in.length; i++){
    out.data.push([[in[i].x]], [[in[i].y]]);
    out.size[0]+=2;
    }
    return JSON.stringify(out);
    }

    Then after loading that into the array object you can access the xy of the nth point with:

    X=array.at(n*2)

    Y=array.at(n*2+1)

    I'm trying to skip the JSON completely, and just use JS to manipulate the array, but I can't for the life of me get it to touch my array, am I doing something wrong here? my JS seems to be disconnected completely from my C3 sheet, even though I was able to get the values into a JSON. And it's purpose is set to import for events (even though only of my JS can have that label at a time for some reason?):

    function genPointsTest(numPoints) {
     // Choose the array
     const pointsArray = runtime.objects.points_Array.getFirstInstance;
     pointsArray.clear();
     pointsArray.setSize(numPoints + 1, 2);
    
     for (let i = 0; i <= numPoints; i++) {
     let phi = 25;
     let r = phi + 25;
     let x = r * Math.cos(phi);
     let y = r * Math.sin(phi);
    
     // Add the points to the Array
     pointsArray.setAt(x, i, 0);
     pointsArray.setAt(y, i, 1);
     }
    }
    }
  • Are you sure GenPoints() returns a string? You cannot really put JSON data into a Construct variable. You can try

    > 	runtime.globalVars.jsonPoints = JSON.stringify(GenPoints(...));
    

    As for the canvas, you have to use the proper scripting interface.

    https://www.construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/drawing-canvas

    GenPoints returns exactly this below. I use stringify in my return on GenPoints.:

    [{"x":1,"y":0}, {"x":3.6385872025818373,"y":1.6200033965859757},{"x":0.9503872615007972,"y":1.0555119865570302},{"x":0.4389065636069681,"y":1.3508155051713286},{"x":-0.4163295056303866,"y":3.961110649613818},{"x":-0.4999999999999998,"y":0.8660254037844387},{"x":-3.2222576969514476,"y":2.3411072530278374},{"x":-1.3892938251077656,"y":0.29530351861429965},{"x":3.6385872025818435,"y":-1.6200033965859781}, {"x":1,"y":-2.4492935982947064e-16}]

    I'd rather save all these points to an array, maybe a dictionary? and then just do the canvas outside of Javascript. But I can't figure out how to get these x,y coordinates into an array

bscarl88's avatar

bscarl88

Member since 11 Oct, 2012

None one is following bscarl88 yet!

Connect with bscarl88

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies