dop2000's Forum Posts

  • Browser -> Go to URL "https://www.google.com/maps/search/?api=1&query=pizza"

    This works on my Android phone.

    According to the documentation:

    [quote:zcw34zck]On an Android device:

    If Google Maps app for Android is installed and active, the URL launches Google Maps in the Maps app and performs the requested action.

    If the Google Maps app is not installed or is disabled, the URL launches Google Maps in a browser and performs the requested action.

    On an iOS device:

    If Google Maps app for iOS is installed, the URL launches Google Maps in the Maps app and performs the requested action.

    If the Google Maps app is not installed, the URL launches Google Maps in a browser and performs the requested action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jobel

    I believe badmoodtaylor was asking about using multiple array instances vs multiple array objects.

    I don't think there are any differences in terms of performance. Use whatever method is easier and more convenient.

    If different arrays have different purposes - use multiple array objects.

    If you want to attach an array to every instance of some other object (for example Enemy sprite + EnemyStats array), you can add them both to a container. This way each EnemyStats instance will be created automatically and will be linked with its Enemy instance.

  • I don't understand this dialogue system, so my solution could be wrong, but I think the problem is with event #19, it's at the wrong level.

    Try moving event #19 like this:

    Also, check out this dialogue example (there are working download links in comments):

  • It's called picking, and it's the most important concept in Construct programming.

    Use events to pick instances of slime1 object.

    In your example "On collision" event picks 1 instance of slime and 1 instance of bullet. Inside this event you can only control these instances.

    There are lots of events that can pick instances, say "Slime1 is visible" event will pick all visible instances.

    "System -> For each slime1" event will loop through all slime1 instances, picking one instance at a time.

    If you don't pick any instances in the condition (left) part of the event, than everything you do in the action (right) part will affect all instances!

    And by the way, read my comment above about families. You should add all your bullets to a family, and remove duplicate "On collision" events.

  • If AI opponent takes 1-2 seconds to think, it should look ok.

    In fact, it's better than instant shot without any delay.

    You can play some "I'm thinking..." animation or move the cue from side to side while the AI is "planning the shot".

    And also, calculating 7200 scenarios should take far less time than you think.

    I would suggest using this plugin (click Preview link to see how it works):

  • Since you are planning to have more types of slimes, there are two ways to do this:

    1. add them as different animations to the same "slime" sprite,

    2. or add new sprites (slime2, slime3 etc.) and combine them into "Slimes" family.

    One sprite with multiple animations may be easier, but if you want them to be different objects, go with the family.

    Use instance variables, I believe variables xMove, yMove, xDirection, yDirection, way should be instance variables, as they will be unique for each slime instance.

    If you decide to use the family, you should do these changes while the project is still small (this will save you a lot of time in the future):

    Move all instance variables and behaviors from the slime1 sprite to the family level.

    Change all your events to work with the Slimes family.

    So your function could look something like this:

    On Function "Compare"

    For each Slimes

    ...Set Slimes.xMove ...

    .....

  • Could you share your project or a screenshot of your events?

  • [quote:qrv9rltk]On start of layout -> check item "highscore" exist

    On item "highscore" exist -> get item "highscore"

    on item "highscore" get -> set "highscore" Localstorage.ItemValue

    Score > highscore -> set item "highscore" to score.

    The last two events are wrong.

    Should be something like this:

    Variable LevelScore=0

    Variable HighScore=0

    On start of layout -> check item "highscore" exist

    On item "highscore" exist -> set Global Variable HighScore to Localstorage.ItemValue

    When level ends

    If LevelScore>HightScore -> Set HighScore=LevelScore ; LocalStorage Set item "highscore" to HighScore

  • Is it possible to pass anything other than float in effect parameters? I need big integer numbers.

    I tried double and uint, but it didn't work..

  • For me touching the screen makes the lag much more noticeable.

    Try moving (re-positioning) the tiled backgrounds instead of resizing them.

    Add "Destroy outside of layout" behavior to all rocks/grass etc.

    This will probably not fix the problem completely, but it may help.

  • Change the first action to this:

    Main_car move 5*60*dt pixels

    This should fix the car jerking, but the background is still lagging. I see it too in Chrome and NWJS.

    Strangely, it lags much more when I touch the screen, even after I removed Touch object completely from the project.

  • You can make a fine circle collision polygon for the planet. Although it's not recommended to use more than 9 or so points, in reality you can make a circle with 20-30 points and it will still work fine. (unless you have hundreds of planets)

    Or instead of the collision polygon you can use "System-> Pick Overlapping point" to detect when the ship touches the surface:

    set angle = angle(planet.x, planet.y, ship.x, ship.y)

    set pointX=planet.X+planetRadius*cos(angle)

    set pointY=planet.Y+planetRadius*sin(angle)

    System-> Pick Ship Overlapping point (pointX, pointY)

  • You are using a deprecated version of the tween plugin.

    Try replacing it with a new version:

  • Are you using "Dictionary For each Key" or "System For each"?

    Instead of using for each, you can set your text to Dictionary.Get("Name")

  • C2 is more suitable for arcade kind of games - where objects are moving, interacting with each other.

    Yours is more like a tabletop game. It doesn't really require any graphics or animation (unless you want to add it).

    But it does require a lot of data manipulation, maths etc.

    I don't know which development software might be better for this game - Unity maybe? Simply because in Unity you can actually type the code, while in Construct you build it in visual editor and it's not very convenient for a task like this.

    However, if you are new to programming, go with C2, it's much easier to grasp for the beginner.

    Yes, by "dice" I meant random number generator.

    Effectively organizing all game data might be the most important and challenging task in this project.

    CSV is a text file containing list of values.

    You can basically create them in Excel and import to C2.

    For example, your list of enemies may look like this:

    Name, ATC, HP, GP

    Skeleton, 1, 1, 50

    Goblin, 2, 1, 100

    Bandit, 3, 2, 250