saiyadjin's Forum Posts

  • hardcore flappy bird.

    2 buttons - 1for jumping, one for shooting.

    remove obstacles and add enemies and powerups - endless fun.

  • it's the same sprite. i'd do it with an effect but then whole sprite gets changed (mine included).

    guess i will have to edit each frame in photoshop :/

  • that decolorization is part of a sprite. it's not an effect. it'a simple 20 frames sprite.

  • don't you see the RED CIRCLES?

    under health crate, mine and bouye ? that water has wierd color (darker) (it was set on each sprite so i can simulate "bumping on water" ) but it looks badly, i'd like to make it a little less visible / to better integrate it with the rest of the water..

  • it's simple.

    each.. let's say 0.1 or 0.2 sec regenerate obstacle map

    and subevent - foreach - instance - find path to... whereever it was moving to (through their instance variables set them to x,y) and then move along path.

    i've tried for 10 boats in my game - works sofar good, BUT! when you get to let's say 100 instances or more, it might get laggy + work badly if CPU is weak, because it uses a lot of CPU power and there's a lot of sprites with movement - lots of calculations.

    so to ease it up - you could set them to solids, add custom movement and on overlapping add - "push out nearest" - then reduce pathfinding to let's say... each 1-2-3 sec or simply remove the foreach and let it calculate just once(if your objects are static!) if your objects are moving you will have to use that loop

  • try to optimize your events. there's a lot of stuff that can be done easier and it just needs proper thinking.

    i've found one optimization in my code when i was doing pathfinding - instead of pathfinding for every object i've added it to family of those objects (one object can be in more families) and set stuff through pathfinding, but since my obstacles move so does map need to be regenerated, if you do that on each tick it's very very costly in performance, so in my example i put every 0.2 sec - which works good and sprites don't get stuck.

    also you can include calculating collisions for your visible window. if your layer is 10k x10k and your window is 1000x1000, you don't need collisions on other then 1000x1000. (use Is on-screen condition) . also through instance variables i control where each instance moves, (foreach enemy on screen i take his x var and find path to it and move along ) - there's really a lot of lot of optimizations to do to improve your speed.

    also try disabling collisions on all objects that don't need collision (like background sprites, static sprites that are never touched and are just aestethicly there, and others)

    also use overlapping instead on collision. (i herd it helps)

  • added enemies (without effects yet ) - with pathfinding and line of sight behaviours so they can traverse around moving obstacles and shoot you on sight ;D

    still a long way to go though...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hey guys, i have a sprite that looks just... ugly on water, and i'm wondering how to fix the coloring (if possible with effects!)

    anyway attaching image - i've marked with red the problematic thing.

  • well it's a bit tough to make walls on sea

    anyway i've got it working somehow, i update obstacle grid every 0.2 sec and then foreach instance of enemies find path and move them along path when found

    anyway it works good and idon't have more then 10 enemies max on screen. i haven't lost a single FPS and it seems to work correctly.. for now.

  • yes it is. add invisible sprite to your char (pin it), give it bumpmap props and let it work it's magic on your background.

    or - pin the x and y of bumpmap on wall to your chars x and y, and increase Z a bit so it is lighted just around your char. (no need for extra sprites this way)

  • hey guys, i'm still working on my game and there's a problem that i can't think of how to do..

    so i spawn at some time intervals enemies that need to traverse downwards and avoid obstacles (using pathfinding ofc.)

    my screen/layout size is 1366x768 pix. now i have set properly spawning points for every sprite, added them bullet behaviour, DooL, and solid (obstacles), gave them

    angle 90 and speed 20. so my obstacles move at speed 20 downwards, which seems like you're traveling upwards, but now i spawn on the upper side enemies (with pathfinding) - example: create object enemy1 on (800,0). then i call find path (random(0,1366), 768) and on pathfound - move along path.

    so what's the problem here? once my enemy starts moving it goes through my obstacles, but avoids them on the place they were before in time.

    hacking that up, i've come up with idea to set "if on screen + every 0.5 sec" - regenerate obstacle map + move along path. - noticed that i need to use

    find path (with new obstacle map) to find a new path for that enemy. problem is that this enemy now will gain different random position every 0.5 sec which i don't want.

    so how can i create a function that updates general obstacle map (same cell size for every enemy) and find path for each enemy on screen to where it randomly got assigned when created, each 0.5 sec?

    uhh.. i kinda feel like i could have simplified this.. anyway thnx for helping!

  • yes it's a laptop, 980M is freakingly awesome and superfast!

    p.s. my game (the one i am currently makin') gives me 69-74 FPS (up and down) which could mean that my game is more intense, but it could also mean that

    debugger is bad at evaluating FPS :/

  • 0.23512 (i presume *100%) = 23% CPU, constant 75FPS (yes i have a higher vsync)

    cpu - 4860HQ, 980M gtx nvidia

  • didn't know that, thanx

    edit: both examples are exactly what i needed, thank you guys!

  • thnx guys, i will try somebodys idea, i can't try your capx's because i use only stable constructs (r195 atm), but i will check them out when next stable (probably r200) is out.

    Somebody - i need that value to be random - if my sprite is x in length and y in height, how can i get a random value for the duration of bullet not to fly outside on the other side and stop inside that sprite? (i need it randomly, your timer should work, but how do i determine timer's range of values? (from x,y and bullet speed)? )