'Mode7' NPC and Main Player Positions?How do I !? any help from Rojohound or RexRainbow

0 favourites
  • 14 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Subscribe to Construct videos now

    Its already done!! I just figured it out.

    I just can't get the Camera Main Player and the NPC,CPU player on the same sand box so they could have coalitions on the LayOut but not on the main screen display,

    any help from Rojohound or RexRainbow .

    Thank you mate...

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The original mode7 topic I thought had info on it.

    Anyways the gist of positioning stuff is:

    // get position relative to camera

    xx = (x-cam.x)* cos(-cam.angle) - (y-cam.y)* sin(-cam.angle)

    yy = 200

    zz = (x-cam.x)* sin(-cam.angle) + (y-cam.y)* cos(-cam.angle)

    screenx = xx/zz + xcenterScreen

    screeny = yy/zz + ycenterScreen

    if zz<1

    then hide object

    else show object

    However, the scale is probably off. Shaders deal with 0-1 scale in spots.

    It subtracts the cameras position from the points position, rotates it in the opposite direction of the cameras angle and then projects it to The screen.

    The shader merely does the opposite. The exact scales can be found by reversing the math found in the shader itself.

    Or you can find the scale by trial and error. Basically before getting the screen coordinates multiply some numbers against xx, yy and zz. Realistically yy should Just be the Ground height. Zz adjusts the intensity of the perspective and xx is the general scale.

    You could even open up the behavior that rex made to get the math he used which is based on reversing the math in the shader.

    I abandoned The shader long ago and don’t want to open it. It’s fiddly and needs to be rewritten. Fiddly in that the scale of things is pretty specific as I recall.

  • Thank you Rojohound !!! I'm trying to understand your math here but still a little difficult to me , I will appreciated a simple humble Capx ! here's my email smithdeveloper9vlb@gmail.com just if you can send me a Capx or at least I could send to you my Capx so you can fix this problem I've been having lately with all this about positioning my main player, I promise you I'll pay you even if you don't want to !!!

    Thank you mate...

  • Dug up a plugin rex made that looks like it may help.

    c2rexplugins.weebly.com/rex_mode7perspective.html

  • I already did worked with all those plugins you just mentioned, but the only thing I'm missing from my Mode7 project its only the Positions of the NPC Players in the same 'SandBox' That's all I need and I tell you that I'm still here working on that problem hours and hours at day and night, but still nothing on my favor,

    I just need a little help from some of you guys for real !!! I'm kind of stuck on this one, Just a simple capx example it's all need.

    Thank you Rojohound !!! and if you have any new idea please let me know!.

  • Like I've said in the mode7.fx topic I've abandoned it. It does some math to get the look, but it's not clean to make positioning other objects work well.

    But I wanted to play with shaders more, although I don't want to make addons. Anyways here's a mode7 implementation that may be useful. I tried to make it as streamlined as possible.

    construct.net/en/forum/construct-2/your-construct-creations-23/mode7-via-webgl-javascript-155359

  • Thanks Rojohound !!!! I'll be checking on this tomorow cause today I worked from 7 AM to 5PM on my Mode 7 project trying to put objects on the SnandBox but still nothing in my Favor ,, I hope this Capx be a blessing to my Project , I'll let you know tomorrow.

    Thanks Mate !!!

  • The capx you created I couldn't combine it with my project, because you used a totally different code than the one I'm currently using, In my code Capx I'm just using exactly the same metod as to positioning the Objects but not with Java but with other variables and Plugin's from early 'construct 2' plugin's, but at the moment I can tell you that the PlugIns from Rey's I believe are not at one hundred percent legitimate enough to create a Mode7 to perfection So I'm trying to reinvent the wheel a little bit so I can get as close to Mode7 as possible with those plugin's too, I appreciate your great work doing codes and helping others, I'm going to try to upload a simple demo capx on this week with Rey's plugins's so you can see for yourself the thing I'm just missing with the Mode7.

    Thank you Rojohound !!!

    by the way how can you control the camera with a gamepad with your capx,,,

  • Hi,

    In that capx you can set the camera x,y and angle in event 6. So you can set them to anything you want. You could even just set it to the position and angle of a sprite that you move around with your movement behavior of choice.

    I don't have the mode7 effect installed, nor do I have many third party plugins installed.

    I'll be honest, I'm not going to be able to help with the mode7.fx. I don't like it, and have scrapped it.

  • Hi,

    In that capx you can set the camera x,y and angle in event 6. So you can set them to anything you want. You could even just set it to the position and angle of a sprite that you move around with your movement behavior of choice.

    I don't have the mode7 effect installed, nor do I have many third party plugins installed.

    I'll be honest, I'm not going to be able to help with the mode7.fx. I don't like it, and have scrapped it.

    Hey Rojo still could not make that capx of yours get into my project cause like I told you before you are using Java scripts and I'm using C2 Plugin's with Rey's plugin's,

    but anyways I'm almost there to find my last missing key with the Mode7 with what I have already, I'm still working with the coalitions , until I complete this difficult puzzle.

    Thank you Rojo for all the Great things you have made !! You are Great !!!

    I'll be posting a video of my Project soon,,,

  • Hey Rojo !!! let me know how to send to you some support for your efforts !!! I want to send you some money even if you don't need it, I just want to be polite and grateful with those who deserve it.

    you got my email just in case, maybe I'll used your Capx for some other projects of mine... Thank you Mate !!!

  • Thanks but there is no way to send me money. This is just a hobby for fun. A near zero cost hobby at that.

    Anyways, I appreciate the thought.

  • No problem mate ,,, and let's keep on working with codes and games for life !!!

  • Rojohound can you create a an Example Capx of this example you just gave me !!!

    Thank you!!!

    just an example of one line at lesat with no sprite or anything at all>>

    The original mode7 topic I thought had info on it.

    Anyways the gist of positioning stuff is:

    // get position relative to camera

    xx = (x-cam.x)* cos(-cam.angle) - (y-cam.y)* sin(-cam.angle)

    yy = 200

    zz = (x-cam.x)* sin(-cam.angle) + (y-cam.y)* cos(-cam.angle)

    screenx = xx/zz + xcenterScreen

    screeny = yy/zz + ycenterScreen

    if zz<1

    then hide object

    else show object

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)