That is pretty impressive. But when you mentioned that you used separate lines for the if statement instead of a space, I was like: "Well that saves you nothing. If anything, it adds a character if you are using a Windows line endings." I genuinely don't think a new line character shouldn't count, it is just a different whitespace character after all.
I made tic tac toe in 11 lines back in college while competing with a friend to see who could do it in the fewest lines. The rules were that each open and closing brace needed to start and end on its own line. Of course no libraries outside of the sys lib and in C.
Not only did you reduce the source code's character length, but you also added in a bit of obfuscation... and yet it is still fairly readable. It' only lacking a few bits code structure.
I would say that the newlines technically are one character, 2 if on windows lol But honestly amazing code it was fun reading the screenshot and figuring out how the game worked, great stuff!
Great video! Please look into the world of PICO-8 tweetcarts, which aim to make a game or small animation using the PICO-8 engine in as few characters that it fits in a tweet
Try coding it for a retro machine like the VIC-20, which had much of the extra functionality in hardware (specifically in the sprite registers). Some models even had collision detection.
On the thumbnail, there's really around 100 characters, but there's missing draw_text method, and how the app is retrieving the values of the keyboard keys and some other values too. So there's definitely more than 100 characters. Just saying :D
Well... When doing it in JavaScript for a browser (which would be impressive) then you could say the game uses features provided by the browser. So where is the limit? Machine code? Then there is still the operating system and the video driver providing functionality. Even when doing it without an operating system you most likely use BIOS interrupts (or whatever is the new shit when using UEFI) which are basically function calls to output stuff on the graphics card.
I've never used gamemaker, so I'm not too certain if this would work, but couldn't you set the draw_text function itself as a variable and thus use less characters? from how variables seem to work in that, I assume it would essentially be: d=draw_text() d(9,y,0) d(x,s,0)if this cuts down on 4 characters, which while not a lot, is still smaller.
you do need to remove the brackets after the draw_text in the 1st line of your example, since then, you are only storing the return value of the func instead of the func itself
7:10 Challenge accepted! Here's a C++ version of the game using Raylib under 300 characters. I decided, of course, to raise the maximum number of characters a bit, cause it's C++, but I'm still proud of myself. I couldn't do it in less than 100 characters, since C++ requires some boilerplate like including libraries and other stuff, and raylib functions, although automating a lot of stuff, and decreasing the amount of boilerplate code, still have some pretty long names I also made some decisions which are a REALLY bad idea, which make the game extremely memory-unsafe This is the shortest version I could make without cheating by using #define to replace the long function names #include int x,y,z=9; int main(){ InitWindow(128,96,""); SetWindowState(64); while(1){ if(x-9&&y-z
Without a way to loose/win this can hardly be called a game. So some collision detection between player and the obstacle is a must have. Otherwise it is just an interactive animation, not a game.
You didn't implement checking collisions in the first few versions at all? Hmn :( Also, Gamemaker? In the Thumbnail you almost had me sold that its gonna be Javascript, which would've been mindblowing. But using these premade game loops, event handlers and draw functions while calling the whole thing "100 characters" is a bit clickbaity imho. Video quality itself was excellent though! Go hard man, the algorithm seems to love u right now.
@@vlc-cosplayer There are some game engines that let you create games with completely no code, like GDevelop. By your logic, using those engines shouldn't be too different from using a high level language like Javascript since both include "premade" items to make your life easier, yes? If that's the case, then I've made a game with exactly 0 lines of code. (( This is lighthearted, of course! :P I love the video, the person is super talented, I just wish they'd have added "in GameMaker" in the title. Also, your comment was really funny! ))
You should probably include the name of the Engine in the title. Otherwise it's a bit clickbaity. This is the eternal problem with Code Golf. If any programming language/engine is allowed, then every computable problem can be solved in 0 bytes.
never seen game dev code golf this was really cool! Only question: since you only check that the Y is the same and the X is far enough left, does that mean the character has a 1px hit box? Could you actually touch the obstacle without getting hit ?
Depends how you count the characters - I wasn't counting blank characters. However your way is totally valid and maybe I'll challenge myself to do it that way in the future
I'm not sure what programming language tis is but couldnt you reference the function under a different name to make it ever shower? example: draw_text() draw_text() becomes d = draw_text d() d() wouldnt that work?
Unfortunately by the time GameMaker compiled it to a zip it would be too big for a QR code. I do have an exciting idea for work with QR codes in the future though!
Wow that is really impressive. But also technically there are 6 newline characters and 1 EOF character at the very end just like with any file, so it's technically 107 characters.
@@Pepso8P EOF was an actual character (#26 ==ctrl-Z) in CP/M and MS-DOS 1.x . File size was rounded up to a multiple of 128 bytes. Some Windows libraries still check for that when loading text files.
@@johndododoe1411 Interesting info, thanks. I've read that in some cases an actual EOF character may be present, but it generally isn't used anymore like the original comment suggested by saying that EOF is at the end of any file.
I think it would make more sense to have the player be drawn with a 7 or a 3 instead of a zero; slightly more bird-like
and also the obstacles with 1 perhaps
I would have them drawn with their score. That way their hit box would grow as they progress.
@@recklessroges the collision system has no hitboxes. Also no score is being tracked.
𓅓
@Building Letters would require quotes, increasing the number of characters required to write the game
Man seriously? You deserve more subscribers. The video quality is awesome and the concept itself is super cool.
He really does!
It makes me happy to finally see the youtube algorithm do its job and recommend good content such as this. 💕
That is pretty impressive. But when you mentioned that you used separate lines for the if statement instead of a space, I was like:
"Well that saves you nothing. If anything, it adds a character if you are using a Windows line endings." I genuinely don't think a new line character shouldn't count, it is just a different whitespace character after all.
Potentially, my method for character counting was pretty basic though so I wasn't checking for that.
presumably he has to put a line break there anyway. but i dont know the syntax of this language
This is awesome, but I agree that you should include "in GameMaker" in the title.
Keep up the great work, this is awesome!!
damn, I hopped in here an felt like watching a 10k+ subscribers channel. You are criminally underrated, I really enjoyed your video!
rofl imagine man benutzt gamemaker
@@jvliaaaaan ne jetzt reicht's, ich rufe 911 an
You could reduce it further by creating a variable which references draw_text, then using that since you're using it twice.
I made tic tac toe in 11 lines back in college while competing with a friend to see who could do it in the fewest lines. The rules were that each open and closing brace needed to start and end on its own line. Of course no libraries outside of the sys lib and in C.
Ohhhhhh! How much I still have to learn! Please keep making more videos like this!
Thanks man!! You've earned my respect
Sorry to be that guy, but there are either 106(LF) or 112(CRLF) characters (you can't ignore newline).
Still a cool game and video though!
"Uhmm, actually, according to my calculations... 🤓"
literally unplayable
Great vid!! Saw this on my home page!
"Mom can we get flappy bird?"
Mom: We have flappy bird at home
Flappy bird at home:
Really cool idea and a quality video! You deserve more subscribers.
Red Dead Redemption 2: 150GB
Call Of Duty: Modern Warfare: 231 GB
Call Of Duty: Black Ops Cold War: 250 GB
flpy brd: 100 B
you forgot the runtime
@@crides0 500b?
@@le9038 probably way more
@@el2746 1024b to be more accurately then...
100 b*
100 B would be bytes.
BROTHER, YOU ARE THE BEST!!! You oooh really helped me!! THANK YOU VERY MUCH!
I can't believe you only have 36 subscribers, great video!
Mans gonna blow up, was here before 200 subscribers
ITS ON MY HOME PAGE GET READY FOR THIS VID TO EXPLODE I WAS HERE FIRST BEFORE IT GOT 1 MILLION VIEWS!
Not only did you reduce the source code's character length, but you also added in a bit of obfuscation... and yet it is still fairly readable. It' only lacking a few bits code structure.
I would say that the newlines technically are one character, 2 if on windows lol
But honestly amazing code it was fun reading the screenshot and figuring out how the game worked, great stuff!
Code golfing in Game Maker. That's new :))
Nice stuff, dude!
Great video! Please look into the world of PICO-8 tweetcarts, which aim to make a game or small animation using the PICO-8 engine in as few characters that it fits in a tweet
I love PICO-8! I will definitely check that out, thanks ☺
As other said, you deserve more subscribers.
And I'm proud to say that I am the 100th.
Super well explained.
Nice idea and video mate :)
This is dope! I wish I found this video sooner. I learned some neat stuff
This is incredible. Subscribed!
underrated channel
Try coding it for a retro machine like the VIC-20, which had much of the extra functionality in hardware (specifically in the sprite registers). Some models even had collision detection.
Cool idea 👍
it worked! thank you so much!!
I looked down to see how many subs this guy has and was baffled.
Good video, concept reminds me of the C donut that draws a donut
I'm here at 800 views, before the algorithm picked it up. Awesome video!
This is yes. Good content.
Jordan Guillou: This Game is Only 100 CHARACTERS LONG?
Code for rendering images / text to screen: Am I a joke?
Code in the operating system, video driver and computer firmware: "Yeah, tell me about it."
Quality and informative video 👍
You're a madlad
ok 7lines if code man thats truely efficient
I got into code golfing by writing macros for WoW
can't you alias functions? like b = draw_text, then doing stuff like b(9, y, 0)?
You can in js, python and kotlin
Awesome!
You should call it "tweety bird 🐦"
On the thumbnail, there's really around 100 characters, but there's missing draw_text method, and how the app is retrieving the values of the keyboard keys and some other values too.
So there's definitely more than 100 characters. Just saying :D
I'm working in GameMaker which handles that functionality for you - I might try this challenge again with a lower level language
Well, you could as well you create a library and just import the library and make it "10 characters long"
I agree. The video is awesome, but they should've really included "in GameMaker" in the title.
Well... When doing it in JavaScript for a browser (which would be impressive) then you could say the game uses features provided by the browser. So where is the limit? Machine code? Then there is still the operating system and the video driver providing functionality. Even when doing it without an operating system you most likely use BIOS interrupts (or whatever is the new shit when using UEFI) which are basically function calls to output stuff on the graphics card.
@@kayaahr restricted x86 machine code is basically the lowest you can get without manually having to inject values sonewhere afaik
I've never used gamemaker, so I'm not too certain if this would work, but couldn't you set the draw_text function itself as a variable and thus use less characters?
from how variables seem to work in that, I assume it would essentially be:
d=draw_text()
d(9,y,0)
d(x,s,0)if
this cuts down on 4 characters, which while not a lot, is still smaller.
no not exactly
You can do something like this, I just forgot at the time. It is a good idea though ☺
you do need to remove the brackets after the draw_text in the 1st line of your example, since then, you are only storing the return value of the func instead of the func itself
"Removing semicolons is terrible coding form"
Me, a python stan: *pardon*
In all seriousness I never though I'd see GML golf and I love it.
I yeeted off my semis off my Typescript code.
It's much more fluent to code, swap lines around, etc.
@@avasam06 javascript in general seems to be trending in that direction
Creative video, thanks :)
7:10 Challenge accepted! Here's a C++ version of the game using Raylib under 300 characters. I decided, of course, to raise the maximum number of characters a bit, cause it's C++, but I'm still proud of myself. I couldn't do it in less than 100 characters, since C++ requires some boilerplate like including libraries and other stuff, and raylib functions, although automating a lot of stuff, and decreasing the amount of boilerplate code, still have some pretty long names
I also made some decisions which are a REALLY bad idea, which make the game extremely memory-unsafe
This is the shortest version I could make without cheating by using #define to replace the long function names
#include
int x,y,z=9;
int main(){
InitWindow(128,96,"");
SetWindowState(64);
while(1){
if(x-9&&y-z
Explanation of the code:
first weird line is this one: "if(y-z>-9&&y-z
Awesome! Glad to see someone inspired to try the challenge themselves. Thanks for the explanation 👍
Without a way to loose/win this can hardly be called a game. So some collision detection between player and the obstacle is a must have. Otherwise it is just an interactive animation, not a game.
I have a lose state which makes it technically a game I think
You didn't implement checking collisions in the first few versions at all? Hmn :( Also, Gamemaker? In the Thumbnail you almost had me sold that its gonna be Javascript, which would've been mindblowing.
But using these premade game loops, event handlers and draw functions while calling the whole thing "100 characters" is a bit clickbaity imho.
Video quality itself was excellent though! Go hard man, the algorithm seems to love u right now.
@@vlc-cosplayer There are some game engines that let you create games with completely no code, like GDevelop. By your logic, using those engines shouldn't be too different from using a high level language like Javascript since both include "premade" items to make your life easier, yes? If that's the case, then I've made a game with exactly 0 lines of code.
(( This is lighthearted, of course! :P I love the video, the person is super talented, I just wish they'd have added "in GameMaker" in the title. Also, your comment was really funny! ))
You should probably include the name of the Engine in the title. Otherwise it's a bit clickbaity. This is the eternal problem with Code Golf. If any programming language/engine is allowed, then every computable problem can be solved in 0 bytes.
lol
Great video
Nice code golfing.
never used gml, but think this is 93:
draw_text(++x%=9,x?score:score=y,0)
draw_text(8,y+=keyboard_key?-1,1,0)if
x>7&y=score
gameend()
When is the no engine version of this coming /s
Game maker includes a lot of code.
Amazing
That's so cool
never seen game dev code golf this was really cool! Only question: since you only check that the Y is the same and the X is far enough left, does that mean the character has a 1px hit box? Could you actually touch the obstacle without getting hit ?
Yeah the hitbox is effectively 1px so collision is in pretty big air quotes but it technically works
Brilliant
Awesome
YOOO GD WAVE REFERENCE
It really worked for me after I look and try some tutorials, yours is the one that worked. Owe you a lot.
Code it in apl or golfscript to squeze in more functionality in the same character space
Interesting - I'll look into that 👍
me in ue5 with blueprints: 😎
Well you could say that 100 UTF8 characters are 800 bytes and you could write a game in bytecode, but this is impressive anyways
Unless he's using ASCII
100 UTF-8 characters are 100 bytes. A single UTF-8 character is 8 *bits,* not 8 bytes.
@@anonimenkolbas1305 There's UTF characters that are 64 bits. But most of us don't use those.
@@anonimenkolbas1305 Not true UTF-8 has more than 256 characters. What you are talking about is ASCII
@@awarriorsdub6211, utf-8 is not constant symbol size encoding. All ASCII characters in UTF-8 are the same as in ASCII itself.
Meanwhile, I made a 500-line script to download files. In Python.
Can Game Maker still allow treating undeclared variables as 0, possibly cutting down the character count for every token “score”?
You are aware that a linebreak is a character? Just like a space or ;
Depends how you count the characters - I wasn't counting blank characters. However your way is totally valid and maybe I'll challenge myself to do it that way in the future
Sped Up, many viewers are going to see you after this recommendation Explode, or maybe twice
Чисто спортивный интерес, поработать головой. Интересно.
Thanks for the great ideas in your other comments, I hadn't thought of doing that :)
BEAGLE BROS LIVE!!!!
Aren't newlines also characters?
Not enough videos on code golf and obfuscation out there
I'm not sure what programming language tis is but couldnt you reference the function under a different name to make it ever shower?
example:
draw_text()
draw_text()
becomes
d = draw_text
d()
d()
wouldnt that work?
I'm using GML but you're right I should have done that.
Ummm
is two characters…
Now put it in QR-code.
why do u still not even have 350 subscirbers
Yea i 100% didn't waste 5 minutes of my time counting the chars of the thumbnail
But...Does it fit inside a QR code?
The whole point of the famous QR code video was, that it was a compiled binary and ready to go.
I'm tempted to investigate loading QR codes into GameMaker - I wonder how close you can get to running code loaded from the image
I know of a UA-camr that did make a game run from a QR code. Now to do so from within GM, now that I'm not sure 😅
Hello, here before this blows up
For python programmers, not writing semicolon is just so normal. I even stop writing semicolon in JavaScript
No semicolons in JavaScript? Have fun with destructuring assignments then :)
a = 1
[ b, c ] = [ 2, 3 ]
Newlines are still characters.
this is me: 🤯
cool
this can be in a qr code
Unfortunately by the time GameMaker compiled it to a zip it would be too big for a QR code. I do have an exciting idea for work with QR codes in the future though!
@@jordanguillou preferably one that runs in browsers cuz then its universal
Not showing a collision? I don't know walt, looking sus to me
Wow that is really impressive. But also technically there are 6 newline characters and 1 EOF character at the very end just like with any file, so it's technically 107 characters.
EOF is not an actual character. It is just a value that is returned to you when end of file is reached, but isn't present in the file itself.
@@Pepso8P EOF was an actual character (#26 ==ctrl-Z) in CP/M and MS-DOS 1.x . File size was rounded up to a multiple of 128 bytes. Some Windows libraries still check for that when loading text files.
@@johndododoe1411 Interesting info, thanks. I've read that in some cases an actual EOF character may be present, but it generally isn't used anymore like the original comment suggested by saying that EOF is at the end of any file.
sooo yeah, not only 100 characters.
Now do it in C 💀
I wish its get work
I don't know what language is this, but couldn't you bind "draw_text" to a function callback, i.e. "d=draw_text"?
You're right, someone else pointed out that I should have done that. Maybe I can improve with a V2?
I can name my executable in 5 characters and use all of its built in functionalities instead of using game maker
I'll do you one better -- I can double click it in zero characters
I mean it is not 100 characters... We are using a whole framework, objects etc. If we don't take this into consideration then the title is correct.
now i want everyone to write code without semicolons and spaces lol
Glad to inspire reckless coding habits
clash of code players be like
Just use Brainf**
I don't know what language is that, so I don't know if the code below is correct, but you could try this:
y-=keyboard_key?1:-1if
x--
Boost
#macro keyboard_key k