j0schi's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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:

  • Hey Mikal,

    i am still working with your Plugin, newest version. Its working fine so far, however with 2 exports i got the problem that the grafics dont show up. The console shows the following error:

    All other animations working as intended and i have no idea what went wrong here :(

    Maybe you have an idea? Meanwhile i will recheck the spine project and reexport those...

  • To answer my own Question:

    1) Export the Tilemap

    2) Open the *.tmx file

    3) change the tilemap size to 1

    4) delete the tilemap data exept for the first entry.

    5) Happy tilemap editing

  • Well the bigger tilemap is 40000x40000px It actually runs pretty good ingame but in the editor its a bit laggy. ITs ok as long as i dont edit it. The smaller oney are the ones i want to edit. However that doesnt work because he somehow adapts the size of the other (bigger) instance.

    However it seems that there is another problem...

    the project has 1 MB when i save it and my pc has 32GB of memory.. never have run out of it lol

    And thanks for all the tips! i diabled the animated UI already, however the include sheets is a very good idea :) Still, i miss construct 2 a bit where i never had those issues :(

j0schi's avatar

j0schi

Member since 8 Oct, 2014

Twitter
j0schi has 23 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies