jatin1726's Forum Posts

  • Hi Friends,

    Need urgent help..can anyone tell me how to get camera and microphone request access one click of button. As of now, construct uses two separate calls for camera and microphone.

    Thanks in advance.

    Tagged:

  • > But I noticed it gives a random RBG value.

    It is not random! It's RGB value from the pixel in the center. It may not be accurate because of the camera noise etc. So if you need better detection, you have to calculate an average color for an area of pixels.

    You can take snapshots constantly, but you still have to wait for snapshot to finish. Saving a snapshot is not a fast operation, especially on large camera image. So you may not be able to detect moving objects with this method.

    And if you need to detect a red object anywhere on the screen, this will be nearly impossible to make with events. I suggest you look for some JS library.

    Thanks DOP

  • Here is a demo, one pixel is read from the center of the image:

    https://www.dropbox.com/s/oduicvl97l4v0le/Cameratest.c3p?dl=0

    Thanks DOP for sharing this link. It is helpful. But I noticed it gives a random RBG value. How can i find out that if a specific color is in screen. For example, if suddenly red color appears in my screen, It should be able to tell me red color is detected...can i get rgb value based on my requirement instead of screenshot taking and random value?

    Sorry for these many question ..but I see a ray of hope in your answer so I am asking ..thanks a lot in advance.

  • Have you seen the official template for this?

    https://editor.construct.net/#open=camera-average-color

    Yes, I saw this template but it is script based but I don't know coding so looking for normal solution in Construct 3 I could get the same results through events and actions.

  • jatin1726 Check out this Color Picker template:

    https://howtoconstructdemos.com/hsv-color-picker-tool-c3p/

    If this is not what you need, please give more information. Are you trying to read pixel color from a sprite?

    Actually I am opening camera and trying to detect specific color, like red color when in comes in camera scene. and then a alert can say it is red color. but for that it has to extract values of the pixel and then throw the message that red color it is .

  • The animations for the player object

    The first number in the animations name is the direction (360 / 8)and the second is the action ("S" meant slide I think and "i" means idle). The animations name represents the direction (of the 8 possible facings) and the frame represents how far into an animation it is playing"

    So I set the direction by only changing the number in the name with Set animation({direction to face}& right(player,animationname,1))

    the same is true the other way around. so when want to play an action (idle. stiffing, ect) I reverse it

    set animation(left(player.animationname,1) & {action}

    I have shelved the project for now tho. I was having a hard time getting people to test with and I doubted the game would be a success. So I decided to work on another project

    seems very nice thing but ppl like me less expert in this will need tutorial to learn this. Could you please share a tutorial link for this ? thanks in advance

  • > Mikal, i m not into coding, can u help me how to achieve color extraction without coding?

    DrawingCanvas (https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas) allows you to extract specific color channel from a snapshot. You possibly can use the expressions of the plugin.

    thanks for sharing this. But for less experience ppl like me it is difficult to understand that theory. So we need to add a canvas elemement first and then take a snap shot? and then find snapshot cordinate? but how we will get all cordinate to get rgba? is it possible to help us with any sample capx..that will be very big help

  • There are javascript functions in the c3runtime to translate a color value to an R, G, B value.

    Ashley - is there a reason you would not want to share the code of the functions (so others could put the function code itself embedded as a new function in C3 events), I've tested using the function code myself locally using C3 event scripts and they seem to work well.

    Reminder:

    Mikal, i m not into coding, can u help me how to achieve color extraction without coding?

  • Ashley , could you please explain how the color is encoded in the ColorValue? I.e. is there a way to extract r/g/b/alpha channels from it? I couldn't find this info anywhere.

    thanks dop2000 for bringing this. Me too looking for the solution of same. Ashley please help us in this.

  • jatin1726 sorry for writing you here... could not post it in the original post: there's a post where you said you solved how to share text in Whatsapp... could you be so kind to help me on this?

    You can use this service. It will help u.

  • Why speech recognition not able to recognize simple words in google android chrome using c3?

    I exported c3 example of speech recognition and it was not able to identify simple words earth, water , fire and air (it never identified this keyword). On desktop it is working good but on android devices u will scream with frustation but c3 won't recognize. plus recognition stops within 2-3 seconds. How to make it recognize longer? and can we shut down that irritating beep sound? Ashley please look into this.

    in c2 things were little better.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > > > > > looking sharp. it's using the q3d physics yah?

    > > > >

    > > > > Actually, No.

    > > > > I found it a bit too unreliable so I'm using the good old C2 Solid behavior.

    > > > > The cars' physics are actually just 2 2D images.

    > > > > I'm trying a fake 2D jump & falling behavior as well which is the hardest part, I'd like the cars to jump & Fall. But i won't really need the behavior.

    > > >

    > > > heh me too :P my shooter uses the default C2 physics as well.

    > >

    > > Haha yeah, as long as you don't jump, it's pretty straight-forward, Unlike most of Q3D :')

    > >

    > > New Gif showing 2D Physics, 2 Cars, 8 Wheels:

    > > imgur.com/eUgB7oT

    >

    >

    > Amazing work , i am getting into q3d and also doing a car game , my question is how do you get the camera to turn as you turn the car ??? thanks! and again amazing work !

    Thanks!

    I've posted what i use for my camera setup before (previous page?) Edit: page 137 instead.

    But basically a few things:

    Every tick:

    Set camera up vector to (Z) -9999

    Set cam position to: Car.x + CamScale * cos(CamRotation)

    Car.x + CamScale * sin(CamRotation)

    Car.Z + (Height variable)

    Set cam look towards: Car.x, Car.y, Car.Z(+Cam pitch)

    Replace car.x for a camera object that you can set to the car position every tick

    > Camscale is a global variable which controls how far you can zoom in and out.

    > Camrotation is another variable that tells the cam where it is around the car.

    > Cam pitch variable controls looking up or down.

    I hope that answers the question :)

    SO many nice things..but all went above my head...is there any tutorial videos for handling camera in the game that I can learn from? please share..thanks in advance

  • jatin1726

    Just move the character? I'm not sure how to answer that as it depends on what you need moved, how it is moved, and what it interacts with. is it with default behaviors or something custom? are physics involved? Et cetera. It's not really a one size fits all thing.

    as for me I use physics movement. at the start of a players movement I set their velocity to zero. and then move them using the following physics velocity addition.

    x =(cos(angle_of_movment+player.angle)) * move_speed

    y =(sin(angle_of_movment+player.angle)) * move_speed

    sine and cosine works like an orbit. with angle_of_movment+player.angle specifying the angle relative to the center.

    angle_of_movment is the direction the player needs to travail represented as an angle between 0 and 360 (forward, backward, ect) however this number by itself will give the wrong direction as it is relative to the world. not the direction you face. hence...

    player.angle is the direction the player is facing. by adding this to the angle the player needs to go it makes the angle_of_movment relative to the player

    Is it possible to create a video for importing characrter(sprite or obj) and add the movement?

    That will be very helpful.

  • I would be happy to share. what part specifically are you interested in?

    How to move the character

  • Just an update on my project.

    I finished the player model for my project (finally!). it's not the best out there but for a first attempt at a 3d human model I think it came out good enough.

    for now I have rendered the first animation (idle) now I need to animate moving in 4 directions and dying.

    https://youtu.be/lBn9pP10gWY

    How u did this magic, plz share a tutorial for same.