Intrepid's Recent Forum Activity

  • Are you using loops to position your turrets on the destroyer?

    If you are, you could just use an 'always' event and sub events, like this;

    Always

    (Sub Event) TurretID = 1   Set turret pos to ship1 imagepoint 1

    (Sub Event) TurretID = 2   Set turret pos to ship1 imagepoint 2

    And so on. You don't have to do it this way, you got it working.

    It just seemed as though you were going to use loops to

    position your turrets, when you could easily do that with an

    'always' event. That's how I would have done it, but you got it

    working, so good for you :)

  • I liked the old color scheme, before the website changed.

    The greens and greys worked well together, but the new greens

    just seem very harsh. Or I can't remember right and these are the same greens.

    The blue one is easier on the eyes, much softer than the green.

    But I would like to see the old color scheme make a comeback :)

  • Glad to see some of you guys can make use of this :)

    Looking back, it probably would have been a better idea to generate

    it chunk by chunk, like maybe 64 tiles x-wise, instead of in powers of 2.

    This would mean more flexibility, and possibly infinite terrain, x-wise.

    I could probably pound that out if I had some spare time.

    Although if you were going that route, I think perlin noise

    would be better suited for you.

    But a big problem is the array object. It only stores values in a

    long int form(Right?), so 16 bytes per cell/index. So unless you have 4 million different tiles you need unique values for, it's too much memory taken for an application such as large level storage. I'd really like

    a byte array, or the ability to choose the array format(?), that would

    make storing large levels like say, Terraria's worlds, much more feasible.

    Also, if you're creative, you can combine some examples here, and make

    it generate caves too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Exactly what it says in the title.

    <img src="http://i.imgur.com/Ady5h.png">

    Get it here!

    It'll generate random terrain to any power of 2, x-wise.(Pretty sure) You'll have to modify it to do that though. It's thoroughly commented, everything is described, so you

    shouldn't have a hard time if you want to do that.

    Have fun, learn, use it, break it, whatever. I'll try my best to address anything that might come up.

    Feedback always appreciated!

  • It's because of all the solid objects you're platform object is having to check for collisions with. With thousands of objects, that's thousands of collision checks every frame, which can be incredibly taxing.

    What you need to do is optimize your terrain generation. It would be best to only generate solid blocks in spots where it will be possible for the player to collide, and have the rest be non-solid blocks.

    After having slept on it, I came to that conclusion. I didn't think that it would be

    calculating collisions for every single object, so I had never tried using less solids.

    Very easy to fix, too.

    ^^

    Yeah a good optimization might be the Canvas object. You can paste those objects into the canvas, destroy them, and then update the canvas collision mask. Keep in mind that this will exchange some vram for performance, so use it only where needed.

    I will have to try that.

    You both have been a great help to me. Thank you!

  • Okay, so I'm having some trouble with the platform behavior and a lot of objects on screen.

    In the cap, there's 2 layouts. One uses a basic follow camera, the other a sprite with

    the platform behavior. The Cam layout with the follow camera will handle 7, 8000 objects

    like a champ, with no framerate drops at all. The Plat layout, however, is unplayable.

    It only seems to lag when there's more than 2000 objects on the screen. The problem is

    that the game is going to exceed that almost always. I know that the random terrain generator is not optimized in it's current state, in that it will fill the whole layout, but it seems that

    regardless of how many objects there are over 2000, it will still lag just as badly.

    I'm wondering how to fix this, right now I'm thinking writing my own special stripped down

    platform behavior, but I'm hoping to avoid that. Or perhaps it's just my computer, I dunno.

    Help is always appreciated!

    The plat layout has standard platformer default controls. The cam layout uses the mousewheel

    to control the speed of the follower. You can destroy blocks by holding down LMB and mousing

    over them.

    You can download the cap right here.

    Thanks!

    EDIT: Clarity.

  • Thanks alot, R0J0hound, really saved the day for me!

    This is a really useful piece of code!

    Might I also suggest that you change the '30' in your events to a private variable (I just called it Rotate Speed while playing around with the cap) and then you can quickly fine tune the speed at which your sprite rotates - with 1 being immediate rotation and larger values delaying it.

    Oh and wouldn't something need to be scaled by delta time here?

    The 30 in the cap was going to be replaced by a private variable later on,

    as the example I posted was going to be grafted into my project when

    I had gotten what I wanted done with the rotation, and optimized it some.

    It's now 4 actions in an "always" event.

    Code if you want it;

    Always;
    
    Object1 -> Set Position to Object2
    Object1 -> Set Angle toward (mouseX,mouseY)
    Object1 -> Set variable "RSpeed" to anglediff(Object1.Angle,Object2.Angle)
    Object2 -> Rotate Object1.Value('RSpeed')/10 degrees toward (mousex,mousey)
    [/code:3ra8gguk]
    
    Thanks for looking at it guys, I really appreciate it!
  • http://dl.dropbox.com/u/9762772/Rotation%20Example.cap

    Can't remember what ver. of Construct I have.

    First post

    Anyways, I'm trying to make a rotation that will smoothly rotate

    towards an angle. By "smoothly", I mean that it will rotate towards

    an angle, then decelerate the more it comes closer to matching that

    specified angle.

    So I got something working. I use two objects, one always points

    towards the specified angle(The mouse position), and Object 2

    will rotate to match Object 1.

    I get the speed at which Object 2 will rotate by taking the 2 separate angles

    and getting the difference between the two, scale that difference

    towards a reasonable "speed" that I want it to rotate at, and then

    incorporate that "speed" into an event.

    The problem with this is that the Object 2 will suddenly accelerate

    once Object 1 hits 360� and snaps back to 0�, then return to a normal

    speed after it also crosses that snap.

    So, is there a way to fix this, or is there an easier way to

    get the kind of rotation I want?

    Been wrapping my brain around this for a while, but I can't come up with anything.

    Cap is a little messy, but I hope it isn't unreadable.

    Thanks for reading!

    EDIT: Typos.

Intrepid's avatar

Intrepid

Member since 4 Aug, 2010

None one is following Intrepid yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies