podpathos's Forum Posts

  • Here is one possible way to do what you want...It is character from game Abuse(legs and torso animation), and I made it as Player character but you can figure out from here how to make it enemy (instead of sight it would be player)...also image point from which bullet spawns is not correct....

    capx

  • I was mislead by "realistic" "visibility" "detection", and when I think of some kind of "A.I." in CC or C2 I don't go beyond simple FSM (that is Quake 2 - single player enemies not bots-, pre 2000 - where in action games AI is something you devote smallest part of production time), but I didn't said is always done at the end, I said that you must know some basic elements of your game world (which you didn't specify and I was thinking that you want to make AI) - that's why "Most of their code work was performed in a simple cube environment with very few static meshes", knowing what inputs they can get and how game logic functions. I leave discussion about A.I. alone.

    For realistic aiming I think is better to have separate body parts - legs (animated), torso, hands and head attached and controlled via events depending of angle between target and enemy and/or some other conditions.

    There is Lucid's (forum member) amazing tool Spriter, he may implement in Spriter procedural animation - which can be controlled via events, like in this example he made in CC:

    Subscribe to Construct videos now

    try beta: http://brashmonkey.com/

    see possible future features: http://www.kickstarter.com/projects/539087245/spriter?ref=live

    edit: one more thing I didn't say about question 2. If you use private variable for (attack time, die...) each instance would behave on their on - update according to its actual state (of energie, position...)

  • If I understand you correctly you want to randomly choose 3 of 20 and then upgrade that tree different variables by 1. If that is case look this(I use 10 variables):

    http://db.tt/NuRhY5ZA

    Or you then want to randomly choose 1 of that randomly picked 3 and upgrade one of that tree? You can figure that out by first situation.

    edit: mouse click to trigger adding

  • Oh man! I allready told you how to do it - look at picture. But here is the capx (your game) with all the same thing done as in picture. Did you even look at events picture?

    http://db.tt/xRHu8xLm

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also your sprites are are too big. There is no need for such large sprites. For planet you can make 4 slices and from them make whole circle (one sprite 4 instances-4 times less memory in your project for one sprite). Also planet hotspot is not in centre. Background image is too big - make background color of bottom layer dark blue and change background image to smal radial gradinet from light blue to transparent....

  • Dont't use set layout angle("camera angle"), rotate each layer separatly exept HUD layer whit same formula you use in same event. Here is picture (I dont have licence so I must delete some layers for it to work - but it works - you have it more them you need) of event sheet:

    <img src="http://dl.dropbox.com/u/37009800/Construct%202/Help%20Others/rot.png" border="0" />

  • here you go http://db.tt/3LR6iU1i

  • Some general thoughts:

    Making generalized "A.I." is not a good idea. That's why "A.I." is done in most cases at the end of game production cycle. At least not before you know some specific things about your game world. You can't solve (compute) problem-situation if you don't know anything about it (no input). With all of your major game word elements known, you can make number of "hacks" - cheating to make enemies look intelligent - it doesn't matter if enemies are intelligent or not, as long as they look smart (that is player doesn't notice cheating) - in games it is all about surface (designers of A.I. for Halo noticed that during playtesting faze making enemies little bit harder -more hit points to kill them - cause playtesters to perceive them as smarter). There is lots of little cosmetic things that you can do to make enemies look more "intelligent" (provide the

    player with some visual/auditory clues as to what the agent is ?thinking? about: different animation of enemies when player enter enemies' FOV and some audio information- "Aha!", "There you are" - when it exit - "Where is gone"...)

    Unknowns:

    1) How would you move your enemies - platform movement can be done in many ways in C2( physic, platform, and custom behavior, or even via events). And how would enemy perceive game world (visual and/or audio).

       2) Previous determines possible ways of how would you calculate desired trajectories to satisfy the

            3) Goal - Search, Follow, Attack, Hide... Don't make enemies react instant on single parameter - if Value A then action A. Make group of conditions for single goal - Attack: is in FOV, is in Fire.Range, is Enemy.Energie greater... than on Goal.Atack: move, shoot...And this requires

                 4) Logic for switching from one state/goal to another.

    oh... i carried away

    Your problems:

    Question 1

    For basic AI "vision senses" you need distance form player, angle(Player, Enemy),is in angle(Player,Enemy) range, and is line between player and enemy overlapping obstacle

    Look at this examples:

    A) http://www.scirra.com/forum/c2enemy-line-of-sight_topic45095.html

    http://www.scirra.com/forum/enemy-ai-los-line-of-sight-engine-c2_topic46730.html

    B)http://www.scirra.com/forum/turrets_topic49010.html

    Examples A will tell you if is player inside of enemies in line of sight, and example B will tell you how to make "realistic" cone of view. Try to understand them and combine them.

    Suggestion: If player is in enemies FOV for short period and then exit it, you can create object LastPosition on that place and make enemy go to LastPosition (otherwise enemy would act as he dont care for Player unles Player is in FOV). You can make some private variables in Enemy - LastPositionX, LastPositionY (when Player leaves FOV set them to Player.X, Player.Y). You can even store Players VelocityX, VelocityY, and Speed at point of exiting enemies FOV and predict possible new position after second or so, and than spawn another object there and tell enemy to go and look is it player there or not. This is all pretty simple but you can get with it decent enemy behavior.

    Question 2

    It is not clear to me what you exactly think. Do you think intstances of same type (Sprite) - instances dont react all at same time unless you tell them to do so. If you specify conditions for actions and include "for each", then only instance that satisfy those conditions would be picked and perform those actions.

    Or you want to make Global.Enemy type object (one logic for all enemies) and then send to him specifics of each type ("different attack times, die, detect player"). For this you need families and families behaviors implemented. Wait and learn what is there.

  • I made something for you, I think that can help you. I spawn object from another object Image point (to amuse myself). You can set create object at X radnom(Window.Width) Y radnom(some negative value) if you wanna object to enter Layout, some small positve if you wanna to create it inside... rest is in file...hope it helps...

    try Dont

    capx

  • In same event, after action that spawns instance add action: set Instance.angle to Parent.Angle+180.

  • Read FAQ

  • I am just joking man (remeber mario exemple) <img src="smileys/smiley1.gif" border="0" align="middle" />

  • kataryna use my second "stupid" example it is much better then Erndog2k's one <img src="smileys/smiley2.gif" border="0" align="middle" />

  • by "possibility to dinamicaly deffine..." I was thinking that it can be done not that I did...but here is how to deffine is one object inside another: http://db.tt/3iAGTdry

  • destroy only that which can be seen? if "seen" is that on top and all other are allways covered by topmost(no changing of z order or position) than you need this simple exemple. If they can be covered partialy (or only two covered)but also completly or not covered at all than this little bit stupid exemple may help you

    ...there is also possibility to dinamicaly define if is one box inside another and then check if it is behind or before and then destroy one that you need...