oosyrag's Forum Posts

  • Have you tried the tilemap object? https://www.scirra.com/manual/172/tilemap

    Also Tiled is a great free tool. http://www.mapeditor.org/

  • https://www.scirra.com/manual/119/touch

    You can use the Nth touch and TouchID expression to get the X and Y locations of your first and second touches. You can then store those positions in variables to use as comparison to see if your new touch position is bigger or smaller and by how much and scale accordingly with LayoutScale.

  • len(x) - return length of the string x

    As Gumball said - make a variable to store the current state of the text box, only if the length of text is equal or greater than what it was previously.

    System Compare Two Values - len(TextBox) < len(TextVariable) - Set TextBox to TextVariable

    Else - Set TextVariable to TextBox

  • An array of size 1, 1, 1 starts with 1 blank cell. if you push 4 things to it, it will then have a width of 5. Try starting with array size of 0,1,1.

  • http://www.audacityteam.org/

    Just record and then save in a very low bitrate quality!

  • I found that arrays make a lot of things a lot easier to work with and more organized.

    Don't be intimidated... they don't require high IQ. Think of them as spreadsheets you can manipulate with code.

    But like others said, it is possible, just might be harder.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • http://www.bfxr.net/ - Make it yourself

    http://opengameart.org/ - Try to find someone elses

  • I'm having a little trouble visualizing your situation based on your description. Try uploading a .capx?

  • You might have confused RAM with VRAM. The amount of VRAM available to a system is generally significantly less than the total RAM available.

    Even so, 2GB of free RAM out of 4GB is pretty optimistic, maybe if the user has nothing else open.

    This article has many tips on reducing memory usage in images - https://www.scirra.com/blog/112/remembe ... our-memory

    Some quick tips:

    Use power of 2 image sizes - your 270*270 image takes up the same amount of memory as a 512*512 image (actually Construct helps you out a little here, but it is still a good idea to do it manually). If you reduced the size to 256*256, it would be 4x less.

    Try to group up your images into layouts - don't use images you don't need for that particular layout. Anything that isn't used in each layout is not loaded into memory.

    Avoid transparencies as much as possible. Even if you don't see anything, it still takes up memory.

    Cut down on animation frames. A professional artist can convey a LOT of information in just a few frames with technique. Someone posted this video a little while ago and its a great way to see how pros do it.

    Subscribe to Construct videos now

    Similarly, check if some parts of your animations can be broken off into their own objects. For example, if you have 10 animation sets for when a character swings 10 different swords, instead make one "swing" animation for the character, and have the swords as separate sprites.

  • Two ways I would consider -

    Have the sprite objects always update to whatever value is in the array at any time. Clean, but might be a little more taxing on the system to update everything every tick. Depends on the scale of your project, this might not even be a concern.

    Or, whenever you have an action to change the array, also add an action to change the respective sprite. Doubles up on actions in your event sheet, but it is the most efficient.

    Regarding isometric grid vs square grid, it is all the same to the array. The isometric grid is a little trickier when positioning your sprites, but that should be all. Each sprite diamond should still be associated with one array cell. If it makes things easier, you can use an pair of instance variables on the sprite object to permanently reference its array position. ex. in DiamondSprite object, add variables Xposition = 1 Yposition = 3 , Then you can use those to look for the data with Array.At(DiamondSprite.Xposition, DiamondSprite.Yposition), which would give you the value in the array at 1,3

  • It's OK to have multiple instances of objects. Construct works by "picking" instances. In this case, you don't want a for each. The first condition that checks if red and blue are in range picks those instances - all following conditions and actions only affect the picked instances and the others are ignored.

  • I'm not really understanding what you are mean by "sharing" the variables?

    You can use expressions to compare them, or use math.

    ex:

    While Red and Blue are in range -

    If Red.CTA > Blue.CTA

    And If random(100) < (Red.CTA-Blue.CTA)*10

    And If random(100) > Blue.CTD*10 ACTION - Blue loses life

    If Blue.CTA > Red.CTA

    And If random(100) < (Blue.CTA-Red.CTA)*10

    And If random(100) > Red.CTD*10 ACTION - Red loses life

    Else repeat, until one is destroyed.

    Except I think you've got some problems with your game logic to begin with.... If red has a higher CTA than blue, it only has a 10% chance to go first? Which means blue has a 90% chance to go first? You should probably work out your game logic a little more solidly before trying to code it.

  • I don't think this is possible with the current multiplayer plugin.

    What is your goal?

    For a persistent host, it is recommended to have a "server" computer connect first, becoming the host that never leaves. You can design the game so that the host/server doesn't participate in the game.

  • A slightly advanced technique would be to use regular expressions (regex) to check the contents of the box every tick, and if it doesn't match your specified expression (doesn't start with 9, or contains a letter) you can delete the offending characters or replace with a 9, ect.

    I would store the contents of a text field in a variable. Every time a user tries to input a character, I would test the new string against a regex - if it passes, the variable gets updated with the new string. If it doesn't, the text field gets replaced by whatever was previously in the variable.

    Carbin - sometimes people don't even know where to start, so there wouldn't be much to show in a capx If he needed help for something like building his specific regex, then it would be more useful to see what he has tried so far.