farflamex's Forum Posts

  • I have text file which I've added to my project, containing 10,000 surnames, which are seperated onto individual lines. I'm reading them into a single string using Ajax, which is very fast, but then I'm trying to find the fastest way to store and read the lines.

    At the moment, the fastest I've found is to keep them in a single string (also more convenient) and when I want a single line I can get it with tokenat(mystring,number,newline). This is pretty fast, but still causes a noticeable pause if I do it several thousand times (which I need to).

    I've tried parsing them into an array or as individual lines into a listbox, but both of those are much slower.

    Any other options I could try?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My bad, should have pointed out that the light blue blocks are the enemies. I just haven't put a graphic in yet. The blocks do make the effect very obvious.

  • Here's the capx showing my issue ... Capx

    I have a tiled background, 256x256, which I'm positioning relative to the player's 'map' location (the player is held steady in the exact centre of the screen and everything revolves around him). So to find the location of the tiled background, I use a 'mod 256' calculation.

    Then to find the location of enemy ships (which are also placed relative to the player at the centre of the screen), I just need the relative placement, e.g Enemy.X = Player.X + (Enemy.MapX-Player.MapX).

    As pointed out below, the enemies are the light blue blocks.

    Both calculations are 'correct' (I think) but it leaves a strange effect where the enemies 'slide' against the background. I'm guessing this is because the enemy positions aren't integers and the tiled background is set to exact integers because of the mod function.

    Any ideas on how to correct this? Is there a way I could position the scrolling background more accurately without using mod?

  • Thanks, think I'll bookmark this thread so I can refer back to it next time this crops up :)

  • I know how to move a sprite along an angle, but I want to move some variables (X & Y) along an angle and distance that I already know (the angle between the player and the mouse cursor). So basically I want to know the math function to update the X and Y position of my sprite with an angle/distance without actually moving the sprite.

    I understand that I could move the sprite, update the values, then move the sprite back, or similar tricks. But I want to know the actual mathematical solution (trig functions I think?).

  • Yes I've also noticed that. It's particularly bad on mobile where you see the assets all jumbled up in the corner for 2 or 3 seconds. Thanks for the tip, I'm not too fussed about this game but for my next project(s) that's something I won't want to see.

    Yep, advertising revenues don't seem to achieve anything. It's the same on every site, around 1 cent for 1000 plays. I think the only real money comes from unlocking and upgrading stuff, or getting involved in a commercial product.

  • Looks like at some point I managed to fathom it out after all cuz they're activated for Korelos. Made a whopping 2 cents so far from about 3000 plays. So it's no biggie really. I got about 4 dollars off Clay.io but that's because when I first released it, the ad was half-covering up a button and people were hitting the ads accidentally. Once I moved it, I've made about 10 cents. I don't think ads really work right now.

    As I said to the guy who plays Korelos, even if only 1 guy likes it out of the 3000 who've played it, that'd still be a lot of people if you could get everybody on the internet to see it. Problem is, getting them to see it. Everywhere I've put it, it instantly fades off the front page and disappears. Never had a single hit on Chrome or Firefox stores.

  • Thanks Dave. For a quick and simple game it did the trick. A good learning experience and I don't mind the lowish ratings on Newgrounds because it got what it deserved. Looking at the 'Greatest' games, the highest rating is 4 out of 5 anyway, so a 3 for Korelos probably wasn't as bad as I thought.

    Speaking of that, some guy asked me to put up the full version without the demo limits because he's been playing it to death, so it's good that someone is seeing all the detail :)

    I've been looking for Newground ads for ages, but could never get them working. There's no money in it right now I think, but it would be nice to see if you can generate a trickle. Can you tell me how to activate their ads? I've looked before and just took another look but I can't work it out :(

    Oh and no joy getting the Clay.io ads to show on Newgrounds. Not quite sure why because the leaderboards work. Not sure if the achievements are working though, although I think they only show for people who are logged in. Since it's had about 2000 plays and you instantly get the 'Jupiter' achievement just for starting, the stream should be flooded with it, but it's not, so I think the achievements only work for people playing directly from Clay.io.

  • I've had no probs with Clay.io but I did just use the standard leaderboards. How are you trying to post? What's the code you're currently using?

  • Cheers Ashley, have emailed it. Would prefer not to cause you more work but I'll probably make it worse, so better safe than sorry :)

    Maybe stick a quick tutorial up explaining how to self-fix it?

  • I've only just realised that my previous game, which was very large, will no longer load into C2. When I load it up, it gets about 75% of the way through the loading bar then gives the error 'Failed to open project .. (name and location)' 'Object name in object parameter cannot be found in project Line 4513 column 49 in space.xml' 'The file may be invalid. Try checking the file in a text editor (projects are saved in XML format)'.

    I'm not sure what's causing this or what I'm looking for, or how to fix it. If I open it up in Notepad++, line 4513 just has '</family>'.

  • What do you need to save the playername for? Are you sure you're logged on?

    What are you trying to post?

  • I assume you've updated this since this post was over a month ago, but did you try the method I told you about for Korelos? Basically, have the ships move and rotate towards a location on the screen and every second or so, change the location (somewhere close-ish to the player). As the player moves, it creates some interesting AI and it's all I needed for my game. People were convinced I had AI for chasing, running away, dodging bullets etc, but it was all an effect of this behaviour. It probably only works for top-down shooters, but it was a great time-saver for my game.

    I can't get this capx to work by the way, but since it's old and I'm on the newer version of C2, that might explain it.

  • There you go though, if your quick book did better than the slow-to-write ones, it makes me think you're better off pouring out loads of fast games (which would probably be mostly poorer quality) in the hope that one just pays off. After all, a game never ends up how you intended and some things just fall into place... or don't.

    The one thing I like about writing fast games such as Jovian War, is that they're completed more quickly and much easier to work with and you never feel bogged down by them. Added to that, there are fewer problems with compatibility (heck, JW even fits on the Scirra arcade, lol).

    I'm going to try to get JW uploaded to some phone sites since it was intended as a phone game anyway and actually works quite well (apart from your finger getting in the way all the time). That's something I've not experienced yet so will be interesting to see how that goes.

  • Excal

    Looks like we're of the same mind. Turn-based strats and the like are what I'd prefer to develop. Arcade strategy can be fun too, but I'd like my game to have a lot of strategical elements as those are the games that I play. I'm still tempted to pump out a single simple action game every month and hope to get lucky with one, since it's risky that you'll spend a year on a strategy game and people will just say 'I don't like strategy games' and rate it at 0, lol. But I guess this means I need to work out how to market things properly :p