afgho's Forum Posts

  • How did you get the enemy ship to do that AI? I can't seem to open the game event to look.

    The AI is very primitive, it follow and orbit the player at a random angle, the orbit angle change from time to time, the ship try to evitate the player if it go too near and that is all, basically.

    Here is a simple sample:

    dl.dropbox.com/u/64479453/SpaceShooterAI_Example.capx

    And test (use UP arrow to go in the direction of the cursor, down to stop moving): dl.dropbox.com/u/64479453/C2SpaceShooter%20AI%20Example/index.html

    I am still polishing the game right now (now 211 events) and will release it soon on the arcade, the "code" was (and still is) very crappy, it was made in less than 2 weeks on hurry, also got huge problems fixing the game each time a new update of C2 was released, the game broke down at each updates basically. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Did further tests on an EEEPC, the game is running at 12 fps with a timer milliseconds displayed every frames, without it run at around 28 and it is on Chrome, i don't have anything much going on than just the constant text update...

    Is constant text update really that bad?

  • Any ideas? Might just be Firefox js performance but it is a bit strange as performances are almost the same as Chrome without intensve text update.

  • A simple plugin to compress/decompress a string using deflate algorithm, it use js-deflate/js-base64, i needed this in order to send/receive heavy data over websocket but it can be used to save localstorage space, it is useless though if you use it to compress small string.

    2 expressions to use:

    • Deflate.Compress(string, compression-level)
    • Deflate.Decompress(string)

    Compression-level can be 1 (poor but fast) to 9 (best but slowest)

    The "Compress" function also encode the compressed data using Base64, the string passed to the decompress function should also be Base64 encoded.

    Note: Base32k plugin "compress" better sometime (depend on data) but Deflate can be used with Base32k to compress even more (up to 2.5x, look at the demo), it is slower though.

    Plugin: dl.dropbox.com/u/64479453/C2_Plugins/deflate.zip

    Demo: dl.dropbox.com/u/64479453/C2_Plugins/DeflateDemo/index.html

    Demo Deflate+Base32k: dl.dropbox.com/u/64479453/C2_Plugins/DeflateDemoWithBase32k/index.html

    .capx: dl.dropbox.com/u/64479453/C2_Plugins/DeflateDemo.capx

    .capx (need Base32k plugin): dl.dropbox.com/u/64479453/C2_Plugins/DeflateDemoWithBase32k.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dl.dropbox.com/u/64479453/timer.capx

    This display a simple timer "min:sec:ms", in Firefox press space to switch the display to "min:sec" and watch out the CPU utilisation between both.

    Made a blank loop as well so the cpu utilisation is an approximation of the cpu use in my game.

    Result here:

    ~0.80 for m:s:ms

    ~0.35 for m:s

  • Hello,

    i did a counter for a game (WebGL) and i need to show milliseconds every ticks but it seem there is a huge performance hit when a text object is updated every ticks especially when trying to show fast changing values such as milliseconds in real time, the huge performance hit happen only when showing milliseconds, i bet Construct 2 is doing some king of optimization which prevent the text to be redrawn or something like this so it do not happen with slow changing values.

    The game lose almost half fps on Firefox when doing this, however on Chrome it seem the performance hit is very negligible.

    Example:

    • Create a text object
    • Update it every ticks with "time" value
    • Monitor "cpuutiisation" value with "time" value and with "int(time%60)"

    In my game (on Firefox) the result is:

    • CPU Utilisation-> 0.20 with "time" value
    • CPU Utilisation-> 0.80 with "int(time%60)" value

    Can it be improved or is there a workaround?

  • Oh wow, thank, problem solved, didn't thought of this, the problem can indeed be easily solved by creating a layer with parralax set to 0,0 and add objects that need to stay on screen there... they will not be affected by any scrolling change so no more worries about any flickering and i guess this is better performance wise than updating every frames

  • It seem using 'Anchor' behaviors on any objects and do a scrolling (either crollto or manually) result in some visual 'flickering' on objects when starting/stopping to scroll, it is noticeable even when moving, is there a fix?

    Right now i just do it manually trough events but if there is a solution to make smooth anchoring then it would be faster to do and would maybe speed up things a bit, i just hate any flickers so i don't use anchor behavior, this mean i have to keep track of all static objects initial positions then update every objects on a regular basis...

    As for example, well, just make an object (or multiples one as it is more noticeable when there is many) with an anchor behavior then make an object with scrollto and one movement behavior and you will see what i mean, when you move you will notice some 'jumping'/'flickering' on the anchored object.

  • Could the pathfinder work with isometric games? Do you plan to add an option to change the heuristic?

  • Yeah, i am in the process to ameliorate it a bit before putting it on the arcade, the truth about the game is that it was not intended as a multidirectional shooter at first but as a 4x Master of Orion style game however i didn't had enough time.

    Also, how would you like the controls to be? is it because of the mouse?

  • Thanks, the game can be quite difficult if you don't grasp the controls, the key to defeat fighters is just to use side thrusters really (left/right keys) you can then rotate around them and hit them from far away without them hitting you, enemies AI is relatively weak so i am gonna work on that too, also once you beat a easy planet just buy a weapon upgrade/shield upgrade and it should be a lot easier.

    Moving is just done by pointing the mouse cursor to the direction you want to go then press W or Up arrow to go forward, Down arrow and S to slow down the ship.

  • Thank you, i am going to polish it a bit after the contest is over.

    1. Yes it is intentional, the area is small to keep the difficulty, it force the player to fight around the planet and encounter all enemies also enemies stats/types are a bit random so sometime if it is too difficult it can help to leave the area and come back so you don't lose lives, money/score isn't counted though when you leave and don't kill all enemies.

    2. The game actually need more balancing but if you keep moving/use side thrusters and handle shields by rotating i think it is pretty easy as long as you don't hit any enemies especially thoses rotating around the planet, after 1 or 2 easy planets you should also have enough money to get better shields/armor, easy planets should be a piece of cake after. <img src="smileys/smiley1.gif" border="0" align="middle" />

    3. You can slow down with Down arrow/S, the ship should also gradually slow down due to gravity of the planet but outside a certain radius the gravity is pretty weak so it do not affect much the ship speed

  • <center></center>

    <center><font size="5">Play the game</font></center>

    <center><font size="1">Official entry thread</font></center>

    <center><font size="1">Project file (.capx) ~80mb</font></center>

    Star Conquest is a space shooter game done for the HBGames competition, the goal is to conquer the entire 'galaxy' (reach and conquer the last star) which is generated at startup, each stars have a set of planets that the player have to 'conquer', on startup the player is limited to one star, for each planets conquered the territory will expand, the game have a shop, highscores, 4 levels of difficulty (with various degree of random).

    This game is made using the free version of C2, the number of events used is 100.

    Enemies/Player and some fx graphics are from the free sprite bundle included in C2, some sfx too, the rest is custom altough aided by some software like Space Engine, sfxr and cooltext.

    <img src="http://hapshack.com/images/1s0d.png" border="0">

    <img src="http://hapshack.com/images/3QBm.png" border="0">

    Work best in Chrome/Chromium altough Firefox seem ok on most machines.

  • nah, it is the same problem as built-in array and i use it too

  • Bumping because i encountered this bug, this seem to be not only for array, i actually use rex_hash and a custom advanced array plugin and this bug prevent them to have properties and to work correctly too.