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 / [SOLVED] What does ~~ mean in Tier 1 code?

Author
Message
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 15th Jan 2021 10:59
I'm looking through some encyption code kindly supplied by BatVink a while back and can see there's a "~~" in the code (SetMemblockByte(mbMain, n-40,GetMemblockByte(mb, n) ~~ val(mid(cCODE,codeCounter,1)))

What does ~~ mean?!?

The author of this post has marked a post as an answer.

Go to answer

Loktofeit
AGK Developer
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Sarasota, FL
Posted: 15th Jan 2021 11:27
I'm not sure why, but I remember something about that turning a FLOAT into an INT.
LynxJSA's web games/quizzes - LynxJSA's Android apps
AGK Resource Directory
"Stick to a single main loop (DO...LOOP) and loop through it every frame.
Do everything inside functions.
Use finite state machines to control your game.
Use lots and lots of source files.
Use virtual resolution instead of the default percentage system." - Digital Awakening
Ranietz
AGK Gold Backer
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location: Norway
Posted: 15th Jan 2021 18:38
This post has been marked by the post author as the answer.
~~ is the bitwise XOR operator. You can read about bitwise operators at the bottom of this page: https://www.appgamekit.com/documentation/principles/2_operators.htm
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 16th Jan 2021 10:54
Great thanks! I did search the manual.... but ~~ didn't return anything! Ha ha!
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Jan 2021 03:09
It's a tilde ~ not a dash -
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 22nd Jan 2021 12:27
n00bstar
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 23rd Jan 2021 19:30
Super useful for toggle switches.

Instead of:


use:

DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 3rd Feb 2021 11:26
Aaah! Cool! I'll use that!

AQUILLANTO - A side-scrolling platformer with super tight controls, 3 worlds to explore, hordes of monsters and a quest... Inspired by games on the Amiga computer

FOLLOW ON TWITTER
SEE THE YOUTUBE CHANNEL

Login to post a reply

Server time is: 2024-03-28 09:17:32
Your offset time is: 2024-03-28 09:17:32