dop2000's Recent Forum Activity

  • 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

  • You should remove this detailed description of the game from public access.. Someone might want to steal your idea.

    So this will be a text based game? Lots of text, number, buttons, lists, dice and some static images?

    Construct 2 may not be the best tool for this kind of game. But you can still make it in C2 if you want.

    I suggest you start with implementing one mechanics - for example trading or combat. And then add more.

    You need to think about how you are going to organize and store all the data. Read a few tutorials about arrays, dictionaries.

    Install CSV plugin - you'll definitely need it.

  • CurrentKey and CurrentValue only work inside the "For each key" event

  • If every action in your text object is followed by a line break (newline expression), then you can remove the oldest lines from the beginning of the text before adding new lines.

    For example, your text object can display 4 lines.

    When you need to add the 5th line, remove 1st line from the text. You can do this using find(text.text, newline) or tokenat/tokencount expressions.

    aaa        bbb        bbb
    bbb   ->   ccc   ->   ccc
    ccc        ddd        ddd
    ddd                   eee
    [/code:3bo0spi6]
    
    Alternatively, you can try rex's "Text Scrolling" plugin.
  • Why don't you apply force to boosters? See this demo:

    https://www.dropbox.com/s/zybwrux82hmhm ... .capx?dl=0

    (I don't have much experience with physics joints and I'm not sure if I'm using them correctly)

    You can also try Chipmunk behavior, it has "Apply force at offset" action, so you should be able to apply force at the point where the booster is placed.

  • I don't think it's possible. You can open two projects and copy/paste objects from one capx to another.

    If objects in all capx are identical and you need to combine layouts, you can unzip capx and try copying or editing xml files, but there is a good chance that this will corrupt your project..

  • I tried replacing ^ with value*value, didn't notice any change in fps.

    And when I'm using actual sprite coordinates instead of random values, surprisingly distance() expression is faster!

    distance(Sprite.X, Sprite.Y, Sprite2.X, Sprite2.Y)<500

    is about 3-4 FPS faster than

    (Sprite.X-Sprite2.X)*(Sprite.X-Sprite2.X)+(Sprite.y-Sprite2.Y)*(Sprite.y-Sprite2.Y)<250000

    Anyway, I will stop worrying about using distance() in my games

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dictionary stores data in pairs - key and value. For example:

    "Name": "Small sword"

    "Damage": 25

    "Weight": 10

    It's quite easy to use and everything is covered in the official manual.

    https://www.scirra.com/manual/140/dictionary

    Here is a lengthy tutorial:

    http://javajdk.net/tutorial/construct-2 ... -tutorial/

  • justme5555

    It crashes because you made an infinite loop.

    here is my capx:

    https://www.dropbox.com/s/9vzv93pi7e8ji ... .capx?dl=0

  • ,

    I read about square root being CPU costly before. After your comment I decided to compare (in C2):

    When I disable either event #3 or #4 and run the project in debug mode, there is almost no difference between two methods.

    With distance expression I'm getting 21-22 fps, and with squared values about 22-23 fps. CPU load is the same, around 97-100%.

    Is the difference really that small or am I doing something wrong?

  • Nice work, but how is it different from array? What are the advantages?

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies