KrushBrother's Forum Posts

  • 27-30 fps

    2.8ghz dual processor

    4gb

    Nvidia GT240gt (1gb)

    Not the most entertaining program though.

    Is this doing something special in the background?

    I'm just wondering why you'd think it wouldn't give people good fps.

    Spill the beans.

    Krush.

  • Deadeye was going to update his Platform Tutorials using collision masks, but I'm not sure that's still on the cards.

    Maybe he's waiting for a more substantial update to Construct first.

    Krush.

  • Can't you set the global variable to zero and then use "for each object" to increase the global variable by 1 each time it finds the private variable value your looking for?

    Unless you have several hundred instances, I don't see why this wouldn't work well enough.

    Just set it up as a function and call it when required.

    Krush.

  • I've changed the way I've coded that particular part of the game now, so I no longer need to use the OR, but I am now using the ELSE, so I'll keep an eye out for any strange behaviour.

    It seems to be working fine, although I am only using it in its simplest form, without the need to remember picked items, which is where I believe the problems lie.

    Cheers,

    Krush.

  • Just a quick question.

    I remember reading a while back about either OR or ELSE being buggy, but I can't remember which one it was.

    I need to use OR for the first time in this project, and although I'll soon find out how reliable it is, I just wondered if anyone could remember whether it was the OR that was buggy, or the ELSE.

    I have a sneaking suspicion that it was ELSE, but I can't find anything on the search engine because OR is too small a search term.

    It's not a big deal, because I can always use Python if I have to.

    Cheers,

    Krush.

  • Wait, I think this has happened to me once. Are you sure the global type is set to number, and not text? The most obvious things are the easiest to overlook. If it was accidently set as text you'd have to do global('name')="1" for it to trigger.

    I'd already checked that Yesterday (or was it the day before ) because that's happened to me in the past too.

    But I think I've just found it.

    The global variables I'm checking are the result of several other variables calculating the position and then the contents of an array.

    The Array is being loaded at the start of the game, and was created by saving an array in a small program I knocked up.

    It was a good way of getting a lot of numerical data input directly to the game.

    Now it looks like the array is actually a text array and that's why the condition wasn't being met when checking if global('gb1')=1, because I should have been using if global('gb1')="1".

    I thought that Construct automatically cast text to numbers and vice versa, when it needed to.

    For now, I can at least continue with the project.

    The important thing is that there seems to be a real reason for it happening, as opposed to it just being a random glitch.

    That means I can carry on with confidence that Construct won't let me down.

    Thanks for the interest in helping out.

    It kept me going, when otherwise I might have left it a week or so because I was so fed up with getting nowhere.

    Cheers,

    Krush.

  • 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 offer, but as it's one of my main projects, I'd rather not have it out there at all.

    Appreciate the offer though.

    I still haven't solved it, but here's something that makes it even more bizarre.

    As I said earlier, I'm using a few text boxes to show the values of these global variables, so I decided to try and use them for the conditions (one of many things I've tried in order to find a solution), and they work!

    So in short, using if global('gb1')=1 won't trigger, but using if text1.text="1" will trigger, even though it's placed in exactly the same group, and the same position in the group.

    Very strange.

    I'll keep digging.

    Krush.

  • Hi guys.

    Today, I've come across a problem that I've experienced a couple of times with Construct in the past year, and I'm not sure there's an obvious solution.

    I have 27 global variables in main use (don't worry, I've used private variables where I've needed to, so I'm not just using global for everything), and simple conditions like global2=1 etc, work fine, and have done for months.

    In the last couple of days I've added a few more global variables (to take it to 27).

    Now it seems that any new conditions that I add to the main layout concerning the new variables (and some of the old ones) never seem to trigger.

    I hope I've explained that clearly enough.

    The strange thing is that if I add a condition involving some of the older variables, they trigger, even though they're in the same part of the layout.

    Then, once again putting the new variable in place of the old one means that it doesn't trigger.

    I've used the debugging to check that the variables are what I want them to be, and I've even used text boxes to display what they're holding, and although they should trigger, they just don't.

    I know the program is reaching the group in question (by use of a "close" command at the start to make sure).

    I said in the title that it's familiar because it's happened twice in the past, once of which was when I was writing the maze tutorial, and in both instances I had to delete the group and write it from scratch.

    I doubt anyone can help with this, as it seems a very strange one, but I was wondering whether any else had experienced something similar in Construct.

    I've spent a couple of hours on it today, and I think I'll have another go at it now, but my patience is wearing a bit thin.

    When run, the program is taking up about 20meg VM, which is more than fine, and 27 global variables is nothing, and I wouldn't expect Construct to baulk at such a low number.

    Krush.

  • Since its just numbers couldn't you just make up your own events using one sprite and 10 different frames?

    Yeah, I did something similar after I posted last night.

    But instead of using frames, I used directions 0-9 (and direction 10 for the blank one to use for preceding zeros), loaded the values into TextManipulator, and used each digit value to set the angle of specific instances of the sprite.

    So I now have my fully working LCD display for text and numbers, and 5 numerical displays, all working fine.

    It only took me an hour last night to get them finished, and I've managed to use my spare time today on graphics, so that was a bonus.

    Krush.

  • Thanks for the honest answer Lucid.

    I'll get to work on my custom version, so it's no problem.

    It's a shame though.

    This is the sort of thing that Construct should have out-of-the-box.

    Maybe if they ever get to Construct 1.0 they'll have included it by then.

    Thanks again,

    Krush.

  • Hi guys.

    My main project requires several number displays on the screen, as well as an LCD display for messages.

    I've created a custom LCD display with scrolling alpha-numerical characters, and I'm very pleased with it.

    I've now moved on to the several number displays that I need, and although I've got a few ways I could do this, I'm wondering if the SpriteFont plugin would save me some time.

    So first off, is it stable?

    I can't remember if it was ever finished (I don't think it's in the "finished plugin" section of the forums).

    Also, will it take values like a score and display it with the correct amount of sprites?

    Will it also trim numerical characters that aren't needed, like preceding zeros.

    In other words, if I want a 4 character display for the score, will it take a numerical value like 380 and display it with the custom font, right justified, and with the option of keeping the preceding zero?

    I'm going to have a play around with the plugin now in a blank cap, so by the time you read this, I may already have my answers, but please don't let that stop you sharing anything you know.

    I may not have all my answers, and it will be useful reading for anyone who searches the forum in the future.

    Thanks guys,

    Krush.

  • It's a bit like the lottery though, they're probably not going to fix everything.

    That's my worry too.

    I think I'm right in saying that Rich is no longer part of the Dev team, and I wonder what sort of enthusiasm the remaining 2 Devs have for finishing Construct 1.

    To be honest, if it wasn't for Ash posting now and again, I'd think that they'd already lost interest.

    I think that they should take Rojo on board to get the project moving again.

    Maybe Lucid too, if he was up for it.

    I'm currently working on a big project that I hope to finish before the summer is out, so I'm hoping that I don't encounter the problems others are having.

    Krush.

  • SPAM ALERT!!!!

    (reported to mods)

  • The way I did it was to use a group to keep it all tidy (but it will always be enabled).

    Then I used a variable "Flasher" to determine which global state the flash was in.

    Set at 1 originally, every 0.25 seconds it will be multiplied by -1, meaning that it will toggle between 1 and -1.

    Then I used private variables to determine whether a sprite was in a flashing state (-1), a stable state (1), or an invisible state (0).

    So it all looked like this:

    GROUP [ FLASHING]

    Every 0.25

    --Flasher=Flasher*-1

    Flasher=1:

    --Sprite1.state=0

    Hide Sprite1

    --Sprite1.state=1

    Show Sprite1

    --Sprite1.state=-1

    Show Sprite1

    Flasher=-1:

    --Sprite1.state=0

    Hide Sprite1

    --Sprite1.state=1

    Show Sprite1

    --Sprite1.state=-1

    Hide Sprite1

    All of the conditions are indented under the every 0.25 seconds condition, so they are not constantly showing and hiding, which would be too processor heavy.

    As you can see, setting both state actions for a sprite to hide means that you never see it, setting them both to show means that it's just visible, and setting one to show and the other to hide will cause it to flash.

    Perfect for keeping everything in sync.

    Krush.

  • Hi guys.

    As I said earlier, I was using 0.001 for both parameters to end the flash and then hide or show it, but it wasn't working 100%.

    I'm pretty sure, if my memory serves correct, that MMF2 would override the flash command when using show or hide, and I guess I expected the same logic to apply with Construct.

    It looks like the problem I was having, which was flagged up by your posts, was that by using a value greater than zero for the parameters meant that the following command to show or hide it didn't work because the flash hadn't actually finished it's duration.

    Using zero meant that it effectively switched it off and the following command would work as expected.

    I've spent some time today writing custom flash routines, and all works well, but it's sod's law that I find out flash would work with zero parameters AFTER I'd rewritten it.

    Never mind.

    Some parts of my game require the flashing to be in sync with other objects, and with my custom flashing, all sprites stay in sync regardless of when they are switched on or off.

    But it's good to know that I can use flash for other parts of the game that don't need to be synced.

    I still think that using show or hide should override the flash properties, instead of ignoring it if the flash duration hasn't expired.

    It's no biggy if we have to use 2 commands instead of 1, but it just seems logical.

    Thanks again guys.

    Krush.