KeeghanM's Recent Forum Activity

  • Store each levels spawn rates for each enemy in a 2D array? With X being level and Y being monster type and spawn value

    So if you think of Y0 = Zombie, Y1 = Vampire, Y2 = goblin, Y3 = troll.

    The actual array just keeps numbers, but they need to be INVERSE percentages.

    So if you have:

      0 % spawn rate, store 100 80 %, store 20 10%, store 90

    This is because we will do a GREATER THAN check.

    Then you generate a random number between 0-100.

    You know what level you're at so you just loop for Array.Height, checking Random > Array.Value

    If true, spawn a mob that corresponds to that level of the array.

    If you always want to spawn something, you'll need a default spawn at the end of your array that has 0.

    This was top of my head, and completely un tested but in theory could work... right?

    You can then also dynamically change the spawn rate as you go, just update the array.

  • R0J0hound .. Thank you! Always good to get such intelligent input!

    Will definitely have to play around with some of those ideas next time I need a break from my main project

  • Awesome! Congrats!

    Cheers!

    Brilliant! Would love to see a polished and performant version of this

    You think your technique allows for textures and npcs?

    Sadly this technique doesn't allow for detailed textures. However because each wall block is actually a bunch of repeated sprites, you could deisgn the texture to be horizontally seamless, but you would get limited detailed in that plane. Lines going horizontally along the wall is definitely doable though.

    I'm sure you could get NPC's, but they would have to be rendered with a different pass, essentially use the same technique but a second time.

  • I know theres already a few of these around, but one costs money and the other has dead links.

    So i figured it'd be a nice simple introduction for me to the JavaScript SDK. (read: first plugin, be nice )

    Basically, this is an expression only plugin that will take a single input ( the "Seed") and generate a Psuedo Random Number based on that seed.

    You can then use that PRN just like you'd use the built in Random expression. But this time it'll always be the same, no matter how many times you generate it!

    See it in action here

    I've tested it a bit, but I'd love to have the community have a play before I move it to completed. Also, any features you'd like added, comment below!

    ---

    ALL DOWNLOADS INCLUDE EXAMPLE CAPX SHOWING USAGE.

    ---

    V.1.0.0 - 14/09/17 - DOWNLOAD

      Initial release Two Expressions: - Int: returns a whole number between 0 and 2147483647 based on the seed - Float: returns a float between 0 and 1 based on the seed.

    NOTE: Not 100% Random in its spread, tends towards 1 & 0. Hence the Pseudo Random name. If you want a 100% Random, proper Entropy, correct spread... ask and I might implement it. It wont be as fast though.

  • Because Ashley, that would be super smart and a simple way to fix my problem.

    And I'm not super smart, and always go for the complex methods!

    But that is a good idea, I'll look into maybe using that in the future. Particularly if I run into performance issues with this.

  • Use something other than the lerp function. The lerp has an "Ease In - Ease Out" effect. I just used it as it was simple to implement.

  • As a reeeaaally quick example, heres a CAPX.

    I'm loading a bunch of positions to an array, including angle, then lerping to them and once there I increment a global variable and update the position.

    You could also add in invisible marker sprites with ID's instead of having them in an array.

    You could dynamically define the points in the array.

    You could just use regular animation.

    Any of the above would work <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Anyway, heres the capx https://drive.google.com/open?id=0B5cW0 ... HNiY1drLUk

  • Personally, I wouldn't use image points.

    Well, to be honest I'd just use an animation...

    But if you're set on one frame then you could have an event that runs in order and moves the object to a specific x and y and also sets its angle.

    If you don't mind jumping around like in your GIF you could have a wait inbetween. Or you could setup a bunch of Every Tick events, using lerping to smoothly move. And then trigger the next one when you reach somewhere.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • luckyrawatlucky you'd need to have some kind of picking method. Without seeing a capx, or knowing more about what you're trying to achieve it's a little hard to give specific help.

  • Want to extend a huge thank you to dop2000 who has helped me work out a solution for the combat system.

    It all came down to one Condition.

    And the solution, just use some maths!

    Well, now I can move on... put it in the past... Ice my head from all the banging on tables... and start implementing magic!

  • Something I have been stuck on, figured now that I have a solution it would be helpful to share

    Category: "Picking an Instance" or "General"

    Question: How do i check for overlap, regardless of collision enabled/disabled.

    Link to the answer: Specific post with commented CAPX

  • dop2000 I'll have to experiment with using the pick all by evaluate, and compare it to how I've now got it. See which performance is better.

    I've got a demo CAPX (LINK) working with the following code, will now port to my actual game and test performance.

    Thanks for all your help.

KeeghanM's avatar

KeeghanM

Member since 8 Jan, 2015

Twitter
KeeghanM has 1 followers

Connect with KeeghanM

Trophy Case

  • 9-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

11/44
How to earn trophies