Exyt's Recent Forum Activity

  • Wow, this second file is more complicated... X) I didn't understand what you're doing... But anyway, the 1st one helped a lot and unlock my dev process ^_^

    It looks more complicated for almost the same result... What are the differences please ? And how could it help me in my game ?

    On start of layout, you place buildings, and unlock fog of war around friendly building. But after that, all the things with wallclocktime and Array... Didn't get it X)

    Are you adjusting the array size and values according to the tiles (type and position) around the player ? If so, that's clever. But it didn't suit to my game, where there are several units (like any tactical/RTS game, like Men of War, Company of Heroes, Starcraft,...)

    And thank you for your answer about For Each and Debug. I understand better now

    This project is very important to me. So... if I become popular with it, I will not forget your help ! ^_^

  • Thank you !!!! That's exactly what I was looking for

    Using local variables and loopindex to apply changes only on the concerned tiles, and apply tiles on an *area*.... I didn't know these techniques yet. Brilliant ideas !

    Thanks again. Go back to work

    However, I have few questions left :

    • The "For Each [Family]" pick all objects of the family and apply the action every tick. No need to add a "Every tick" condition. That's right ?
    • therefore, there's no need to set the same events on start of layout, as soon as there are active for every tick ?
    • Is it normal that the game runs slower in debug ? Moreover, I have 10fps with "inspect" window opened, and when i switch to "profile" window, 120fps are back. Usual too ?
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone !

    I have big performance issues with my current game project (a real time tactical game, with terrain invasion (like Splatoon or Starcraft's Zerg creep !)).

    100% CPU usage and 4~10 FPS.

    The game area is a 40x40 grid, made of 32x32 pixels Tiles (1280px wide)

    There is a 3D Array to save Race (humans, aliens,...), Type (hill, river, building,...) and Discovery Status (yes or no).

    And there is a Fog of War function : units explore to reveal the map, and all the tiles = PlayerRace are auto-discovered (on layout start if any, or at anytime).

    The goal : units move on a yet undiscovered and neutral map, and they can explore and invade tiles (=> the tile image changes according to the race it belongs).

    I first created the grid with sprites (using several animations and frames to display the various informations but there should be 5 races, with a lot of tiles each. One tilemap per race seems the best deal, for me). For now, I work with a single TileMap containing the 6 Race Color Tile Sprites and Fog Tile Sprite.

    But as I'm learning more and more about C2, I want to improve my event sheet with less events, and more complicated stuff (loop). I thought it'd be a good idea to use tilemap and For Each (already used and approved for my training game JumpLin Game (check my profile)).

    Now I don't know what to do to make this system work.

    The current code :

    (on start of layout, the array is filled with a "0" value. In 1D, it's for neutral ownership. In 2D for the basic environnement. In 3D for "undiscovered" status. And after that, the grid is filled with tiles, all neutral for now).

    Screenshots :

    The CPU killer code :

    Few adjustments. No more 100% CPU, 15FPS... but no tiles displayed X)

    For Each XYZ element :

    ___ check Z = 2 ||||||||||||||||||| Set Fog of War Tile Sprite

    ___ check value = undiscovered

    ___ check Z=2 |||||||||||||||| Set Race Tile Sprite (according to Z=0)

    ___ check value = discovered

    ___ check "Race on Tile = Player Race" ||||| Set Tile to discovered (in Z=2)

    ___ For Each FamilyUnits

    ________ -3 < X > +3 ||||||||||||||| Set Tile to discovered (in Z=2)

    ________ -3 < Y > +3

    All the planned functionalities are not yet added and it already doesn't work ! X)

    What can I do please ?

    Go back to Sprites, animations and frames ? (I don't think the problem is here...)

    Improve my usage of "For Each" loop ?

    Don't use a single Array ?

    Functions ?

    Thank you for your help ! I hope i've been clear (sorry for my bad english).

Exyt's avatar

Exyt

Member since 12 Sep, 2016

None one is following Exyt yet!

Trophy Case

  • 8-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

10/44
How to earn trophies