j0schi's Forum Posts

  • Thats what i am working on currently, a fast paced dungeon crawler with simple loot and levelsystem roughe light (keep xp, loose items) while the items are not yet implemented. Dungeons are generated randomly. This basically started as a test of the new 3D features. I know, there are many games out there like this but i might continue developing this as the flow is quite good :D

    Subscribe to Construct videos now

    all assets are placeholders. Its mostly free stuff from itch.io

    Feedback and ideas are appreciated! And in return i gladly answer some questions, how this works, if there are any...

  • klabundee figgured it out! Thanks for your help. Problem was, that at the start of the layout "walkerdirection" was 0 so none of the conditions where true at the beginning, so the while could not finish :D

    Thanks again!

    J0schi

  • Thanks, but where do i put the while loop then? I had it with else but it did not work, so i changed it to how it looks now... The thing is i cant use if, because the direction is set in an event before, and it could be that the walker is on the top left corner, so he has to change directions till he is not going to the left and not going to the right... I just dont get it how this can be an infinite loop, maybe i am doing something in the wrong order?

    Kind regards

  • Jea sorry, i thought i posted them but somehow the picture did not get uploaded :D

    gyazo.com/c3385ad83a455a4d0a5e28f1da398ebc

    Kind regards

  • My while loop never ends so i am clearly doing something wrong, but i do not understand what. It doesnt even end when i call the system expression stop loop. it only stops when i enable the disabled event you can see at the top. Does while not execute subfunctions? How do i do this correctly? :)

    The loop must be executet in this tick, as it is a levelgenerator.

    Kind regards

    J0schi

    Edit: i got a request time out while uploading the picture so here is a link :)

    gyazo.com/c3385ad83a455a4d0a5e28f1da398ebc

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for pointing this out! I must have overread this...

  • Hey Folks,

    Hollidays are here and there is time for a few more experiments. One thing i find very confusing:

    here you can see my problem:

    gyazo.com/ad2f1b0ab46d7681094b451cf7b378c0

    The shots vanishes behind a bush and then is suddenly visible again.

    When i move the "Shots layer" below the "bush layer" this does not happen.

    so far so good. Then there is the gras behind the bush.

    When the bush is infront everything is fine, but when i move behind it somehow the bush gets partitially transparrent. I also had to move the ceiling layer under the bush layer so the ceiling gets not transparrent.

    All this is pretty confusing and there is obviously something i dont understand about the 3d cam. Any ideas what this could be? Do i have to Z order the objects somehow so the one closest to player always is below the other objects?

    Infact when i move the grass on top of layer it is the other way arround, the bush hides the gras even on the transparent parts O_o

    kind regards and happy chrismas :)

    Joschi

    Edit: I wanted to playe quite a bit of foilage, but it really looks stupid :D

    gyazo.com/8b7f37562ae7323127d43739693a3567 i must be doing something wrong. for clarification, i am using the right side of a square object and rotate the object to the player.

  • Hey dop2000,

    Method1 was what i was looking for, smart way to get the right result, thank you so much :)

  • Hey Dop2000, thank you, i think that helps, maybe, i rly have to test it but my brains seems not to be functioning correctly right now haha

    Actually i just wand to add the speed from the direction the ship is currently facing...Currently the problem is, when the ship flys straight and shoots straight its faster than the bullets. But if i add the ship velocity to the bullets they also fly faster when the ship "drifts" backwards instead of flying slower. So i think the second bullet behavior is not neccesarry, because bullet should not drift with the ship but fly straight. I think that would feel best and meets the player expectations even if it is physically not correct...

    Kind regards

  • Hey folks.

    i have a math problem :D

    Abstract:

    A playership (physics) flys at a velocity. It can shot. Shots have the bullet behavior. The shots speed is e.g. 500 when the playership has 0 velocity. Lets say the playership flys at 45degrees with a velocity of 250 and shots. then i want the shot to fly with a velocity of 750 in this direction.

    Lets say the playership turns 180 Degrees, but still drifts with a 250 velocity in the same direction as before. Then i want the shot to fly at the new direction the playership is facing with a velocity of 250.

    How do i do that?

    Here is what i got so far but there must be something wrong with my thinking as shots are going crazy fast as soon as the ship moves:

    Set Bullet speed to

    Self.shotspeed+((playership2.angle)*playership2.physics.velocityX + sin(playership2.angle)*playership2.physics.velocityY)

    I also made a very professional grafic to clarify what i want to archive:

    1st panel: ship flys at 45 degrees with 250px/s. Shots should have a velocity of 500pixel/s + shipspeed.

    2nd panel: Ship flys in the same direction with same speed but faces the other direction. Shots should fly at a speed of 500px/s - shipspeed in at the ships angle

    3rd panel: Ship has no velocity, shots should fly in the direction the ship is facing at 500px/s (normal shot speed)

    4th panel: ship is drifting with 100px/s at 200degrees, ship is "looking" at an angle of 225 degrees. Shot speed should be 500 + the ships velocity at this angle.

    Any help is highly apprechiated :) thank you in advance!

    Kind regards

    Joschi

  • You do not have permission to view this post

  • I still was not able to figure this out :(

    There should be a way to calculate the relative position of the ship based on the 3D camera angle? If not i just have to drop the 3d part for now :(

  • Maybe this makes it a little more clearer what i mean. the cam is positioned at

    layoutwidth / 2, Layoutheight/2-1000 and looks at LayoutWidth/2, LayoutHeight/2 with a Z of 100.

    1) shows the mouse position

    2) shows the playersprite position

    3) shows the perspective

    Kind regards

    Joschi

  • I wanned to try out the new 3DCam to give a bit of perspective for my top down shooter, which really looks cool. so i did this:

    https://i.gyazo.com/925a5511de23374458ccd86d6147346f.png

    Now i want the mouse position to be absolute, so where the mouse is the playersprite should be.

    So normally when i scale a layer i just use Mouse.X("layerName") or Absolute to position an object correctly to the mouse.

    However this does not work for obvious reasons with that cammera positon. How do calculate the correct position of the playersprite in a 3DCam perspective? So the playersprite is actually where the player sees the mouse and not on a relative position for to the mouse cursor.

    Hope this is understandable :D

    Does this has something to do with CanvasToLayerX(layer, x, y, layerZ)

    Kind regards

    Joschi

    Tagged:

  • Hey Folks,

    currently i am looking in interesting new ways of doing puzzle games.

    So lets say i have an background layer, with animated sprites and some particle effects on it. Is there a way of rotating parts of it by overlaying it with a sprite? Basically what i want to do, i want to rotate the part of the background that is under the "rotator" sprite.

    Here is a pretty simple example, 1 is the backgorund 2 is the sprite with an disortion effect. gyazo.com/bf6b30dcf8dbc21d218802f1937f8785

    But instead of disortion i want a "clean" rotation so mirrored/flipped. And sprite 2 should not be visible at all, just a placeholder i know i could cut up the background in lots of animated sprites but that seems rather cumbersome, especially when i want to animate it in construct.

    Is there a way to do it? Maybe an effect or something in the asset store i dont know about?

    Kind regards

    Joschi

    Tagged: