• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Asset - Extension CamSurface - Camera as a surface!

zbox

Member
GMC Elder


CamSurface - Camera as a surface!
Marketplace: http://bit.ly/2rkX96W
Category:
Extensions
Price: $39.99 $19.99
Modules: Android

Description:
Purchase this asset on Itch.io to support the developer

Use the front or back camera as a native Gamemaker surface in your games and applications!

DOWNLOAD A DEMO APK
  • Landscape and portrait camera mode
  • Turn the flashlight on and off during preview
  • High speed access to the colour data from the camera (could be used for tracking and detection etc.)
Since the camera is returned as a native Gamemaker surface, you can use the surface as you would a regular sprite, background as well. Draw it with shader effects, use it as a texture for a model, and any other applications you can think of!

Easy to set up and implement (working demo is included). Call the following function to start the camera preview:
Code:
  camsurface_start(CAMSURFACE_PORTRAIT,CAMSURFACE_CAM_BACK,640,480);
//camsurface_start(portrait|landscape,front|back,width,height);
To draw the camera to the screen, there are two options. Either retrieve the surface index and operate with that, or use the inbuilt drawing function:
Code:
camsurface_draw(x,y[width,height])

// --- OR --- //

var surface = camsurface_get_surface();

if (surface_exists(s)) {
   draw_surface(surface, x, y);
}
On newer phones the camera can run at up to 30fps @ 720p. Slightly smaller resolutions on older phones runs exponentially faster. There will also be further performance updates in the future enabling smooth playback at 1080p on most phones, pending a bug fix from YYG.

Need an Android extension or SDK Implementation?
 
Last edited:
I

icuurd12b42

Guest
Nice. now I know who to refer to for android extensions... I had 3 requests last year!
 
D

Deleted User

Guest
Ohh, this is something i need. Does this extension work in current gamemaker version? Is this suitable for object tracking only if the objects are color coded?

Would it be possible to make "ms azure custom vision" extension?
 
Top