JH1's Forum Posts

  • Trying to get back into C2 after a long time. Good to be back!

    Takamoto, that looks really good!

    Decided to start an action RPG. First task was getting that Zelda style room scrolling with the time freeze, but was having issues with it thinking I was overlapping multiple zones at the same time. Finally figured out that I need a For Each on the zones when looking at potential multiple overlaps. This solution looks fairly CPU intensive though (5% on it's own) with just 100 zone checks so if anyone has a better way to optimize this let me know! Perhaps I'll chunk up the world map into smaller layouts.

  • After banging my head against the wall for a couple days, I finally figured out a simple solution for procedurally generating Zelda/BoI style dungeon layouts using a mining method that builds door locations as it goes. I particularly like that this method always ends with the boss room having a single entrance and is probabilistically the furthest from the start location.

    Green = Start

    Yellow = Random Item Room

    Red = Boss

  • I started trying pixel art recently (I'm not an artist) and found using existing spritesheets as templates quite helpful to get the style, proportions, and poses I'm looking for. I am however worried about plagiarizing other people's work using this method.

    I put together a quick transformation as an example:

    Using the Earthbound character on the left as a template, at what point, if at all, does my character cease to be a derivative of the original?

    1. Change color pallet, clothing, and minor linework. Different hat / hair.

    2. Change face and minor body structure in hands / feet.

    3. Remove shadow and adjust linework. I would add my own shadow outline here.

    4. Squash character to more drastically alter the body structure and re-work linework.

  • Would it be possible to have multiple colors and/or icons for Groups?

    For example, either a color drop down in the Edit Event Group popup, or being able to right click on the Group and have a color option in the standard popup.

    I typically use a mind map or google doc / spreadsheet as my blueprint or design doc, and it eventually gets messy and tedious to jump back and forth between C2 and those files to make sure they're in sync.

    I think having multiple color/icon options for groups would eliminate the need for 90%+ of the content in those other docs for smaller projects in addtion to possibly being able to do my brainstorming directly in C2 instead by using a combination of the group description and colors/icons according to priority and completion. This should allow me to get the visual representation I need for organization without having to jump in and out of C2.

  • Just a thought, but is it possible that when using frames you haven't set the animation speed to 0?

    Happy that the animation method worked for you either way!

  • Rather than a bunch of if statements spawning separate objects, incorporate all of your obstacles into a single object as different animations or frames with a corresponding number.

    Example:

    On spawn trigger:

    set localvariable to floor(random(x,y))

    spawn obstacle

    set obstacle animation to localvariable

  • LittleStain

    I like your solution so much better and it simplifies so many things for me. Kind of like a switch statement.

    I think I was trying to accomplish all of the "if param..." statements in one line which obviously didn't work at all, and is really not necessary when using functions that already save so much time and space on their own. I was mapping out all of the messy "if animation frame..." I was going to have to use before I read this.

    I'm definitely going to remember this for the future. Thanks!

  • I ended up just dumping all of my bullet sprites into frames of an individual bullet sprite and setting frame on creation to match the player unit spawning it.

    I would like to see a spawn family object by index, if it isn't already possible.

  • I have the following setup:

    playerUnits (family)

    --> family instance variables: fireRate, bulletMatch

    --> family behavior: Timer (by Rex)

    playerBullets (family)

    --> family instance variables: bulletMatch

    --> family behavior: bullet

    <img src="http://i.imgur.com/o91PyE1.png" border="0" />

    In the image above:

    At SOL, each instance of the playerUnits family receives a regular (ie continuous) timer based on the various fireRate values I've assigned from my Dictionary object. Debugger shows all timers are working correctly.

    What a timer triggers, and I'm assuming it picks the instance it triggers on, I am passing the instance's bulletMatch number to my "spawn pBullet" function.

    I am then trying to pick the specific corresponding bullet object to be spawned based on matching playerUnits.bulletMatch with playerBullets.bulletMatch.

    Current result: random bullet family objects being spawned, all simultaneously from all player family objects, and they quit spawning after 3 or 4 shots.

  • EDIT: Figured out my silly mistake right after I posted this. LMB click is a trigger and running Every Tick as a sub-event make the tick event only fire once.

    If I were to give a circular object Physics and have it set to apply a Force towards another target object on mouse click. I also apply a Torque at the same time to give it rotation.

    What I would like to do after this point is have the Physics object drift to the left or right based on it's rotation and angular velocity. Imagine a spinning top given forward momentum that gradually veers to the right when spinning clockwise, with the amount veered based on the current speed it is spinning at.

    I have everything working as in the first paragraph, but I've tried numerous methods to get the object to drift without success. For Example:

    --> On LMB: Object | Apply Physics Force 10 toward (target.x, target.y) and Apply Physics Torque 50

    Sub Events:

    A)    Every Tick: Object | Move object.Physics.AngularVelocity at angle 0

    B)    Every Tick: Object | Apply Physics impulse (object.Physics.AngularVelocity,0)

    EDIT

  • I'm not sure if this is the right place to ask this, but I'm curious as to how this would affect optimization with tile maps. I don't think the manual addressed it:

    <img src="http://i.imgur.com/bHeNxnv.png" border="0" />

    Rather than using all of the tiles shown here, how much of an improvement, if any, would I see using only the highlighted tiles in combination with the flip and rotate tools?

    My understanding from the blog entry is that it's looking more for blocks of identical tiles in the actual layout to group so I'm unclear if reducing the amount of tiles in the map would be any improvement at all (apart from reduced download size).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's been a while since I fired up C2 and my mistake was fairly basic. I should have had the object instances spawning the text object rather than trying to have the system create a new object at each instance's location.

    Thanks for the link, TELLES. It eventually led me back to a few searches and the correct info on picking instances.

  • Thanks for the suggestion. I tried a few variations:

    Pick All Player > Overlap > ...

    For Each Player > Overlap > ...

    Overlap > For Each Player > Every 2 Seconds > ...

    They didn't seem to change the outcome.

    <img src="http://i.imgur.com/9chpqri.png" border="0">

    This is taken from the last variation. The text only appears above the one overlap happening in the bottom right corner, and then moves onto another pairing once one of those is destroyed.

    Here's the capx. I'm not sure where my logic is wrong.

  • [SOLVED BELOW]

    I'm having some trouble understanding why only part of my action sequence is working on all instances but the rest of it is not.

    <img src="http://i.imgur.com/Xs0J8E2.png" border="0" />

    Enemies randomly spawn on one side of the screen and the player can spawn his soldiers on the other via mouse click. Players/Enemies move towards each other and stop when they overlap, inducing the attack sequence show in the image for each Player instance, which continues until one of them has their Health reduced to <= 0. The remaining soldier then continues on.

    I've run this in the debugger, and instances of Player and Enemy are having their instance variable Health subtracted from simultaneously. I paused the debugger and checked the Health of multiple Player/Enemy pairings that were overlapping at the same time and found they all had reduced Health.

    However, the pair of text boxes (textAttack) I'm trying trying to generate above each Player/Enemy instance after they lose Health is only being created on one Player/Enemy pairing at a time.

  • I was searching for an answer to the isometric problem myself for a while. I'm not sure if this is exactly what you guys were trying to explain above, but I thought I'd post my solution:

    capx file

    Try it

    I made a simple turret in blender and saved png renders at every 45 degrees to create my animation frames for a total of 8 frames. Note that it would probably look a lot smoother compared to my exmaple saved every 22.5 degrees for 16 frames.

    I then created a sprite with turret behaviour to act as a place holder to acquire and generate my angle towards the target. I created another sprite to hold my turret animation frames and created an image point at the end of the cannon in each frame. You'll want to place them into a container.

    I created 8 events checking the angle of the turret sprite corresponding to 22.5 degrees before and after my turret angle and actions to change the turret animation to the correct frame as seen below.

    I then simply spawn a bullet from the animation (image point 1 created earlier) rather than the turret whenever the turret is able to shoot.

    <img src="http://i.imgur.com/5e0pygr.jpg" border="0">