clrammer's Forum Posts

  • Well, that was embarrassing. Definitely should have tested outright before posting here. Setting it explicitly worked.

    What is interesting is that the method for setting it in a loop didn't work.

    What I've done is created a delimited global string in the following format:

    "a^39|b^39|c^39|d^41" etc. that includes all characters in my character set. The end of the above list is "Z^44| ^14" indicating that a "space" is 14 pixels wide.

    I loop through this string using tokenat on start of layout to set all character widths, but it doesn't seem to register the "space". If I use a manual line after the loop is over to explicitly set the width of space, things work fine.

    Anyway, thank you very much, Ashley, for adding this plugin officially. If you're still taking feature requests for it, could you add a property that allows for adjusting the pixel width of each character based on the character that follows it? I understand if this is a little too convoluted to be worth the time, but it really would allow for non-mono width fonts to be perfectly reproduced with Sprite font.

    To give an example of what I mean, take two strings, each two characters wide:

    aa

    ab

    In 48 point, Arial Rounded MT Bold font, the width of the first 'a' in "aa" is 38 pixels. The width of the 'a' in "ab" is 40 pixels. It turns out that regardless of what the first letter is, if the letter 'b' comes second, it ALWAYS results in the preceding character being 2 pixels wider than if an 'a' were to come second. So, what would be perfect is if I could set a baseline width per character and ALSO set a modifier for each character that says "add this amount to the width of the preceding character". The value could be negative, of course.

    For now, I've just averaged the width of each character and I'm hoping it will continue to test to make sure it looks ok. We're only talking about a few pixels. For what it's worth, the letter 'j' is kind of the outlier in how much it affects the width of whatever character precedes it. 'f' is the other culprit.

    Anyway, thanks again for the plugin. I can now determine the exact width of strings and I'm not dealing with blank text boxes as I tried to trim the whitespace from dynamically created and resized text boxes between Chrome and iPad... talk about maddening :)

  • I've been meticulously working on getting Arial Rounded MT Bold into the new Sprite font object, and I'm 95% there. I know it can't be perfect because this font has different character widths depending on the characters that FOLLOWS it, but I can still get it close enough to be acceptable with one exception... How can I define the width of the "space" character? I left room in the Sprite font image at the end, and I added a space to the end of the Character Set. I then adjusted the width of "space" in the same loop where I adjust all of my other characters, but space is ignored (i.e. it just uses the default Character width of the Sprite font object).

    I know this is a brand new feature and will be documented after the next stable release, but does anyone know right now if this can be done?

    Thanks!

  • I know this is over a year old now, but I wanted to say thank you for taking the time to write this up. Lots of very valuable information in here! Oh, and great work on those apps.

  • I am also very interested in the 1.4 update! Any news? I'm primarily looking forward to improved memory management which I read should be included - hopefully I read that right :)

    Btw, Ashley, thank you very much for the textbox workaround you included recently.

  • Thank you very much for these summaries. Very helpful.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply, justifun. I may just take a crack at modeling this in C2 and see where I trip up. Then perhaps I will have better questions to ask.

    All I really need is a simple UI, the ability to track about 125 global variables (or perhaps leverage a database), and perform a large amount of conditional checks (If/Then) for each run of the program. The calculations themselves are very basic.

  • Hi all,

    I did a quick search on the forums before posting. Didn't see anything that specifically addressed my question.

    I've been a Scirra fan for about a year now, and looking for my first opportunity to leverage Construct 2 for an actual project. Turns out it's harder to design good games than I originally thought, so I'm thinking of leveraging some work I've already done in the past to get me started.

    The thing is, this work I have completed is not the kind of game others are using Construct 2 to make. In fact, it's not really a game, it's a simulation of a casino game. I'm not even looking for flashy graphics or animations (although adding them later could be neat), I just need input boxes and formatted output and a whole bunch of calculations to happen on the back end.

    Currently, the simulation is written in VBA (Excel is the front end), and I would like to convert it to HTML5 so it is in a universal format that I can either publish or convert to mobile app or desktop app. Also, I want to roll up my sleeves and get a project under my belt with Construct 2.

    Am I on the right track by using Construct 2 to accomplish this, or am I trying to fit a square peg in a round hole? Also, I'm a pretty noob programmer at the moment (hence the VBA), so I like the idea of using Contruct 2 for this.

    Thanks for any input you can offer!