MOLE HOLES!
My latest lens is a Whack a Mole style game. Our Black Mirror future is almost here!
https://www.snapchat.com/unlock/?type=SNAPCODE&uuid=71c912d4db2940149e8595d091d0b400&metadata=01
The score display is kind of janky (using text logger). They really need to add 2D and 3D text to the API. But until then I’ll have to write a better solution.
Hey Ralph,
Perhaps you could try John's solution in the meantime as we add that feature request to the list!
Cheers,
Kaitlyn
Yep! I just saw that. I'll probably give it a try over the weekend.
I was going to attempt to modify the logger script to work in world coordinates, but it seems like a lot of work. Still, I bet allowing logger to be attached to an object and use the local axis to orient world space text with maybe a few options (outline, color fade, etc.) in the material would solve most use cases.
use 2 sprites , left # & right # set array of images 0-9
// -----JS CODE-----
//@input Component.SpriteVisual sprite
//@input Component.SpriteVisual sprite2
//@input Asset.Texture[] textures
//@input int startp
//@input int startp2
var textureIndex = script.startp;
var event = script.createEvent("TouchStartEvent");
event.bind(function(eventData)
{
var textureIndex2 = script.startp2;
var newTex = script.textures[textureIndex];
var newTex2 = script.textures[textureIndex2];
script.sprite.mainPass.baseTex = newTex;
script.sprite2.mainPass.baseTex = newTex2;
script.startp = script.startp + 1;
textureIndex = (textureIndex + 1);
if (script.startp > 9) {
script.startp2 = script.startp2 + 1
print("add 1 left")
script.startp = 0
textureIndex = 0
}
});
https://v.redd.it/gf9667wmmra01/DASH_600_K
Nice work Ralph. As I come from a gaming background this gamification element of Lens Studio really interests me. I had a similar idea and a lot more besides. We need a way of sharing scores and keeping tabs on ranking etc built in to SnapChat lenses - similar to Game Centre or Xbox Gamerscore points set up. Snapchat would be a perfect platform for this. Maybe one for the wishlist of not done so already?
Yeah, they need sort of a Snapchat graph API. The Facebook Camera Effects Platform lets you access part of the Facebook API. You can get some bits of user data etc. Plus you can access any URL you want to link to your own web backends to effects etc. to store persistent data and retrieve data and assets.
I'd love this feature for Snapchat--also maybe a tiny amount of cloud storage per user that we could access. Kind of like the equivalent of Unity's prefs memory--like 8 or 16k per lens or something so we could store simple persistent data with a Lens...such as scores and game progress.