farflamex's Recent Forum Activity

  • I've just updated to the newest version and my game isn't scaling properly. I worked out that variables I was using 'WindowWidth' and 'WindowHeight' appear to be system variables now, so it's renamed them WWidth and WHeight. Problem is, they're all over my code as the original names. I can't work out if the editor has a search and replace thing which will work across all of my layouts. Is there a way I could change every 'WindowWidth' in my code to 'WWidth'?

  • I did get this working in the end, but don't think I have an example. I could probably delve into the old program and have a look, unless the other guy replies with his link.

    My finished game is here https://www.scirra.com/arcade/strategy-games/korelos-34

    Doesn't work for me, I still get a white screen, but apparently it works for others. Fly out a bit and get some enemies to fire at you and you should see that they're fairly accurate, although everything is moving so they pretty much do a 'rough guess' I think.

  • Oh I see. That's pretty good, I hadn't thought of that and yes, it would work for my game. I'm not sure which would be fastest / most efficient. Since my game is turn-based and the screens are mostly static, it might not matter too much but the tiled backgrounds do seem to be using a lot less objects at least. I'd be looking at 200 objects (9patches) v about 40 or so.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's about 200 things on your horizontal axis which would seem to be tough to distinguish. If you want columns, the simplest way would be to create a single sprite and colour it using web effects, or to create one bar for each colour, and just scale it and clone it as you need.

    I didn't describe it properly. It would be 16 rows and 12 columns. Not 16 * 12 on each row.

    I would opt for the 9-patch object and reuse it as often as needed..

    or

    create the lines (and background) with the tiled background object (which would only take two sprites of 8x8px)..

    I was thinking about loads of 9-patches, basically one for each cell, which would solve it, including colouring each cell differently where necessary. But it's 192 cells which seems a bit many? Still, I do like this idea most so far. But what do you mean about the tiled background object using 2 sprites of 8x8? That sounds promising too, but I'm not sure how that'd work.

  • This isn't really C2's cup of tea, so I'm wondering, what's the best way?

    I need a league table (sports table), showing 16 teams and 12 columns for each team. This is always set, so that makes it a bit easier. I want to be able to resize the table depending on the size of my screen.

    My initial thought is to just draw the table in a paint package and then stretch it to the correct size. I could put image points in for the various boxes to allow me to place the text. Not sure if this is ideal, but I know how to do it. The only downside I can think of is that the initial graphic will be large and take up a lot of memory.

    Another thought is to draw a single row graphic in a paint package, and then just stack 16 of them ontop of each other, placing the text inside the graphic.

    Any of methods? Draw lines individually maybe?

  • It does actually work like this, I've just made a sample new project and it works fine, so there's something wrong with my program I guess. How do I delete / close the thread?

  • I might be missing something really basic because the obvious answer isn't working.

    Let's say I have 10 array objects and I set value.at(0) to a number, let's say 1 to 10 also (i.e the 1st contains 1, the 2nd contains 2 etc). To get the array that contains the number 5 at value.at(0), don't I just do..

    myarray.at(0) = 5... (so that's 'myarray -> Compare at X, X = 0, = to, Value = 5).

    Since I put the number 5 into the 5th array, shouldn't the above 'pick' that instance, so I now have 1 array picked?

    This seems like very basic stuff to me and it's how C2 works, but it's not working in my project and I'm running it through the debugger. My arrays definitely contain the values that I'm searching for, but it's just skipping past the event as though it's found nothing. Do arrays work differently?

  • That's a thought, doing it at the PHP end, instead of breaking it up at the C2 end. Mind you, I'm FAR more comfortable with BASIC in C2 than I am in PHP. I find myself spending 15 minutes on just about EVERY command in PHP because I'm so unfamiliar with the syntax.

  • Yes, I think you're right. I'll try the plugin or use my own methods for sending / splitting data. Thanks.

  • Thanks, that looks really useful in a lot of areas.

    I assume though that this means that you can't do what I'm asking, without a plugin? It can't be done directly from C2?

  • I have my string, json_encode'd from PHP. It looks like this.

    [{"Name":"Alford County","League":"Watnall Premier","ID":1},{"Name":"Highbridge County","League":"Watnall Premier","ID":3}]

    That's 2 rows, with 3 values each. I want to break it down into a usable form in C2. I was thinking that I could just plonk it into an array with Array -> Load From JSON string but I get nothing in my array when I do that.

    I thought there was something to do this automatically, but maybe I'm imagining it. Will I need to break the string down myself with 'tokenat' etc?

  • Yeah I couldn't find a way either. Since there were only 5, I had to ensure that they were created in the order that I wanted to tab-order them. It's a bit fiddly, a case of create 1 login box, create 2 password boxes, create 1 login box, create 1 password box. But it does work that way at least. Would be interested to know if there's another way, but this works for now. Thanks.

farflamex's avatar

farflamex

Member since 7 Oct, 2012

Twitter
farflamex has 15 followers

Trophy Case

  • 12-Year Club
  • 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
  • Famous Game One of your games has over 10,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies