paulscottrobson's Forum Posts

  • Thanks for that, I hadn't noticed that little coda on the system actions page

  • 1) Comment everything almost

    2) Keep seperate object hierarchies code in seperate files as far as humanly possible

    3) Subdivide those using groups as section headings

    Of this 1) is the most important.

  • I wondered if it might be due to a collision (e.g. a triggered event) firing elsewhere. I'm not sure (and the docs don't say) if a triggered event only fires when the 'event processor' is at the outer level.

    How about creating a local variable and putting the Tile() = 21 test in that, calculated at the top of your tile checking, replace the green and red bits with testing that instead ? See if that works, if it does, see if the value of that test is somehow changing between the initial test and the end.

    It also looks to me that you are testing Tile(x,y) = something or other and as a consequence of that changing x and y. This is quite chancy for knock on effects. I'd be inclined to read Tile(x,y) into a local and then test it. What you basically have is a case/switch statement on Tile(x,y) and it is not a good idea to change the case/switch expression as you go

  • Half the time when people report bugs they aren't, it's the way things are (I made this mistake myself) and virtually every time I have "discovered a serious bug" it has been a mistake I haven't spotted. C2's event/pick/select interaction can get quite complicated. It also attracts people with less coding ability than (say) Unity, which in many ways is a good thing, but can have problems for bug reporting.

    I (personally) think C2 is excellent though for a very large problem it would get difficult to manage, perhaps. But it's really horses for courses. Unity is a 3D engine made to work in 2D. But then again, Unity isn't £60 odd for a does-everything licence (except the business requirement bit)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As speed isn't an issue, you could represent numbers as strings and write code in functions to process them. Ideally you would use arrays but they probably aren't flexible enough.

  • As Baseball is largely cricket with the skill element removed (ducks) I'd advise spending as much time on the core bits as possible. I've written a lot of cricket Sims but the one that really worked was on the Amiga, I sold a lot of shareware copies of that. The reason was that it actually felt like you were playing cricket, not some quasi graphic simulation of it (the graphics were very basic but sufficient). The player (I think) sort of gets into a zen state where they imagine they are actually playing a real game. These games are very popular with people who'd like to be good at the sport but aren't (I love cricket but am rubbish at it, after 40 years I can mug through on wits, just )

    The core of the game is really what we call batting and bowling and I think you call batting and pitching (sorry I'm British ......). Get these right and your game will work. That's what players want to do - fielding almost doesn't matter. My shareware game had a very trivial implementation of fielding (actually you saw nothing except where the ball ended up on a mini scanner) and nobody ever cared about it. I probably wrote it in about 20 minutes. But I spent hours and hours making the batting and bowling feel approximate to the real thing.

  • Pick Nearest ? If at the same time as you throw the ball to 2nd base , you move the fielder nearest to 2B there - which is basically the same code, is this a good enough approximation ?

  • I thought you couldn't but you can https://www.scirra.com/manual/125/system-actions

  • In most cases C2 is sufficient. But it is not magic, you still need to think algorithms and resources.

  • Well .... that depends on what you are doing. I guess that your cars are driving round a grid, a bit like Sim City ?

    One way might be to (say) set them off using a bullet - on collision with an intersection graphic you can look at where it can go, and pick a good direction , occasionally randomising it a bit otherwise it would go round in circles.

    It really depends. If (as in Sim City) it is purely graphic fluff, something simple - if it is a core part of the game, say you have to build the layout so traffic moves without getting stuck, you might want to spend a lot more time on it

    As I said, it depends on what you are actually doing.

  • If you want all of the tiles of a certain type to behave this way, put it in family. If you have same objects but different behaviour you will need some sort of typeID to determine the different tile types.

  • I think you can't use the Pathfinder, because your obstacles are too flexible - you have to program the AI of your cars in based on their target and the things immediately around them.

  • "I did, and none of them are beginner friendly. Why are all the quality programs costing nothing and the beginner programs cost upwards of 1000 dollars?"

    They aren't. Construct 2 neither costs nothing (in a seriously useable form) nor does it cost $1000. If you make $5k out of a game they only want £250 for it. If not it's about £70 or something.

    The reason the beginner programs "cost nothing" is they are try before you buy much like Construct 2. You aren't supposed to write full games with it (though there's no reason why you shouldn't), it's so you can see exactly what it does before shelling out your £70.

    Look at the competition ; the prices are eyewatering and many of them are annual subs.

  • No reason why you couldn't use a sprite font or text object is there ? Use a for loop to generate them on StartLayout, use the index to calculate X and Y positions. Or alternatively use the style used in early arcade games (why so many high score tables say AAA)

  • You can't. Well, you probably can but it may well be a bit slow. Audio.AnalyserFreqBinAt() returns a value of a frequency bin, which is a sound sample at some rate (you can get this from the AudioContext I think but it isn't accessible directly).

    You should be able to analyse this for frequency using the usual approaches - zero crossing being the simplest. This is what event 8 is doing - for each frequency vertical bar it gets the value there and sets the bar height accordingly).

    Having worked with SALT the problem with zero crossing is it can be a bit inaccurate. It's okay for high versus low, but it probably needs a more complex algorithm for accurate pitch recognition - probably looking for matching sections in the sample. A PC can do this in realtime in javascript but it is probably beyond Construct 2.

    There doesn't seem to be any code for measuring frequency in the Audio plugin.