MrGoatsnake's Forum Posts

  • alexfex89 I would put this into an image editor, turn the grid on, and then make sure each image of the sprite has the same amount of space on each side.

  • Basilboy I would still recommend not using the XP function every tick because you are making it loop over and over calculating things you really don't need. Breaking the Riemann sum up, storing its intermediate calculations, and only adding what you need when you need it will speed all this up.

  • R0J0hound 's solution technically works but if you are using this as a part of a level system that would constantly be calling xp(), I would recommend doing it more like my explanation, that way the function with all the looping doesn't get called too much adding unneeded complexity.

    As you can see Riemann sums are calculated by adding the result of one formula calculation with the result of the next and so on. If you look at my example, I calculate the first boundary, store it, and then calculate the next boundary by adding what I already have to the next calculation and so on. In my solution the next bit of the formula only gets called when you need it. In R0J0hound 's solution, it will calculate all the intermediate xp boundaries until it gets to the one you need, which is a waste of processing.

  • Yes this is possible Basilboy, if you understand that the formula is doing for you. That Riemann sum is for figuring out what the next XP level is for any given level number, from 0 to Max Level-1. Putting it in a loop will calculate every XP Boundary value when the loop is ran, this is not what you need. I think you just simply want to know the next level boundary at the time the level is increased. Here is loosely how you can use that:

    Get yourself some global variables

    CurrentLevel = 1

    CurrentXP = 0

    NextLevelAt = 75*2^(1/7) which is approx 82

    Now set up an event

    If CurrentXP > NextLevelAt its time to level up!

    • Set CurrentLevel = CurrentLevel + 1
    • Set NextLevelAt = NextLevelAt + (75*2^(CurrentLevel/7)

    ORRRRRRRRRRRRRRRRRRRR!

    You could just calculate out what all the level boundaries are by hand and hold them in C2 variables or array without using the formula in game.

    Level 1 XP Boundary = 75*2^(1/7)

    Level 2 XP Boundary = Level 1 XP Boundary + 75*2^(2/7)

    Level 3 XP Boundary = Level 2 XP Boundary + 75*2^(3/7)

    Level 4 XP Boundary = Level 3 XP Boundary + 75*2^(4/7)

    [82, 173, 273, 384, .................]

  • I enjoyed Game Dev Tycoon, picked it up for $3.99 during the Steam sale. It is a bit "random" but its a great casual game.

  • Try Construct 3

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

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

  • Monumental I swore you could do that on everything under the project tree! I haven't had a game with more than 20 families in it so I've never thought about it. But in a big game I could see this being useful.

  • shinkan wow thanks! I must have missed this in the manual! learn something new everyday.

  • tomhaiger instead of changing out the actual sprite objects, you could make one sprite object with multiple animations and have the sprite have an instance variable that holds the score (or whatever 1000 to 5000 means, I assumed points)

    When the score hits 123,456. Change the sprite's animation and the value in the instance variable. So none of the game logic has changed, just what the sprite looks like and the number used in the instance variable.

  • On the layout's properties, you can select which event sheet is associated with it. Or, if you have an event sheet for the new layout already, you can include another event sheet in that event sheet by right clicking on the event sheet to get a context menu, then selecting include sheet.

  • Great weekend jam brent_hamel

  • Ashley Very well said.

    As a software developer, I have to weigh these options too and its not easy. Its not just keeping your users happy, its balancing out maintainability, usability, all kinds of other ilities, developer use, performance, etc....

    In the end I would rather the tool/lib I'm using be correct, resulting in changes to my stuff, rather than hoping developers shiv in some code patch to make sure my specific version works the next time I go to change it.

  • Negative infinity.

  • cvp I don't know if you can really do that.

    Check out the C2 Manual for Text Boxes, Sprite Fonts, and Web Fonts. You will have to copy the plain text into one of the controls for these features, and then mess with the styling again. You could also load the text from a plain text file.

    Also this article tut: https://www.scirra.com/tutorials/328/us ... onstruct-2

    And this one https://www.scirra.com/tutorials/807/ho ... -game-talk