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 / AGK snippets

Author
Message
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 18th Apr 2013 04:16
That's a nice cool snippet.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th Apr 2013 10:42
Very nice, keep them coming guys


this.mess = abs(sin(times#))
Caps On!
12
Years of Service
User Offline
Joined: 3rd May 2011
Location:
Posted: 28th Apr 2013 06:10
Hey, where did everybody go? We need more snippets!

Truth, Justice, and the Programmer's Way!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Apr 2013 10:26
Sorry, I've been busy. More snippets from me soon don't worry...


this.mess = abs(sin(times#))
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th May 2013 21:52
TMX map loader functions and drawing routines for orthogonal, isometric, and staggered map layouts. All wrapped up in one neat little library.

http://forum.thegamecreators.com/?m=forum_view&t=205387&b=41

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 7th May 2013 22:57
This is a bit more than a "snippet". So... let's just call it a collection of snippets...

This is a basic chat interface that relies on an external server for checking login credentials and transferring messages. Messages are wiped from the server when they've been received by all clients in the chat.

There's a bit to do to make it ready for full use:
There should be a queue for messages to be sent
Messages received need to be stored locally
Multiple messages are not currently shown
Automatic message checking (currently set up to be received only after pressing the receive button)
Scrolling of the received messages would be nice
And the repeat loop should likely be removed from my GetIsResponseReady function and made to be recursive so it can just be put in a loop.
Some of the connection checks could be cleaned up.

But all of the basics are there for someone to set up their own chat client.
If anyone makes improvements to this please share them!

Attachments

Login to view attachments
Timshark
16
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 10th May 2013 03:03 Edited at: 11th May 2013 20:36
Her is a colorpicker snippet based on Naphiers idea of returning string values from a function. I'm too busy to write the rem help right now. It could be a simple way to explain to beginners how to use memblocks.



EDIT: A little warning though. It will not work when the virtualresolution is set larger than the initial resolution. Then it will try to pick on those black borders and return an error. I guess You could put in a checker that checks if the mouse is inside the initial resolution:

if getrawmousex() --compare to-- getdevicewidth()
if getrawmousey() --compare to-- getdeviceheight()
But I will keep it as it is to make it short and to the point

I never want what I know.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th May 2013 12:17
That's really neat. Nice work


this.mess = abs(sin(times#))
Caps On!
12
Years of Service
User Offline
Joined: 3rd May 2011
Location:
Posted: 11th May 2013 17:51
That's a cool snippet Tim, I have recently started playing with memblocks. Finding there is a lot you can do with them.

Truth, Justice, and the Programmer's Way!
Timshark
16
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 12th May 2013 06:51 Edited at: 13th May 2013 06:17
Yup
Memblocks are just like a cabin in the woods.
Nice and cosy and a little scary.

I never want what I know.
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th May 2013 14:00 Edited at: 18th May 2013 14:00
Draws a fire effect. Just a little code snippet I ported from my 8 year old snippet. Don't expect killer frame rates though :p







"You're all wrong. You're all idiots." ~Fluffy Rabbit
Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 24th May 2013 20:06
This may be of use to someone:



It just checks the buttons of an external joystick and specifically checks for the XBox controller buttons. Except that AppGameKit does not or cannot detect the D-Pad, nor can it detect dual trigger activation.

Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Jun 2013 08:07
Function to convert a hex string into a decimal value.
Though immediately after writing it I discovered VAL has a base parameter , I thought I'd share this snippet anyway.



BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Sep 2014 16:05
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Nov 2015 12:35
unlocked
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-03-29 11:40:22
Your offset time is: 2024-03-29 11:40:22