GizmoSP's Recent Forum Activity

  • So I'm currently working on a racing game, and the final position you score is determined by a family instance variable called Time_Spent_Racing, with the family being called "Racers" containing both the player and the CPUs. Time_Spent_Racing increases by 1 every tick, and the racer with the lowest Time_Spent_Racing gets their Final_Position instance variable set to 1 (1st place), and vice versa for getting last place.

    When a CPU crosses the finish line, their position should be calculated on the spot. If they've not crossed the finish line yet, their position should say "Running..." on the results screen until they've finished the race.

    I need a script that calculates each Racer's Time_Spent_Racing, and then ranking them from lowest to highest and then giving a respective Final_Position number (ie. 1st, 2nd, 3rd, etc.)

    I'm sure there's an easy way to do this, but I just haven't found it yet. If any of you would like me to elaborate further, I can.

    Thanks!

  • If you're saying the problem is when you include the player with CPU, it can be resolved by using a Family for example called 'Racers' that contains the player and CPU, with a family instance variable for position for example Racers.pos

    Hey lionz, sorry for the late reply, but I wanted to ask how exactly I should change my code to account for a family instance variable? Also, should the family instance variable be for the PosScore or the current position?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, I am working on a 2D top-down racing game. I've implemented CPU opponents as well as a system for calculating the player's current position (1st, 2nd, etc.) But I've been struggling with how to calculate the CPU's current position.

    The system I made is that each racer (both the player and all of the CPUs) have an instance variable called PosScore. Basically, the higher the PosScore, the further you are in the race. For the player, I can just compare the PosScore against all the other CPU's PosScores in order to calculate your current position. But for the CPUs it's different because I have to compare the PosScore against both the player and all the other CPUs.

    The preferable solution would be for every CPU to have a "CurrentPosition" instance variable that updates accordingly like it does for the player.

    Here's how I'm calculating the PosScore variables for both the CPUs and the player:

  • Hello C3 community,

    I'm currently working on my very own F-Zero fangame (I love the games so much) and I wanted to implement a mechanic where your acceleration decreases as you get faster, to provide a stronger sense of momentum.

    I want to use the Tween behavior to have the acceleration decrease gradually. So I made this script, and it doesn't seem to work properly. The player's acceleration doesn't change at all unless they're boosting. I checked the code and it didn't seem like there were any instances of the acceleration forcing itself to remain at its normal value every tick, so I'm not sure what to do here. Any help or alternative solutions are greatly appreciated!

  • Hey, I've been getting this error message whenever I use Construct 3 for a few seconds or so.

    Here's the information text:

    Error report information

    Type: unhandled exception

    File: editor.construct.net, line 1, col 196

    Message: Uncaught TypeError: Cannot redefine property: googletag

    Stack: TypeError: Cannot redefine property: googletag at Function.defineProperty () at :1:196 at :1:524

    Construct version: r379

    URL: editor.construct.net

    Date: Tue Mar 19 2024 08:34:17 GMT-0400 (Eastern Daylight Time)

    Uptime: 49.5 s

    Platform information

    Product: Construct 3 r379 (stable)

    Browser: Edge 122.0.2365.92

    Browser engine: Chromium

    Context: browser

    Operating system: Windows 11

    Device type: desktop

    Device pixel ratio: 1

    Logical CPU cores: 4

    Approx. device memory: 8 GB

    User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0

    Language setting: en-US

    WebGL information

    Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium)

    Numeric version: 2

    Supports NPOT textures: yes

    Supports GPU profiling: no

    Supports highp precision: yes

    Vendor: Google Inc. (Intel)

    Renderer: ANGLE (Intel, Intel(R) UHD Graphics (0x00008A56) Direct3D11 vs_5_0 ps_5_0, D3D11)

    Major performance caveat: no

    Maximum texture size: 16384

    Point size range: 1 to 1024

    Extensions: EXT_clip_control, EXT_color_buffer_float, EXT_color_buffer_half_float, EXT_conservative_depth, EXT_depth_clamp, EXT_disjoint_timer_query_webgl2, EXT_float_blend, EXT_polygon_offset_clamp, EXT_texture_compression_bptc, EXT_texture_compression_rgtc, EXT_texture_filter_anisotropic, EXT_texture_norm16, KHR_parallel_shader_compile, NV_shader_noperspective_interpolation, OES_draw_buffers_indexed, OES_texture_float_linear, OVR_multiview2, WEBGL_blend_func_extended, WEBGL_clip_cull_distance, WEBGL_compressed_texture_s3tc, WEBGL_compressed_texture_s3tc_srgb, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_lose_context, WEBGL_multi_draw, WEBGL_polygon_mode, WEBGL_provoking_vertex

  • Hello C3 community,

    I made this fun little top-down F-Zero prototype in a few days, and I'm really happy with how it turned out! I plan to make this engine into a full F-Zero fangame at some point, so I'd really appreciate you guys' support and feedback!

    You can play the game here: https://www.construct.net/en/free-online-games/f-zero-game-prototype-62414/play

  • UPDATE: I figured it out, turns out that I had the wall at a very slight angle of 0.7 instead of 0, which allowed me to stand on it. Kind of a silly mistake on my part lol

  • Yeah that can't be the issue then. It's hard to guess without a cp3 file.

    I can provide that

    drive.google.com/file/d/15xelukiI10P1_K0IzeCk8RVTWe5YD5F7/view

  • I said I already followed a tutorial, so what do you mean by this?

  • Hello Construct Forums,

    I was making a wall jump code (code taken from these videos) And after some testing I found a strange bug that only happens when a player walljumps off of the left side of a wall while holding right (it dosen't work on the right side.) The player will jitter and get stuck (see the video) This bug is very inconsistent as well, sometimes it just doesn't happen and the walljump works as intended. This might be related to another bug that I'm having where my player can stand on walls, but unlike this bug, that bug only works on the right side of a wall. (forum post for that bug here.

    )

    Subscribe to Construct videos now
  • You do not have permission to view this post

  • Yes, it does have a separate sprite with the platform behavior. Although its collision polygon is set to bounding box, so I'm not sure if that's the issue

GizmoSP's avatar

GizmoSP

Member since 12 Jun, 2019

Twitter
GizmoSP has 1 followers

Trophy Case

  • 5-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

7/44
How to earn trophies