Jaycephus's Forum Posts

  • jayderu: "It looks like Hero's vs Monsters uses sprites for the objects, and tweening engine to handle animations."

    I don't doubt you, and believe this to be probably true myself before now, but do you have information on this? I was trying to find what tools they had used to create art and code it for the iPad is why I'm asking.

    From my perspective, I'm not sure that I would ever use the SVG plug-in if bitmap resources would serve just as well.

    The only reason to put native vector-art into C2 (essentially making it a full Adobe Flash HTML5-based competitor, which isn't a trivial point, given the market it opens up) would be to have art-asset and animation creation inside of C2 itself, AND to permit programmable interactivity of the animation aspects. The quickest and most cost-effective 2D animations seem to be with vector-animation systems like Synfig, Toon Boom, and Anime Studio, but these don't offer the ability, like Flash, to make an interactive game with vector art. And the level of interactivity I'm speaking of is down to the level of modifying positions of individual control-points (or a system of bones) based on real-time physics, or the actions of the mouse. (for example, rag-doll physics on a vector-art based character, not that something very similar and acceptable couldn't be accomplished by hand with bitmaps or more easily with Spriter, but it would be a composite-bitmap style animation, rather than a potentially more fluid-looking vector-based animation.) (Also, permitting control of colors of the vector art, so that things like character- or item-customization are easily permitted, but use of the SVG plug-in could cover this point.)

    But this feature is only seen in a small subset of all Flash games. So I really, really don't expect Scirra to put this kind of stuff into C2 until maybe they are at the point of searching for new things to add. Maybe. And maybe not even then.

  • I've played Heroes vs Monsters on my 9 yr old's iPad, and it is a nice game. He bought it with his own money after seeing a friend playing it. It's a pretty nice little game with a lot of appeal.

    itunes.apple.com/us/app/heroes-vs-monsters/id467274250

    It is obviously produced with a vector art program and appears to be 100% vector art, and if it were a Flash game, it would be obvious that it was all vector all the way through up to screen render at run-time. But since this is iOS, I know it isn't Flash.

    The game works on iPod, up through iPhone 5 and full-size iPad. Obviously, it would be a great benefit if the underlying game engine accepts vector assets, and there is never any bit-map phase that you have to round-trip your graphics assets through, but I have no idea if there is such a framework for iOS. (The benefit being that scaling the GUI and mobs is pain-free, except where the developer might choose to actually provide more layout area on a bigger device.)

    Performance wise, the individual elements of the mobs appear to be static, meaning the whole game simply treats the vector art pieces as if they are bitmap sprites. I need to play it again to see if there is animation of the elements that implies vector abilities, but the mobs are all basically a head, torso, hands, and feet. These 6 elements are merely translated and rotated for all the movement and fighting animation. Armor, helms, weapons, and such are mostly statically stuck onto the basic 6 elements (or replace them, as in 'plate-armor boots' replacing default shoes).

    I did check out a YouTube of the game real quick and see that there is element squashing and scaling, such as when a bow is shot, or when smoke-cloud, flame, or dazzling-light effects are performed, but in the fight I watched, there was nothing I saw that can't be done in C2 with bitmaps.

    I've certainly never seen any HTML5 system out there that rivals Flash for creating vector-based games. Adobe Edge is obviously meant to grow into that role, and there is a company called Sencha that produces something currently equivalent to Adobe Edge for use with their other framework(s) that could actually compete slightly with Construct 2 for making an HTML5 game, but it has nowhere near the ease of use and speed, or versatility of C2.

    In my very modest opinion (meaning I wouldn't give my opinion a great deal of credence, but here it is anyway), given that it would be the first platform that would attract Flash game developers in droves, adding Flash-style vector creation and animation into C2 would be huge.

    For me, that means the ability to create symbols that have their own behaviors, and, second, the ability to animate the vector art, but have it be interactive, not just static. As mentioned above, Anime Studio does vector animation very well, but making it interactive in a C2 game would be difficult, or more accurately, interactivity would effectively be limited to about the same kinds of things you could do with Spriter and C2, or actually not even that much, easily.

    Flash can allow things like real-time game physics, i.e. gravity and collision, to affect the vector animation, since the underlying assets are vector right up until final rendering on a screen.

    All this said, it would be nice, but I can definitely see this being too little gain for the amount of work involved. On the other hand, how formidable would the competition be from an Adobe Edge that was fully programmable and as capable as Flash is right now?

  • A big downside to purchasing through Steam is that Steam is still caught up in being a Game provider, and there are mechanics to Steam that suck for normal Applications. Steam pauses downloads when you open a game through Steam, and also only lets you open a single game at a time. This is generally OK, though why stop downloading a game if the game that is running doesn't even use the internet?

    But for APPLICATIONS, these restrictions are literally stupid. I know that I have been able to open Construct and have a game running as well, but not always. I often am forced to close down something before opening up something else, be it Construct that is already open, or in the case of trying to open Construct. And since Steam is getting into selling all sorts of Game development apps, art apps, productivity apps, etc., this has become a fatal flaw in buying apps through Steam.

  • Yes, you are right. I was thinking of the 'Compare Instance Variable' condition of a Sprite, but then he would have to store the Enemies UID in an instance variable of IceBlock to facilitate that. I just shy away from doing For-Eaches on every tick if it can easily be avoided.

  • So I wrote:

    --> subSubEvent: Pick all IceBlocks && IceBlock.PinnedUID = Enemies.UID: destroy IceBlock

    This was my short-hand for two conditions:

    ---> subSubEvent: Cond1: Pick all IceBlocks

    ----------------> Cond2: IceBlock.Pin.PinnedUID = Enemies.UID

    --------------------------> Action: Destroy IceBlock

    So just to be precise, there are multiple conditions:

    1st the .1 second timer triggers.

    2nd, a specific enemy is being processed at a given instant, and only from the subset of enemies that have their Freeze variable equal to 0, be that 0, 1, or 13 different enemies at once...

    Then the Pick All IceBlocks has a second condition that you also use above in your code, which discards any IceBlocks that are not pinned to the specific enemy being processed at that moment, meaning it only does this action on one IceBlock, or none if for some reason no IceBlock is pinned to the specific enemy being processed. Of course, if somehow two enemies are selected because they each are at Freeze = 0 state, then they will still be processed in turn, and only one IceBlock will be destroyed in turn for each enemy.

  • Oh, and it is not quite clear what your problem precisely is...

    You said:

    With 2, it will usually delete both of them, but randomly will leave 1 undeleted while the enemy acts unfrozen.

    'delete both of them' refers to what exactly?

    'leave 1 undeleted' refers to what exactly?

    I assumed IceBlocks...

    And also, are you saying the enemy fails to freeze for 30 secs, randomly, in the cases of two or more enemies?

    In both cases, it is pointing to a failure to pick precisely what you want to affect.

    I think the code change I suggested above will fix the IceBlock issue, if I assumed correctly.

  • You don't need the top For-Each block:

    The relevant trigger is 'On collision'. Getting rid of the For-Each will cut a lot of un-needed processing.

    Since you threw in the 'once ever .1 sec' condition, and thus 'Freeze' can only ever change at that frequency, I would rewrite it with that as the primary event trigger, which should reduce processing overhead, and furthermore, I would change the destroying of the ice block(s) as shown:

    Event: Sys: Every .1 sec

    • -> subEvent: Enemies: Freeze > 0: Sub 1 from Freeze
    • -> subEvent: Enemies: Freeze = 0: do stuff...

    --> subSubEvent: Pick all IceBlocks && IceBlock.PinnedUID = Enemies.UID: destroy IceBlock

  • You're welcome. I needed the feature myself, so I searched and found a Podpathos capx that demonstrated limited fields of fire, but implemented the turret directly in events rather than using the behavior. I wanted to have predictive aim, firing rate, etc, from the behavior, so I modified it to use the behavior and still limit the field of fire.

    To demonstrate the effect of turning Predictive Aim off, I updated the latest version of the capx above to set Predictive Aim off on the third turret from the left. For this pattern of targets, and the velocities involved, it never hits a target, ever. I also added field of fire indicators to the range indicator when you click on a turret.

    I think limited fields of fire is the only really needed thing missing from the turret behavior. Perhaps an option to limit the detection area to the limited field of fire as well. Also, having a detection range that is longer than firing range might be nice, since you can almost always see the target before it is in range. But that can easily be implemented in this capx by simply setting the bullet.range at time of spawn to something like turret.range * 0.5, and then doubling the turret range. The problem of detecting enemies behind turret, outside of the field of fire, would still remain, and be made worse as well. This is bad because the turret locks on to the first target in range in my preferred targeting mode. So for some time it may be unable to fire on the current target, while other targets pass within its field of fire. The solution is probably to monitor the diffangle and distance to the target, and as long the current target is out of range of the actual bullets, force it to unacquire the target (a feature of the behavior), say once a second. Then the turret will re-pick the nearest target, which could be the same target somewhere behind it or out of bullet.range, but at least there is a chance it will re-target something in front of it that is in range. The downside to not permitting the turret to target beyond the field of fire and range of its bullets is that you lose the opportunity to pre-rotate toward the target, which allows it to get more bullets on the target depending on the circumstances. I think most games just allow the turrets to rotate really fast to solve that issue.

  • Thanks! Should have mentioned above to click on the turrets to see the info and range graphic.

  • Updated with some info graphics:

    (updated again to show what one turret with Predictive Aim off does... and added field of fire indicators when selecting a turret.)

    Turrets - Limited Fields of Fire

  • I added limited fields of fire to a Podpathos capx:

    Limited Field of Fire Turrets

    • orig did not use turret behavior at all.
    • it now uses turret behavior for acquiring target that is in range, predictive aim, triggering the shot, etc.
    • the turret behavior auto rotate feature is disabled and angle of turret is rotated back inside the limit, or back to the base turret orientation whenever it hits the field of fire limit, or when there is no current target.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • More of a question to silkc2, since I ran into a problem that he solved with families.

    I wanted to set Physics joints between instances of sprites at run-time (and dynamically alter those joint connections), and it appears there is no way to select the sprite instance target, except by the technique of using families, which I do not have access to in the free version. Is that correct?

    Thanks.

  • I meant to add that there is more than one way to accomplish the same thing, and a 'class object' approach, where there is something like a 'struct' plug-in, and we would just create as many instances as we need is fine as long as the above functionality is included. With instances, as opposed to an array, you can create and destroy however many you need in a given time-frame, optimizing memory usage. But this plugin would need to create instances of other definitions in order to duplicate the structure within a structure hierarchy.

  • Did a search, and this appears to be the most recent post on the subject.

    I am missing this kind of functionality.

    Specifically, I would like to see a 'user-defined data type' or what is called a structure or 'struct' in C:

    psuedo code of no particular language:

    structure coord{

       x : number;

       y : number;

    };

    structure Enemy{

       ID : number;

       coord : coord; // <-- uses the struct defined above.

       onscreen : boolean;

       damaged : boolean;

       name : text;

       attack : number = 1;

       defense : number = 1;

       weaponModules : array[0..10] of hardpoints; //<-- an array of a struct.

    };   

    Enemies : array[1..100] of Enemy; //<-- an array of the Enemy structure.

    With this kind of structure, the code is a little better at self-documenting, as opposed to using plain arrays. For example:

    Accessing Enemies.weaponModules[j].hitpoints is far more readable than something like aEnemyWeaponModules[i,j,4], where you have to leave yourself a note that Z-index 4 is 'hitpoints'. And you have to know how you are associating separate arrays that contain all the Enemy parameters, or else the documentation load gets worse and the code gets more cryptic if you are cramming everything into one array called aEnemies(x,y,z)

    For all intents and purposes, it is a record with fields, as in a data base, with fields consisting of one or any of the base types of the language, which for C2 is essentially a 'number', boolean, or string (text). But it also can contain another struct as one of it's defined fields, and it can define an array of any of the three C2 base types or any previously defined structures. So you could have a hierarchy of structures, where potentially, only the lowest levels of the hierarchy actually contain base types.

    For now, if I just want an instance of this kind of record, or want several instances to act as a table of records, then creating instance variables within an Array will be the closest I can come, I believe, with the exception that it can't create an array of instance variables (i.e., sub-arrays), nor can it create an instance variable, or 'field' of a type other than number, Boolean, or text. That, and the instances can't quite be referenced like an array, though C2 does provide good ways to pick specific instances or process all or a subset of instances, so maybe that is not an issue really.

    Then to realize the full benefit, I would want to be able to write a function that takes as an input parameter (or input/output parameter, or typically called a by-ref parameter in some languages) one of these structures.

    Of course, the structure concept and XML mesh well together, so you could have the XML plugin write a structure out to XML, or read an XML file into a structure, facilitating saving and loading save-games or game-options, or other persistent data.

  • Kyatric, still 'digesting' the capx. It looks like I'm going to get a lot of learning out of it. Thank you.

    I see that you are a supporter of Spriter. Do you think spriter would benefit a simple RTS? Obviously, some kind of cut-scene animation might make good use of it, as I understand it. But what about an RTS-style game that 'just' has animated buildings and units?