Lou Bagel's Forum Posts

  • 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.

  • xanxion Did you make your avatar img?

    I like it

  • Try removing the quotes from around the variable.

    For example you have:

    mysql_connect("$host", "$username", "$password")or die("cannot connect");

    Believe it should be like:

    mysql_connect($host, $username, $password)or die("cannot connect");

    In PHP $ signifies the start of a variable. " signifies the start of a string. So "$ signifies the start of string starting with a dollar sign, not a variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To turn physics into a top-down model don't you just need to turn off gravity?

  • oosyrag The Bullet behaviour does not do what i need it to do, Instead of hitting and landing on the ground it passes through my ground but when i do stop it, It does not look as natural as im trying to imitate.

    The only thing i seen that makes it happen is physic and i am trying to avoid it since i cant use it.

    I do like the bullet but is it possible to stop the bullet in a way that looks good and not forced.

    Try adding an event that would disable the bullet behavior when the pieces are overlapping the ground or wherever you want them to stop

  • I think there is actually a typewriter example that comes with Construct as a template (if not I found it as a tutorial, or I could share later).

    I would start with that and then speed it up if button pressed/is down.

    Basic process is just a txtSource (offscreen) and txtDestination. Start of function will place your desired text in txtSource and every tick will update txtDestination with another letter. I think it was

    Every Tick

    -txtDestination = txtSource.length(txtDestination+1)

    Could have change it to an if else scenario with +2 as the faster one

  • I'm gonna call it like it is:

    All ten of you that viewed this post so far but didn't share your bazooka are real jerks

  • A sprite of one that is. If anyone has one handy I have a cool idea that just hit me and I can repost a capx (or link to playable) in probably like 10-15 minutes.

    Also, a town, building, or some kind of scenery or else he won't have anything to blow up.

    I think it would be neat for all to see to say the least . . .