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.

Newcomers AppGameKit Corner / [STICKY] The Useful Community Functions Project

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 28th Feb 2016 00:53 Edited at: 28th Feb 2016 01:08
Not a function but i think it could be useful (and i couldn't find anywhere else to put it)
Button borders. you can put any 32x32 image behind it and it will look like a button. Designed to work with a 0xD4D4D4 coloured background
Note: The "down" image is just the "up" image flipped vertically and horizontally

up: down:

example:


!!!!DOWNLOAD THE ATTACHMENTS BECAUSE THE EMBEDDED IMAGES DON'T WORK!!!!

Sign up for NaGaCreMo!

Attachments

Login to view attachments
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 28th Feb 2016 12:25
Hello everybody. No useful codes here, but justa suggestion

Can we make a new AppGameKit board, that serve as a 'code snippets' board?

When this thread grows large, I think it will be difficult to keep up with the functions.
If we have a dedicated board, then each function will get a thread. It's easier to search for related community functions that way by suing thread titles.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Feb 2016 01:01 Edited at: 3rd Mar 2016 04:54
Simple encryption function. It will take an image file and using a key supplied by you will generate an encrypted file. Prolly really poor and easy to crack but at least it's something.
Then use LoadCryptImage() to load the encrypted image
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Mar 2016 04:52 Edited at: 3rd Mar 2016 05:11
Crop an image using memblocks. No checks are made to see if the crop area is outside the original image so be careful

NOTE: THIS CROPS AN IMAGE NOT A SPRITE SO PASS IT AN IMAGE AND EXPECT AN IMAGE BACK

Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 6th May 2016 02:26 Edited at: 6th May 2016 02:28
Simulated limbs
This set of functions can simulate limbs in AGK. Every limb will be registered and can be
found and then manipulated with the standard object commands. This is simply a list of
all objects fixed to the root by "FixObjectToObject" saved in an array.

This code can also be used to save additional information for missing feedback, not covered by the 3d get... commands.


[/url]
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd May 2018 06:12
Fubarpk's functions - https://forum.thegamecreators.com/thread/222027
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 2nd May 2018 07:06
Just short of 2 years since the last post Nice to see the thread still being useful!
nonom
7
Years of Service
User Offline
Joined: 12th Nov 2017
Location: Picking mushrooms
Posted: 7th May 2018 14:00
It's awesome to newbies like me
http://www.nyan.cat/pirate
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 20th Jun 2018 10:03
Here's a function to generate a circle image with a radial gradient applied. Attached an example image.

Attachments

Login to view attachments
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 20th Jun 2018 11:22 Edited at: 20th Jun 2018 11:32
Creating a sprite with radiant circle (but much much quicker using shaders)




And, instead of using CreateImageColour()...just load any image you want using LoadImage() and you get the same radial falloff effect on a sprite with a full image.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 10th Aug 2018 19:47 Edited at: 10th Aug 2018 19:52
Two functions that use AGKs built in commands to make a circle or triangle image useful for sprites
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Oct 2018 04:54
Function to make one object's center point the same as another object's center point.
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 24th Oct 2018 14:39
GLSL Clamp equivalent.

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 4th Nov 2018 13:41 Edited at: 5th Nov 2018 00:58
Compresses a imaged grabbed with the getimage command to improve performance and memory.
this image is a 16x16 tile that when grabbed is actually 96x96 so i used this to compress it to save some memory and it crunches the 96x96 to 48x48 with the same pixel quality.
This is on a computer with a 1920x1200 resolution and works well on a old samsung galaxy y also with better framerates etc.

i use an virtual resolution of 240x160.




edited…………………

if you do this in your getimage function so does it work extremely well and even better on all devices i have tested on.

Login to post a reply

Server time is: 2024-11-21 09:54:25
Your offset time is: 2024-11-21 09:54:25