Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device Camera #327

Open
8 tasks done
planktonfun opened this issue Jun 25, 2022 · 4 comments
Open
8 tasks done

Device Camera #327

planktonfun opened this issue Jun 25, 2022 · 4 comments
Labels
✨ New example A new example

Comments

@planktonfun
Copy link
Contributor

planktonfun commented Jun 25, 2022

Describe the example

A rough example on how to render video from camera device on gdevelop.

Checklist

  • I've followed all of the best practices.
  • My game has a proper name in the game properties.
  • My game package name behind with com.example..
  • My game has all events unfolded.
  • I've added myself as the author in the game properties.
  • I've included a file called "README.md" with a description in proper English, explaining what this example is doing.
  • I confirm that this game and all of its resources can be integrated to this GitHub repository, distributed and MIT licensed.
  • I've cleaned unused resources.

Game folder

device-camera-example.zip

@planktonfun planktonfun added the ✨ New example A new example label Jun 25, 2022
@Bouh
Copy link
Contributor

Bouh commented Oct 13, 2022

Hello
I tryed the example on my pixel5 phone, and the quality is very low.

Do you think there is something to adjust?

Screenshot_20221013-231046

@planktonfun
Copy link
Contributor Author

Yup you can adjust these parameters in the events, you can increase the quality in exchange of performance

video.style.width = '200px';
video.style.height = '200px';
canvas.height = 200;
canvas.width = 200;
context.drawImage(video,0,0,200,200);

Still looking for a way to port it directly into a video object so it won't work hard as much per frame

@planktonfun
Copy link
Contributor Author

planktonfun commented Oct 14, 2022

Hello I tryed the example on my pixel5 phone, and the quality is very low.

Nevermind, found a way to port it, now it can display video at full quality and performance

!update device-camera-example.zip

Also, there are no actions to resize video objects in gdevelop?
image

@Bouh
Copy link
Contributor

Bouh commented Oct 15, 2022

Also, there are no actions to resize video objects in gdevelop?

This raised a more significant issue in previous discussions.
These width/height or scale actions are unique to each object and have to be implemented.
So in the future, they should be universal, which doesn't require adding these features for each objects types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ New example A new example
Projects
None yet
Development

No branches or pull requests

2 participants