dop2000's Forum Posts

  • matriax

    I tested the tilemap with 256 colors - it's insanely slow, less than 1fps. When each building is one uniform color, it's fine. But if each pixel is a different color, everything comes to a halt. So forget this idea.

  • It's very easy to test - create a project with one sprite, run it in Debug Mode, note the memory and cpu usage.

    Then create an event: "repeat 200 times -> create sprite at random x,y"

    Run again in Debug Mode.

    You'll see that memory and cpu usage values are exactly the same!

    Of course if these sprites are moving, fading, resizing, colliding etc., then the large number of sprite instances with have effect on the CPU usage.

  • I may not fully understand what you are trying to do, but why don't you destroy canvas objects after you build your tilemaps?

    You can go even further - create a tilemap with a 128 or 256 colors pallet, convert your sprites to tilemaps on start of the game using canvas, and then destroy all sprites and canvases, keeping only the tilemaps.

  • Your game Doptrix is AWESOME I thoroughly recommend it!

    Thank you! Yes, it's pretty awesome and I'm really proud of it

    I know people who play Doptrix for years, some say it's their favorite mobile game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I'll tell you my secret how to become an expert in C2

    When you are adding/editing an action, there should be a semitransparent window somewhere on the screen - "Object with expressions". If you don't see it, press Ctrl-F4.

    Explore everything in this window, it lists all expressions for all objects. The most useful one is System, but others also contain lots of interesting stuff.

    That's it That's my secret - I know where to lookup expressions. And now you are an expert too!

    And no, I don't know javascript

  • Your words in the array start with line break.

    Just add trim() to remove all invisible characters (spaces, line breaks) from the beginning and end of the string.

    Also you can replace "i" with loopindex:

  • draiza

    Sorry, I was wrong. Gamepad number is the first parameter of Axis expression:

    Gamepad.Axis(0,1) - means gamepad #0, axis 1

    Gamepad.Axis(3,2) - means gamepad #3, axis 2

  • Anonnymitet

    Yeah, I don't understand why there is no expression to get gamepad number.

    I guess for events like "On key pressed" you'll have to create 4 identical events for each gamepad number. Then redirect them to a function, like this:

    On Gamepad 0 button A pressed -> Call Function ("Jump", 0)

    On Gamepad 1 button A pressed -> Call Function ("Jump", 1)

    For events like "Is button down" you can test all gamepads in a loop.

    By the way, "On gamepad .." events are not very reliable, they can miss buttons if several buttons are pressed simultaneously. Some time ago I made a little engine that only uses "Is.." events, see this post:

    It can be modified to support multiple gamepads.

  • There are many ways to do this.

    Since you are using Flash, simply add condition "Is NOT flashing" to the event where you subtract health.

    (add "Is flashing", then right-click and invert)

    Enemy->Is overlapping Player    Player subtract 10 from Health
    Player->Is NOT flashing
    [/code:2ijy9678]
  • I'm on a 5-years old laptop with i7-3630QM, 8Gb RAM, mid-range SSD, Windows 8.1 64-bit.

    Using C2 build 246.

    Startup time for me is always about 5-6 seconds, even after system restart.

    Not bragging, just providing information

    Many people here with this issue have much better computers, which is really odd...

  • Wow, R0J0hound, you never seize to amaze!

  • Hi miggymax

    Have you sent it? I received an email from "Justin", not sure if it's you?

  • Tetris is a pretty complex game, are you saying you made it by yourself? And you are asking how not to destroy blocks?

    This is all very strange.

    If your question is genuine, please consider posting your capx or a screenshot of your event sheet.

  • If there are performance issues, try increasing the tile size to 2x2. The edges will look a little bit rougher but the performance should be much better.

    I just noticed than in my demo there are 2 identical instances of tilemap object, one on top of another. And it still works pretty fast

  • I think you need to install NW.js

    https://www.scirra.com/manual/162/nwjs

    Then when you export your project from Construct 2, there will an option to select NW.js and it will make the .exe file.