Lou Bagel's Recent Forum Activity

  • If you want the sprite truly anywhere on the layout, you can set the position to:

    random(layoutWidth)

    random(layoutHeight)

    Unless your layout is entirely open, as in no solids or areas sprites shouldn't be (walls, for example), you probably don't want this.

    If you want to do more of a concept of spawning zones, I would make spawn zone sprites. Set the sprites to invisible, so that you can see them in the editor but not while playing.

    In the condition part of your action, use the System condition (select System, not the sprite), and use "Pick Random Instance". This will pick a random spawn zone sprite each time. (if new, you might want to read about "picking" in events)

    If you want them in random spots in the spawn zone, you can use the same concept as I started off with, using set position to:

    random(spawnZone.BBoxLeft, spawnZone.BBoxRight)

    random(spawnZone.BBoxTop, spawnZone.BBoxBottom)

    I do a similar thing, except for movement instead of spawning, in this game: loubagel.com/games/sunnyside-smash

    I wanted the characters to move around randomly, but there are areas sprites can't go - in the water, in solid objects such as houses, and areas I don't want them to be such as right in front of the house doors. So I made a sprite object using the same concept I explained above. I covered the map of areas I wanted them to go with instances of this sprite. The nice thing was that they didn't have to be the same size - if there was a big wide open area, I could stretch one instance of this sprite over it all.

    When a character is ready to move a random "move zone" sprite is picked. Then, a random coordinate inside that sprite is picked. Then I just use the pathfinding behavior to move them to that coordinate.

    I know the example is a bit off topic, but hope it helped.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Made a simple little game but got a high scores table up and running. Check it out here and get on the leaderboard: loubagel.com/games/sunnyside-smash

  • loubagel.com/blog/sunnyside-smash-dev-blog-1

    On the blog post above, I posted the project as-is after the game dev stream, which the full video is linked there as well.

    The blog post also includes screenshots of the event sheet and notes on each event. So it isn't exactly like a tutorial but if you want to implement a similar mechanic it could be helpful.

    On that note, feel free to ask any questions if you are looking to implement something similar.

    It was only about 1.5 hours spent on this so nothing too advanced.

  • Participating in this game jam:

    itch.io/jam/beer-not-jam

    It is a long one so still plenty of time to enter!

    Decided to upload my project thus far. Basically just have the office setup to walk around:

    loubagel.com/blog/dev-blog-office-exploration

  • In this session I worked I used the effect Replace Solid Color to setup customizable hair color, skin color, tie color and pants color. This means I did have to add the effect multiple times to both sprites. Next I plan on doing a stress test to see how intensive this will be with numerous characters and if this will work and a ballpark on how many characters can be on the screen at once with this effect.

    I also setup six different heads for this, just for a bit of variety.

    In the project you can toggle from the character creator screen and a layout where you can walk around. This is simply to give it that game-like feel of doing something with your character after creating him and test out the different animations, which are just walking cycles for this one.

    Read more about this on my blog post: Custom Character Creator Dev Blog

    Also, I have this project to the Construct Arcade, for anyone not trusting links to my website :)

    This is what the screen looks like:

  • > > > My bad - I thought the function call was nested in the loop, not after it.

    > > >

    > > > Either way, this will still try to call the loop an infinite number of times in the same tick producing the same result.

    > >

    > > Yes, its calling itself once every time it runs. Its not inside the loop.

    >

    > This will still call itself an infinite number of times most likely causing browser to crash

    Yes, sorry, maybe my last post was not clear.

    I wrote that the calling action was inside the loop, as I saw that I was wrong I deleted my post and wrote a new one agreeing with yours. It is an endless loop.

    No worries, just trying to help!

  • You do not have permission to view this post

  • > My bad - I thought the function call was nested in the loop, not after it.

    >

    > Either way, this will still try to call the loop an infinite number of times in the same tick producing the same result.

    Yes, its calling itself once every time it runs. Its not inside the loop.

    This will still call itself an infinite number of times most likely causing browser to crash

  • My bad - I thought the function call was nested in the loop, not after it.

    Either way, this will still try to call the loop an infinite number of times in the same tick producing the same result.

  • Great blog, thanks for sharing all the details, nice concept and it looks great in action.

    One suggestion when it comes to color tint, use a two color tint. One color that effects the lighter colors and one that effects the darker colors. It offers a lot of versatility. (If this effect does not already exist, I am going to look into creating one). Then, you can use a base grayscale image that will be tinted.

    Example of the concept (from Spine.)

    Thanks for the comment and tip!

    Great pro tip there. Do you want to explain it a bit more, just so I am clear on the benefit?

    I was planning on doing a replaceColor, but was indeed going to have to replace two colors for the shading. But the way you propose you basically are removing the color (saturation) so is grayscale and can use one tint on the whole sprite? Therefore the tint adds the color and the shading is already in place?

    I will keep an eye out for that when looking through the effects. Though I might not be able to do that as I have outlines on certain things that I don't want to tint the outline color (it is not a true black). But might experiment with that, tinted outlines could look better!

  • I have the loop structured like this. When I try to preview it or open it in debug it wont load.

    Do you realize what you are doing here? Everytime you call the function it calls itself 90 more times. Each of those 90 calls will call itself 90 more times, so 8,100 times so far, and will go on for infinity.

    This is why your browser will lag then crash.

    If you put a for loop by itself it will run every tick. Tick being dependent on framerate, but that could be between 40-60 times per second. So it will repeat on its own.

    If you want less than that then use every X seconds or put it in the function like you have it, just don't have it call itself for eternity.

  • Blog Post 2 is out: Dynamic Walk Cycles

    Wish I could easily upload a GIF or Video for you as an image doesn't do it justice.

    As I explain in the blog post, I uploaded one walk cycle and it serves as the body for 25 different characters. Needs some polish but way more efficient and will scale faster.

    Check out the project in the blog post as you can have them chase donuts or dance, just for fun. The real experiment was looking at the walk cycles, but that was kind of boring on it's own.

    Next I want to work on colors using Replace Color Effect. Hoping to make a mini Character Creator where you can choose hair color, skin color, tie color, and pants color.

Lou Bagel's avatar

Lou Bagel

Member since 7 Sep, 2015

Twitter
Lou Bagel has 3 followers

Connect with Lou Bagel

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies