Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Is there a picture-taking function(s)?

Author
Message
LUCHEEK
3
Years of Service
User Offline
Joined: 10th Jan 2021
Location:
Posted: 10th Jan 2021 18:28
I'm learning game programming through AppGameKit Classic! It's been a good time so far.

I'm interested in making a "picture-taking" game, kind of like Pokemon SNAP, but in 2D side-scroll style. (To be very honest with you, the major inspiration is this old Blue's Clues computer game I had when I was little... hahaha, anyways...)

My general idea is that the camera will scroll across the various sprites automatically, and the player can move their cursor around to capture a smaller section of the visible screen into a photo- having certain objects at a certain place inside the captured area awards points and save the picture to a gallery. Other features might be for the player to click a certain button to activate effects (like placing "bait" or "toys".)

Is there a way in AppGameKit Classic to save what is basically a portion of a screen-shot- including multiple sprites that would be layered on top of each other?? I tried searching the commands, and I didn't see something that seemed like it did this at least in a one-command type of way. Would there be a way to do this that's more complicated?

Thoughts, help, ideas are all appreciated...!
Tone Dialer
Valued Member
19
Years of Service
User Offline
Joined: 17th Oct 2005
Location: England, well a town in it !
Posted: 10th Jan 2021 20:39
@Lucheek

Welcome to the forum.

Your idea sounds good, if I understand what you want correctly then take a look at the image commands, GetImage() and CopyImage() and their associated commands.

https://www.appgamekit.com/documentation/Reference/Image.htm

Regards.
LUCHEEK
3
Years of Service
User Offline
Joined: 10th Jan 2021
Location:
Posted: 10th Jan 2021 23:50
Wow! Thank you for your help, Tone Dialer.

I've created this code now, to take a picture of a fish.




Now my issue is, the image created includes the "frame" and "centerframe" sprites, but I'd ideally like the new image to not contain those- so, I'd like it to "GetImage" but only at a certain Sprite Depth (everything beyond 1.)

I think there might be a way in the "render" portion to only render at a certain depth, and then get an image from there, but I'm not sure how...
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Jan 2021 00:25
try hiding the frame sprites, rendering and getting the image, then returning the frame to visible?
otherwise, getting an image "by sprite depth" would be somewhat of a beast.
[My Itch.io Home] [Now Playing]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=AGK] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[Google Forum Search]
LUCHEEK
3
Years of Service
User Offline
Joined: 10th Jan 2021
Location:
Posted: 11th Jan 2021 00:33
Oh! I didn't even consider that- it works fine!

Thank y'all for your help.

Login to post a reply

Server time is: 2024-11-24 05:56:53
Your offset time is: 2024-11-24 05:56:53