Lou Bagel's Recent Forum Activity

  • Here is another example:

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

    I put the xml aspects at the top.

    Sorry these are not very clean examples. I won't lie, it is a little complicated to setup at first, but after you get going it will make working with your text very organized. It will also give you some flexibility for characters with multiple things to say, randomly picks something to say, and cause some action afterwards. So I think it is worth it to learn.

    I may try to put together a capx and tutorial for xml but in the meantime let me know if you want to learn.

  • Actually, I already had this in my dropbox:

    https://www.dropbox.com/sh/jbr4wlb8mwx5 ... 1uvta?dl=0

  • Exactly, give me a few minutes . . .

  • Should each dialogue be in it's own text file, or could every line of text in the game be in the same file? If all in the same file, how do I tell it when to stop displaying the text?

    I highly recommend using XML. It might look a little mysterious and complicated at first but it really isn't that difficult. It is great for organizing certain aspects of your project, especially dialogue. I use it in pretty much every project now.

    I'd be happy to provide a quick explanation, a couple of reference links, and/or capx.

    I have a post showing how you can use XML and randomness but it doesn't explain much or show the dialogue aspect:

  • Woops, I checked and was completely wrong on the quotes. I use PHP often but stay away from putting variables inside quotes because I've been confused before on when it is acceptable.

    I just checked a game I made a while ago and the high score system still works. I checked and our code is pretty identical. Can't you select what version of php you want to use on your server? in cpanel?

    I'm no php whiz though. Maybe try posting on stack exchange will yield more helpful comments for you.

  • Yup.

    Coincidentally I made this capx about destroying tiles yesterday to reply to a forum post so I am in the Tilemap learning mood:

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

    (this one is a little more fun)

  • > To turn physics into a top-down model don't you just need to turn off gravity?

    >

    maybe?

    Informative!

    Ha, jk. I put it as a question to see if anyone disagrees. I believe I have done it in a project before, for a top down soccer game actually, and it seemed to work just fine for that purpose. Just if there is zero gravity you might have it increase some attributes to help slow down objects so they don't appear as floating (linear dampening?). I'm not confident though because it was a while ago and only played around with it for a couple of hours, so could get unrealistic looking under some circumstances I didn't encounter.

  • Oh, you are saying you want some to be more rarely chosen than others? Let's say like cards in a deck (like in a board game/collecting game, not poker cards) where there are more of some cards than others.

    If so I think MadSpy hit the nail on the head there (except I think flipflopped percentages, 35 should be 45).

    Are you familiar with random and choose, the expressions for generating random numbers? (shown by MadSpy above). That is all you need to create any type of randomness you want. After learning about those you just have to really think out how you want the math because you could do it tons of different ways.

    For example, here is one thing to think about:

    You say you want a common card drawn 45% of the time, uncommon, 35% of the time, and rare 20% of the time. MadSpy's example will do exactly what you want.

    That means the following probability of drawing each card:

    0: 15% (45/3)

    1: 15%

    2: 15%

    3: 17.5% (35/2)

    4: 17.5%

    5: 20% (20/1)

    So probability wise you will draw common cards most often but the rare card, since you only have one rare card, will be the most commonly drawn card in the game. Not sure you are indenting that . . .

    But that is more of a balancing discussion. Like I said, you could set this up so many different ways so what I suggest is you get out pen and paper and write out the math you want. That way you can ask specific questions on how to implement if you get stuck.

  • I'm not sure what you were looking for exactly but I needed some practice so made a capx that demonstrates what system expressions you can use for determining how many tiles wide/high a tilemap is:

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

  • I am really not clear on what you are trying to do and there is no probably many different ways to achieve whatever you are trying to do.

    Which of the following have you thought about using to implement this:

    Instance variables

    Different sprites vs different animations

    Families

    Array

    I would make 3 different sprites, one for each level of rareness, put all the cards in as a different frame in the same animation. Then have it randomly choose a frame on prompt.

    Have you tried anything yet?

  • I agree with oosyrag that the best route is in essence the player is playing as an invisible box with the character sprite pinned to it.

    Though if you have a really small project with only 2 characters and not a lot of animations you could just load it all into one sprite and carefully event your animations based on which character they chose.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • xanxion Did you make your avatar img?

    I like it

Lou Bagel's avatar

Lou Bagel

Member since 7 Sep, 2015

Twitter
Lou Bagel has 3 followers

Connect with Lou Bagel

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies