We made Vampire Survivors BUT in 10 Lines of Code
HTML-код
- Опубликовано: 27 сен 2024
- We challenged ourselves to make a Vampire Survivors like in only 10 lines of code in Godot Engine - and it was a real struggle!
You can play 10 LOC Survivors on itch.io: playwithfurcif...
We recently made a good Survivors-like, Kill-BOI 9000, which you can play for free too: playwithfurcif...
Find the source code on GitHub: github.com/Pla...
~ Credits ~
Skeleton sprite: luizmelo.itch....
Wizard sprite: hajileee.itch....
Tileset: cainos.itch.io...
Music by Daniele Zandara (Vampire Survivors OST)
-
Wishlist our action roguelite Furcifer's Fungeon: store.steampow...
Join our discord server: / discord
Follow us on twitter to stay updated on Furcifer news and tutorials:
/ tweetfurcifer
I know game dev is just a bunch of duck tape and hacks, but this takes that to a whole new level!! Nice work.
Lots of duck tape here :>
Nivea und Panzertape in der matrix, genius duo! @@PlayWithFurcifer
*adjusts monocle* The tape is known as "duct" tape as it was originally used in taping ducts together. Duck tape is a brand of tape that was made much later because they realized more people said "duck tape" than "duct tape". Fun!
I like not having to choose when saying it out loud since it sounds the same in most accents. I do not like when someone thinks they're correcting me by clarifying. In those situations it helps to have both a branded and non branded roll in your back pocket at all times. Just in case.
@@kevnerx I like the idea of having a roll of both and when someone asks, you ask back with a little coy trailing off in your voice, "Oh, sorry... did you want duc.... tape or duc... tape?"
>write whole game
>put it into a library
>call it in 1 line
basicly
Your comment squished to one line: "import minecraft"
I disliked
#include
int main()
{
game.start();
return 0;
}
EZ.
@@LordVandor1 why do u have italian death note intro
Artists have videos of "Drawing a picture in 10 minutes/1 hour/10 hours", it'd be cool to see something like this in coding a game with 10/50/500 lines of code for example.
Hear hear!
There something like that where people make games in 30 minutes and stuff
I know that there would be rules for this, but with most languages you could technically put all of the code on a single line
@@austino545 i mean they literally immediately pointed out that multiple semicolons in one line is cheating :P
YES
This is brilliant. Not only do you demonstrate the workflow and thought process for coding and editing, you do so with a smile. In other words, your video made me feel like I can do it too. Thank you guys!
Thank you so much :)
I bet you can do it!
More of this please! Stuff like this seems perfect for understanding every nook and cranny of the engine.
Thank you! :)
Son: Dad can we buy Vampire survivors?
Dad: Give me 7 mins Son
And that's how you learn that less lines of code doesn't mean good coding. Very impressive video!
The AnimationPlayer is my favorite code editor.
:D
This is so cool! You should try moving all of the code into a single script to get some extra lines (no need for so many “extends ___”)
What a devilish idea, i love it
Yeah, if it's a single script you also don't need that include statement at the top every time either.
Wow you are amazing. I didn't think the baseline goal was possible (I expected a janky mess that worked on technicalities, because 10 lines is so few) and you actually made the game more detailed over time. Just love it.
Thank you!
It still is a janky mess :D
Its incredibly bad programming and would result in a very ugly line, but you could use the same script for the player and enemy, and just use a ternary operator based on the parent nodes name to determine whether it does the player movement or enemy movement. Thats two lines in one!
That sounds like a great idea to me
Go doesn’t have ternary afaik
@@welovedotnet this is in GDScript, which Im fairly sure does
@@bigbodge nice!
@@welovedotnet Godot has ternary, it's written as "var value = 7 if should_be_seven else 9" as an example.
Ha, this reminds me of the completely-codeless flappy bird I made a few months ago. Specially the tricks with AnimationPlayer for the leveling system.
Perhaps I should make a video about it...
I would love to see how you did it!
Do eet
"10 lines of code" (+ 10 million lines of dependencies)
you say this as if its a bad thing :D
try coding without an editor, OS, compiler,...
@@PlayWithFurcifer People do it's called bare metal programming, how do you think your operating system kernel exists in the first place...?
@@joshbond8391 I have not said it's impossible, i have said he should try and make a game without these tools. Read before you smartass my dude :)
holy shit i thought this would be clickbait I was not expecting you guys to actually pull this off. hella impressive
This was a super fun video! I was rooting for you all the way!!
Thank you very much :D
Wow! When I first heard of this challenge, I thought that there was no way to do it in Godot because of the (minimal) boilerplate that would cost at least two lines! Bravo! :)
:)
If you use godot and using godot doesn't count as using lines, modifying it wouldn't count as using lines too. So you could work out makros into the engine - this way you could define a makro for "extends Node2D; _physics_process(delta):" and can save a line with MAKRO [stuff that is made] in the enemy/player node. (afaik godot doesn't have makros because they are stupid)
What a scary idea
@@PlayWithFurcifer it is scary, dirty and stupid, but would save a line of code.
@@delqyrus2619 Thats the spirit!
Or extend everything you need by default.
Yeah, I legit thought they were gonna write a helper file and just just call ten functions.
But then they did this crazy shit instead lmao. I'm impressed.
That's genuinely amazing. A suggestion is that "extend node_type" calls shouldn't count towards your LOC.
Thank you! We will think about that :)
@@PlayWithFurcifer for my own selfish reasons pleaseeeee make another one of these challenges.
@@BassSpleen I can see that point but I think focusing on 10 user written lines would truly showcase some powerful ideas in Godot.
@@BassSpleen by that logic go ahead and count the kernel too :P
`extends` is not `#include`, it's simply saying which class to extend from, not inserting any code.
just like calling a file `.png` isn't "relying on hundreds of lines of code" in your image viewer.
Not bad but let's not forget the "atleast ten thousand engine code lines"
Close one, we almost forgot that we opened an engine! Good thing youtube commenters are there to the rescue
This is way more educational than one might expect
It is interesting but not good practices, so not that much
@@lbaxel9122 experimenting with novel approaches are how new ways to do something are learned. A 10 line survival game no matter how minimalistic it is, is a big deal and worth of attention.
At my school one of the projects we had to do was to make a game of tic-tac-toe in python, however this was boring as I already knew how to code. A kid named Joshua and I got into a competition to complete the project in the fewest line of code. In the end we had user input and the code printed error statements and continued running properly with false inputs. the code also refreshed infinity meaning you could win one game then instantly roll into the next game. We managed to get it down to 2 lines in total. The first line defined the board and the second line was a very long in line while statement that contained all the code for actually running the game.
Its one thing to write the scripts as 10 lines of script code, but what about the rest of the code generated inside the editors and drag/drop UI's?
And how many lines of code does Godot have?
player spawns enemies..
Hero: Why do I keep making my own life harder?
I love doing challenges like this. The voice overs also trump any asmr, and the two personalities and witty jokes are super fun to listen along with.
RUclips just recommended this to me now, sorry for being late :(
But, holy! It's actually insane how you guys managed to do this in so little code. This is a super inspirational video
Just got it in the recommendations as well. Holy shit, I'm flabbergasted!
same!
Its in an engine which means it is actually already using far more than 10 lines of code
ONE. IDEA. PER. LINE. That is how you measure a line. If you are "compressing" 10 lines into one, you are putting more than one idea on that line, break it up. Vampire survivors in 100 lines is just as good of clickbait, AND your code won't look unreadable, bonus!
We just count lines differently :D
Happy new year!
What a fun challenge! That animation player use is so hacky, I love it haha
Glad you enjoyed it :D
First time watching this channel! You may have just won me over to Godot!
Of course make many more videos like this! It greatly shows how you can do things in more than one way and clean up code!
Amazing :)
Love this concept
Loved that you showed the usual way of doing before reducing the number of lines, I'm more of a Unity dev so I don't get everything but really cool!Don't think I could have done it it 10 lines because of the using statements, Unity will require more than this
Realistically Vampire Survivors would take around 10k lines with all the items, enemies, menu, maps, interactions, dialogs
I actually thought of trying to make a game like it as an exercise so this is pretty helpful!
Amazing :)
just stumbled into this video...
this is art. congratulations.
PlayWithFurcifer: I can run this game in 10 lines of code.
The Engine in the background doing al the work: Wait wut?
Wow, really impressive guy and gal, well done!
Thank you!
This is why there are suddenly 5000 of these games after VS gained a smidge of popularity.
That was an outstanding video - very entertaining and informative!
Thank you very much!
Really liked this video! I appreciated the explanations for the code shortening as well. Lets get more!
it's a nice challenge, but the engine does a lot of heavy lifting for you. So at the end there's a lot more than 10 lines of code :D
The exercice is really nice though. I really liked that you clearly showed the thought process of "this is what I think I need, now how can I do it more efficiently". This is something that is often not shown in computer science classes anymore, and we ends up with junior developers who try to argue that a single page website showing one product requires at least 10-15mb of javascript :D
Unless you are coding in assembly, anything you make could be argued as being given heavy assistance by the platform/language.
man I hate the modern internet, literally every website takes so much ram cuz they all use these big ass wasteful frameworks and are not optimized.
This animation speed - game speed feels like Skyrim physics based on FPS. It ends with flying horsecarts
Thats freaking mental wow, your expertise shines so much wow. I'm still super new to your ch and its amazing!!
Thank you :D
definitely thought there would be 500k+ subscribers for this channel, but when i saw replies on every comment, i knew something was up. extremely well made video, good job
Thank you very much. I guess there still lies a bit ahead of us :D
Thanks to this fantastic video, I was introduced to my new love, Vampire Survivors.
you could disable the physics in the animation:
me, using function to disable the component : OMG that's genius!
wow
you used the animation player to animate the animation player
And i hope it does not feel weird about that
This was extremely cool and impressive. While I program, I've never done game development, so I was really surprised at how much you can do with so little.
you could use "move_and_slide(Input.get_vector("left", "right", "up", "down")) " for the player movement wouldn't save a line but its better code
it would be cool to se how much of a difference another 10 lines would make. Even if just to really show how many lines go into making a game of any kind.
this is absolutely crazy....pretty much an entire SIMPLE game with just TEN lines of code WOWWW
Ternary operator would technically fit your rules.
Thank you
@@PlayWithFurcifer Yeah, I read some of those. I think they kind of missed the point of the whole video. This is both entertaining to watch for someone who knows programming and I often fool around with code golf too, but it's great video for showing how much the game engine itself can do when it comes to game development.
I've only used Unity, but since the recent scandals I've been thinking about changing to Godot.
I thought it was a great video👍
I mean, you could have done it without lines. Simply contribute to Godot a lot untill you get high a high ammount of Trust and then push a "Vampire Survivors" Node to the Game Engine.
Plop that in and voila!
but Joking aside, this is great work! :)
Congratulations on not making each line indefinitely long
You just earned a sub sir
I have seen one of your video before
It was good too and will be helpful for me ❤
Awesome video, thank you!
it still counts as lines of code when your program adds 500 lines to achieve "uh ill just copy and paste the skeletons". yeah thats the program adding in more code behind the scenes
It does not count. I decide what counts, and this video is about code WE WRITE. Now touch some grass x)
@@PlayWithFurciferNo wonder your channel died with this shitty attitude xd Perhaps learn to not clickbait?
a nerd telling people to touch grass. you gender bending zoomers are so wacky@@PlayWithFurcifer
Moonwalking skeletons are definitely a feature!
Accidental feature :D
wow this is incredible for 10 lines of code. takes a lot of coding and optimization knowledge to be able to break something down to 10 lines and still be functional like this.
I hereby award you this award.
10 lines of code is better than my 6 1/2 months of testing and learning T_T
Very impressive. Though I found it somewhat entertaining how fast you don't even have to move anymore. I let it sit for a while to see what would happen. Eventually I started a trek downwards to the point where the game was running at 5 FPS. At this point the orbs were no longer working correctly and this allowed me to walk into an enemy resetting the game. 10/10
the genre is called bullet heaven btw
it isn't talked about enough
Really cool challenge. Great way to push your knowledge of the engine!
Glad you enjoyed it!
youtube threw this to my algo. banger. this was so cool.
to stop the moon walking, add an additional line (or use semicolons) to add a flipped function on the animation, so anytime a enemy is moving a different direction, the animation is flipped.
That was really entertaining AND also surprisingly educating :D
Awesome work and nice video :) Please more of it!
This is one of the most stressful videos I've ever watched
Oh no! That's terrible, are you okay?
This is interesting, because I could totally see someone easily making the game in Godot in about 100 lines with all the bells and whistles.
you do more with 10 lines of code, than me with 10.000
oh no
The only thing this video lacks is showing all ten lines of code on the screen at once at the end. Very silly and fun idea
That would have been cool, its noted for the next one!
If you want you can see them in the github
This is seriously impressive stuff. Will be very easy to debug this game.
Godot abstraction magic strikes again!
Ty for the tutorial Killjoy
thanks, you inspired me to download godot and start learning.
That was a great challenge :D
Thank you very much!
Nothing to do with the callenge, but since we are on the topic of vampire clones. How would you create infinite repeating terrain? Im not talking about procedural generation, but if you leave the screen to the top you "portal" to the bottom including all the enemies and such. I cant figure it out
I would not teleport all sprites, i would rather make a looping background and teleport that once it is looped
2:33 you forgot to normalize the vector, so your diagonal movement will be faster than your axis-aligned movement
so this is why like 100 clones came out after it got pop
10 lines of code, and millions in the engine running it
I actually have no idea about coding, but I found this video impressive, it must be really difficult to make a game and the fact that they did this with 10 lines seems applaudable to me
its a great mental exercise (even if its bad coding practice) because it shows a deep knowledge of the game engine / object hierarchy and render / sprite stuff. very fun!
Nice as a golf challenge like fitting a game into a QR code, or in the boot sector of a floppy but not really maintainable or clear.
"we use Godot" - including an engine immediately puts you a bit over the 10 lines limit
My dude, without any engines, libaries etc you cant even draw a sprite to the screen in 10 lines, no way you did expect we do this.
Never used Godot, but from this it seems like a nifty engine
Its pretty cool
this reminds me of my aseembly assignments back in uni where it took hundreds and hundreds of lines to make a block move and collide with other blocks
lmfao. The Scholar's Make.
That is impressive as hell.
For leveling: make each dying skeleton increment an XP/level value and multiply their movement speed with it. Maybe do something to the player's weapon based on it too. 😈
I only understood about half of this, but very cool concept of a video!
Great video! Enjoyed it!
Thank you very much!
This video is awesome, would love to see more videos like it.
Thank you, we will keep this in mind :D
lol. You are amazing teachers, great tutorials! I am learning how to belly laugh!
thank you very much :)
>female coder
>using meme libraries that has all the real code
>GUISE WE MADE SKYRIM WITH 3 LINES OF CODE PLZ LIKE N SUBSCRIBE
...this must be satire.
skeletons are default right facing, so maybe put a circle on the enemies middle or use the collision box and somthing like
animation line:
from collider box, raycast to player; if angle >180 rotate model 180*
maybe also use the "skeleton"(haha) of the model its own entity, and make more enemy "skins" as sprite IDs (enemy 0 1 2 3 4 5 etc) with stat blocks I think just hp would suffice.
To take it a step further if you create defensive layers (destiny/borderlands style rock paper scissors) red health (flesh weak to fire) blue health (energy/ghost, weak to lightning) yellow health (bone, armor weak to cold) and have a higarchy for hp (b then y then r)
staple these qualities onto the stat block sheet
enemy id][enemy sprite refid][health(s){r,b,y}[health ammount]][damage (default 1 boss maybe 2)][attackset]
eg: 0: 1:b150y150,1 for a ghost with bones.
My inspiration for health mechanics would be like in Everhood. It just regens 1 over time, the regen timer resets when colliding with nan enemy, so you can have a good streak and a bad streak but you have a definitive amount of "safe time". To me this removes frustration of damage number memorization for enemy types for the player and simplifies the game immensely. The number of hits you can take may be based off of difficulty. (8 easy 5 medium 3 hard 1 hardcore)
this is actually really cool
Moonwalking skellies
Sacrifices neede to be made
Really good video
Glad you enjoyed it :)
This is the most spaghetti-code project I’ve ever seen in my life but does it even matter when u can fit all the code within one screen?
ooooo this is fun gamified coding lesson!!!! great job bridging the gap!
I like how this whole video premise is "in 10 lines of code" while totally throwing away the fact that the godot engine is taking care of 99% of what's going on here xD
Kudos though, it makes for an interesting coding session.
So if you are driving really fast is that totally throwing away the fact that a car does most of the work and you did not walk? :D
@@PlayWithFurcifer Well, at that point, would you state your achievement as "We made it all the way to texas from new york without walking!!" as you did in the title? (Trying to fit into your comparison here)
Anyway I just found it amusing and had a laugh, no harm meant.
@@figa5567 Where has the title suggested we handwrite machine code and dont use any libaries etc? :D
I just like to have a bit of fun with my smartass youtube commenters.
Have you looked at the Godot source repository? I can assure you there are more than ten lines of code in there.
No one doubts that, please watch the video - we explain our rules.
This is great! So creative! 😊
Thank you :)