Guizmus's Forum Posts

  • You can try out procedural level generation, but in a case like Motherload, I would just go with some smart randoms.

    First, start by filling your level with the standard tile (grass on top, then dirt everywhere else).

    In a second time, depending on the ore distribution you need, do a random on each layer to see what tile to change into an ore, and repeat for each layer until the bottom of the level.

    Example, if you want :

    • 1000 tiles width
    • 30% stone
    • 5% gold

    on one layer Y, then you should have around 300 stones and 50 gold on this layer. So in a "for" loop, go form 1 to 300 (then from 1 to 50), and replace the tile at X=random(1000,Y) with stone (then with gold).

    Repeat this for each layer, changing the % depending on Y (you may want more gold in higher depths), and you should be good.

  • This may not work because you change layout. It is possible (i'm not sure) that the "once while true" doesn't work between layouts. In this case, functions is the way to go. Keep updating "currentLayout" like you do, but after substracting/adding one to currentLayout, call a function "changeLayout" in witch you put all the other events. Remove the "once while true" if you do so.

    This way, those events won't be evaluated every tick, but only when the user clicks on sprLeft or sprRight.

  • You've got it, but it's On AJAX complete -> execJS(Ajax.LastData)

    I'm not on my computer right now, I'll add an example later.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It all depends how you do it. As long as the event sheets you include don't have unnecessary evaluations every tick, it shouldn't be a problem. As onFunction events are real triggers, this will not influence the performances.

    For more intensive group of events that act only on one object, you could put them in a group and toggle activation of this group on creation/destruction of the corresponding object.

    To sum up, what you want to do is CPU friendly as long as you include only what you need where you need it.

  • If you retrieve the string from the js file using Ajax, you can execJS this script and it will immediately be usable.

    To check if a function is defined, typeof(myFunction) == "undefined" should do the trick.

    Rexrainbow's solution is better than mine though, you should try it this way.

  • I don't think you can have a trigger in C2 "on load" for this.

    But you could, after the first execJS action where you happen the script, activate a group in C2. This group would just have one event, a condition checking in the FunctionA is defined. Once this event gets triggered (aka the library is loaded), you can call a function in your events that will handle the next steps, and un-activate this group.

    Or you could have your external script do an action on load, like simulate a click on a button. If you added this button in C2 (setting an ID, making it invisible), the event "onclick" (the C2's one, in the event sheet) should be triggered.

  • You should ask a big friend of us all those questions : google... It's not that hard, and sure will be in the first page of results...

    Publishing on the Apple app store requires a dev account, so it's around 100€ I think (not sure right now), and then you can submit games, and hope they are accepted.

    On facebook it's free, but again, google and tutorials are the best to help you. Like this one.

  • Well, Joskin is kind of right you know, you come on a forum with developement help, and ask for a finished game to package and distribute... I thought I would just stop at my first sentense since you didn't search for it either. Glad if it helps though...

  • Basicaly, you want a game made and then change sprites ? Sorry don't have that. I have hints on how to make one yourself though if you like.

    CookieClicker is an incremental game, and I know you can even find some "incremental game generator" online, where you only have to replace assets, and choose building types, power, prices, ... Orteil (the one behind coockie clicker) even made one (here is the help section, the game maker is under maintenance).

    As for the coockie clicker game, it's realy not that hard to build. It's a sprite that you click, it does some effects, it adds each time points to a cookie total. Buildings are also just sprites, a base price, and a counter of how many you have. Everything else is calculated every tick with good old maths, functions, ... and finaly displayed.

    One last thing, if you are going to make one of those games, try to take a look at this article on coockie clicker, explaining how it did things right.

  • I may be mistaking, but as only a few hours had passed between your first 2 message, I have to ask. When you say you published it, you mean you send it on your dev account on the app store for submission, not just export from C2, right ?

    If you just exported it from C2, you can export it as many times as you like. It won't publish itself. And even if you sent the same game twice, they wouldn't accept both.

    You can export your game with node Webkit too, it will make you an exe file and then you can start selling it once you've got a distributor, or make a store online to sell it.

    I didn't get your last sentence. If you wanted to know if you could export it to facebook, yes you can. Just try it, it will build you the necessary files for submitting it onto facebook.

  • I can't help you with export, but here is your post. You can find it using the "View your posts" shortcut (top left of the forums) or from your profile

  • Maybe this could explain it ?

    I have no other idea sorry, every publishing I've done on google play went well with the same steps as yours.

  • And here it is

    The events were all right. Only problem was your tilemap : it was set to tiles of 32x32 but your image was 240*60. I stretched it to 256*64 and all was all right.

  • Here is an example. I tried it until it eventually broke, once the ball was moving over 4k pixel per second. Can't blame it.

    After a lot of tries, using the collision detection like this and bouncing manually, with big *** walls, had the best results.

    Only true solution would be to detect if the ball is now out of its box, interpolate the theorical boucing point and calculate the correct position.

    I looked into the example you linked Katala, and didn't understand everything, but saw so many loops I got scared :p still, the FPS was 60, with hundreds of loops being done every tick, I was amazed ^^

  • Would you like to share the capx maybe?