Why I Deleted My Office Roguelike
Вставка
- Опубліковано 14 сер 2023
- In this devlog I am deleting my office-themed roguelike.
Not to worry though, the game will continue in a different project.
But I'll have to rewrite and recreate all of the code, systems (and art?) we had previously.
This devlog is where that journey begins.
=======================================
My discord server: / discord
=======================================
Programs I use:
-Unity
-Gimp
-Kdenlive
-Audacity
-Obs
=======================================
#devlog #unity - Ігри
Join the Discord: discord.gg/27DWMcH
Add more enemies and maybe a boss or something
Egg
how much will it cost bro this game makes me want to play it so badly
@@mrfloaties991 This isn't final by any means, but when it comes out (which could be a long while away) I am currently thinking it'll be $5
@@Deynum :O i can afford it :DDDD
I would swap the room look idea, the lore could be that you're starting at the top of the building(where everything is clean) and you try to escape it by going down(the levels get dirtier) and you eventually fight the last boss at the entrance - you could go for some creepy stuff in the lower levels, such as mutated employees. Add a secret bathroom level where you jump in the toilet for a loot room
-looking forward to the finished product
That’s a great idea!
I support this
underrated comment and idea
And you get an option to explore the basement with crazy mutated Workers.
It feels like the inverse of slay the spire in that sense. Instead of going up, you go down.
The final boss would be the secretary. Sound brilliant.
Starting again to make it better. Seems like a fair trade. Good luck deynum!:)
Finally someone who isn't completely freaked out by the situation lol, thank you
@@Deynum Good luck as well
@@Deynum Haha I'm with you too mate. Big refactor = big satisfaction!
The art looks much better then before and I really like the extra detail you added to the office, it gives more depth to the game and I find it makes it look more polished overall
My suggestion would have been to create a new namespace and slowly build your new code within this namespace. That way you can have new scenes with new scripts without having rework sprites and other work done.
Plus you have the bonus of being able to see the difference within the same project.
I literally have never heard of a namespace before, but I've seen it commented twice, so I'm gonna look into it (probably too late now though)
@@Deynum Namespaces are mostly used to organise your code in a specific structure allowing for easy addition to your code base by simply using said namespace
Yeah, it allows you to use the same class name as your old script as well, so you can transition your old code into the new one seamlessly, once it done, you can just then delete your old code...
Can you elaborate on that?
@@ray_9211 which one, my comment? or the others?
Oh, i had a mini heart attack because of the title-
Thanks god it's just clickbait! Can't wait to watch this devlog!!
I mentioned this during one of the Livestreams, but restarting my game was a fantastic decision!
Not only did it make the game easier to work on, but it also allowed me to more objectively reevaluate it and the direction it was heading!
Also, I tried the same things to get pixel perfect working, but ended up going back to the default pixel perfect when I couldn't figure it out. When I eventually try again, I'll keep this in mind.
Congrats on having the motivation to (nearly) start over ! That's the problem with long projects, but that also allows you to see how much progress you made along the way ! :)
Love that you show examples of what the rewrite actually improved other than say "Its new, Its better". I personally rewrite my stuff so often because there a so many things to do better and learn from but I also know many people who are "scared" of redoing stuff, hope this video will make some people think about redoing stuff who never thought about it!
Your devlog's quality is such a role model
Art, Noice. Programing, noice. Enemys converging into one, Extreimly noice. Overall i give it a noice/10. Seriously tho, game is looking great and as someone who also restarted due to old code breaking this looks amazing(well done)
Comment, noice
Units merging is quite a problem. Maybe some units that are semi transparant could do that for some weird in game behaviour?
Oh, i got scared for a moment 😅
Edit: after watching the whole video, i can make a more well rounded comment. It was a great decision to come back to the old code you made, and revamping it so I'll be better. I love seeing the same projects get upgraded throughout their making because of the new knowledge of the developer. It is very satisfying to see! As for the video, it's very well made, the new style of editing you chose for the past few videos is very eye catching. Well done.
I’m only a novice and you’re probably already doing it as a much more experienced dev than myself but I’ve found scriptable objects to help greatly reduce script dependencies. I’m still yet to see their full potential but my favourite use of them so far is to easily swap out all the variables on my weapon system without having to instantiate a new script. I assume you already used them in your old project at the very least for your weapon system but I guess it’s worth mentioning just incase. Scriptable objects are so cool. New art looks good btw!
I was watching since 1k, its so cool watching you evolve, best of luck Deynum
I got SO scared seeing this on discord! I am also happy for a new devlog! Keep up the good work!
I love the idea and the bravor needed from you to do a reset and restart from ground 0
and I also love your devlogs, your game looks so promising^^
The new art is looking so good. It adds so much depth.
As long as the end product is better, we dont really mind the wait
Wow! This is so much better! Im also impressed that you stuck with the reset, as usually, when I do that with my games, I abandon it in like 1 week.. anyways, I love the new artstyle!
Great improvements! Loving the art style and looking forward to particle effects! One thing I’d say from my experience is that rewriting your entire game is fine but only once. Seems like it was much needed in your case but don’t get caught in a loop of rewriting everything too often, it happened to me and at some point I just realized my code was good enough even if it will never be perfect haha. Good luck on your development!
Great Video! I ran into the same camera jitter problem in my game. In my 9th devlog for Ranger I came up with a modified upscale technique which allows for Zooming, Tilting, Rotating and basic movement all while keeping the pixel factor constant and unjittery.
I've refined it and simplified it quite a bit since that devlog. Later this month I'll be releasing an in-depth tutorial
i am so excited about this project!! the idea is just so cool and I have been loving the videos
Just got recommended your channel, love your content already, good stuff
I did the exact same with my game about a month ago despite how much work would go into remaking it I am 100% glad I did. I recommend to anyone to try and remake their game (as long as it's not too far into development) to get a better understanding of their goal ideas they want to portray to their players!
PS. It will go a LOT quicker the 2nd time even if you add things as I did, because you know exactly what you are going to do.
Plus this is clearly going better for you just hearing over 300 lines in the shooting script was insane. Also your art style for the game has definitely improved :)
wow the improvement is SO GOOD! from the art style to the code cleanliness, chef kiss!
I wanted to give some reassurance on your solution to pixel-perfect cameras, since it's something I work with very very often. in case anyone is curious, the issue is that the position of your objects are themselves not pixel-perfect, so it causes the camera to approximate which pixel to put things on, which causes the jitter. this has given me lots of headaches in the past as well, so I'm glad you found a solution that works :D
if you ever want sub-pixel logic though (like bullets or super small enemies) you could have the physics objects free to be wherever they'd like, but make a custom script to restrict only the associated sprites to the pixel grid. just a quick idea!
I've came across this issue a few years ago and used the same solution. Felt like I was going insane until I figured it out though, lol.
I like the floor being textureless to make the action clearer but it might be cool to have a subtle checkered pattern to add some visual interest and to look like a carpet.
I like this A lot, this is a big, if not the step to really understanding game dev. The amount of times I had to do this sucks looking back on it, but it really made me a better game dev at the end of the day
excited for the new things you're planning to add!
this was interesting:
first I was shocked that you would ditch the entire project
then I was annoyed that you weren't and it was just clickbait
but it turned out to be a really interesting video anyway! I love the buffed up artstyle on the enemies, looks fantastic
Yeah, it happens sometimes. Don't feel bad about it. Sometimes life is just gonna be like that. I think that it'll be great though. You've gotten a feel for game dev and learned a lot, so you can improve in your next draft. I also suck at game dev, but I really hope I won't have to do that.
ok i love this editing style
Thanks (don't tell anyone but the editing for this video took like 50 hours lol)
I think the reset was a good idea! By doing this you can flesh out and modify fundamental systems with little basic non specific pieces of code that you can combine to make your workflow much easier in the future. Heck with that augment idea if you made it stackable and applied it to guns, bullets, enemies, etc. You could have a lot more freedom for how you approach the gameplay loop and game balancing. An example being, maybe an item that affect your shots, maybe they turn into bouncy bullets or something!
That's a great idea ! I did pretty much the same a year ago for my game, and it changed everything, making it like 4 times better and 16 times easier to work with... I'm sure you're already seeing how satisfying it is to remake something you've already done, but quicker AND better !
I will dare to recommend you a book called Clean Code. Among other things, itt talks about how starting from zero is normally not the best idea, but the most pleasant. It's always better to refactore the current, well tested, codebase. I hope I'm not being too obtrusive !. I also want to say that your game looks wonderful and sounds like an awesome idea, good work and good luck with it!
I've been fooled, FOOLED !
Cool devlog again, it seems like the good call, trying to build something over bad foundations can go very wrong.
This was a fantastic upgrade! I'm going to go through and upgrade my project aswell!
I'm quite a perfectionist about my projects, the "RESET" strategy is usual for me, so I 100% approve your decision...
It works for me, so keep up and good luck with your cool project :D
Restarting your project must've been a hard decision though I love the changes you implemented, it's looking great!
Apart from the rather clickbaity title, I absolutely l o v e everything you've added. The new art looks awesome and the pixel perfect camera is a nice touch stylistically. Redoing a project can be scary but you absolutely crushed it and I'm so happy for you
Good call, having a cleaner code space is always a plus! Game looks great…again lol
I think that was a really good move. I mean, I do it all the time with old stuff, so I may be a little biased. But it just gives that refreshing feeling when you do things like that, if you know what I mean.
Clever solution to the pixel perfect problem. I'm sure you only glossed over it at a high level, as I imagine it was difficult to get things to render in increments of the game resolution.
I can strongly relate to that code written by a year ago feels super bad today. I just wrote everything to work back then, not be easily scalable and usable in the future. Its probably something every game dev struggles with, constantly wanting to start over or move to new projects. I am glad I just decided to improve the old code when I need it, as always starting over otherwise ends up in an endless loop.
Of course we'd release our videos at the same time. 🤣
Cool to see the work/rework being done though. 👍
Like half of the video (the art section) was inspired by your video, so I guess thank you for also reworking your game
@@Deynum Well, I didn't take the plunge and go as all in as you did. I'm still building on top of my original terrible code. Fingers crossed it hold together. 🤞😅
Finally a sane person who gets what he gotta do
mojang should do the same in my opinion
tf why?
Edit: wtf how was this liked after 3 seconds?!
@@TheCreationKilnBlockbench minecraft is almost never geting updates with the last updates taking like a year but only bringing smaller things since mojang is just making their work harder rather than easier if that's what what you're wondering about
@@MHE202 I get that, but to start minecraft again would kill the modding community, and ruin so much work over the years
yeah youre right completely forgot about that sorry@@TheCreationKilnBlockbench
Also all of the servers
This video has introduced me to a few new concepts such as augment scripts which are almost perfect for doing things in an rpg such as a shop, an attack, and so on. This way I don’t write out a bunch of if statements creating a whole new spell with a different level of energy that it costs and how much damage it does if performed correctly.
with the change of direction with the Art style, you could probably implement that into the enemies like a printer. It could shoot out paper slowly in lower levels then as more expensive and well-maintained printers are found in higher levels, it could shoot faster and get stronger.
Great video as always, You should add floor tiles
Bro i would not have any patience for this hands off to you
Awesome work! It probably already has been commented here but the « augment » system you came up with is actually a software architecture principle called « dependency injection »! Really nice that you came up with it yourself ahah
Keep up the good work 🔥
this is really cool! the weapon suddenly disappearing when you dodge feels slightly off though
recently did the same thing for the game i'm making. if anyone is on the fence about doing a rewrite i highly recommend it. it's one of those tasks that seem like they would take forever but it's actually not that bad at all when you have your old code as a base, only took me a day to rewrite 5 months of code. it's crazy how fast progress is now that adding a new feature no longer feels like stacking a block on top of a leaning jenga tower.
From what you said and showed, the re-set was the better and smarter option for you to move forward with. Game looks great by the way dude :)
Your patience is insane. Though I imagine coding this the second time around with more knowledge (and less lines) was much faster. I also imagine the pixel art took longer than the original, but the payoff of how much better it looks is massive.
I love this project. So anyways random weapon idea: a bin the player carries around, taking paper balls out of it and throwing them at enemies. Maybe even with something like a charge attack where you can take out a paper plane or unfold a paper ball to become one? Rather basic but I think it could fit pretty well
Hi! This is my first time watching your channel, so maybe there are some things that I don't know (+ that my english might be kinda bad).
I also had that jittery camera problem with another project, but I noticed that if you move your player with fixed update, you should also make the camera move with fixed update, that solved the problem for me, with that you can also use lerp, smooth damp or anything.
It's not necessary to use private, because it automatically makes it private if you don't write it, also a common practice it's to put _ at the start of a private variable. For example:
int _playerLife;
For some reason objects only can collide with other things if they have a rigidbody, so that might be the reason why your enemies don't collide with eachother.
Inheritance can be usefull also for your guns.
Maybe you know a lot of these things, but just in case I wanted to help in someway, and obviously I'm not trying to force you to use these things 😅
I'm looking forward to see more of this project!
I think this new project will will be awesome when you finish it :)
This is gonna be sick. Can’t wait for it to be finished
You were so calm when you said that you resseted but i know that it hurts
I'm on my 3rd and hopefully final rebuild of my game, for the same reasons you have here.
Would love to see the protag have some more fleshed out animations. I love the game though!
You’re really good at this stuff
To unstack enemies, what I did is make enemies pushy, it's not the fastest, but with less than 100 enemies on screen there's no issues (I have 5k enemies on screen with no issues)
Basically each enemy has a weight, and you add a vector for each entity in the radius which is equal to this.radius +other.radius-distance
The main issue for speed is that you basically have to have each enemy check every other enemy (though you can subdivide the world to make it more efficient)
Avx2 helps a lot and makes your checks about twice as fast.
Especially lf you're using square collisions, you can check all the collisions very fast by having 2 prepared variables for the boundaries, one for when it's the one verifying and one for when it's being checked against, and you can just use a mask for each collision and then use the avx packed greater than, which does all the checks at the same time, so every collision check takes only a few instructions.
Adding some bobble to the gun when the player walks could provide a more bouncy move cycle
Great idea on the reset, as a programmer, I can totally relate to your situation.
A simple hack to the pathfinding causing overlaps is to make enemies leave invisible fields that are presented to A* as extra slow to move through. That means any opponent following another will attempt to walk around it, ending up actually walking side by side.
These "virtual obstacles" should disappear some short time after they're placed.
Also, reset is good.
if you dont want to snap everything to your in game pixel grid, you need to store the intended camera offset and add it in AFTER you upscale. the first camera will render at a smaller resolution and then upscale it, so 1 texel would be something like 5 pixels for example, so if you want to move your camera 14px to the right, it will get truncated to only 2tx instead of what you actually want, which is something like 2.8tx to the right, but you cant render that 0.8 in the native, pre upscaled resolution, so what you do is shift the camera by 2tx to the right, and have a 1tx outline that will get cropped out when you upscale, but you move the camera 0.8tx to the right which becomes (0.8 * 5)px in this example, and its not black because you have that 1tx (5px) buffer, and its smooth because its not locking to every 5px, but instead every pixel.
2:15 Using that exactly same A* pathfinding asset, you can prevent enemies overlapping by local avoidance. This is done by adding the RVO simulation, check the documentation for that. Its very easy and fast.
I'll look into that, thanks
Thank you for clickbaiting me with that title, otherwise i may have missed this masterpiece.
Love the new aesthetics! The augmented scripts sound similar to abstract classes with overridden functions. Is that what you're doing or are augments a unity paradigm?
My first game ever built was a Breakout clone. I wrote the game four times, and each time slashed the line count. First version was 400+ lines of code. Second version was already around 200 lines, and the last version of the game was under 80 lines of code.
Rewriting code is a good idea, especially when it's starting to affect the development with its clunkyness.
Imo this was an amazing decision. I did the same thing with one of my own projects because the code was horrible. I’m not working on the project anymore, but overall I think it was a great decision in the long run.
And as someone who uses an equivalent to the pixel perfect camera in my game engine for pretty much every project, I can confirm that stuff like jittering and whatnot can be frustrating, but the effect is insanely rewarding if you can get it to look right! You just have to kind of babysit everything to make it look good.
I love how much you improved!
I HATE IT WITH A PASSION THAT YOU USE camelCase INSTEAD OF PascalCase FOR CLASS NAMES
Yea this is a common issue with indie game development
when i was making my game i restarted it THREE TIMES.
all my programming buddies have also restarted their games over and over again.
I wouldnt be shocked if this reset happens again. Dont worry, its natural and we all gotta do it eventually.
I did the same thing recently. Haven't really gotten progress on the remake but it will be better
Scared at first, but then you used old sprites (but slightly better) so I think it was a good thing.
my instant thought when the augments get mentioned: "interfaces and factory pattern"^^
If you don't want the enemies to collide with each other, create a hitbox for the enemies
Thank God you’re not deleting it.
I almost had a F**king Heart Attack
I strongly recommend using pooling instead of instantiate for projectiles :D ...hmm I think I will start my game devlog too!!!
for the issue with the enemies overlapping,
you can add a collider so the enemy won't walk over
This looks soo much better
Game endevour has some great content on enemy ai, specifically avoiding clustering in nice looking ways.
Great video! Did you end up solving the overlapping enemy issue?
Nice, definitely keep that stuff backed up
It's really easy to get into a loop of "I'm better now, let's go back and rewrite that old code" only to have improved enough by the time you get back to the same place that you feel the need to go back and rewrite the earlier code again.
It might remove some of the corporate vibe you are going for, but some rugs or patterns could definitely break up the flatness of the floor.
there's this one claymation short called something like "an ostrich told me everything was fake and i think i believe him", i think you should make a reference to it
For the overlapping problem you can just make them collide with each other, is not perfect but at least you won't think it's only one instead of multiples
Making the sprites obey the pixel grid is the most authentic thing nobody does in games with pixelart graphics.
Some possible solutions to the whole enemies stacking: Making the enemies have a collision hitbox so that they can't clip into each other, or you could flag other enemies as an obstacle in the pathfinding so that they actively avoid bumping into each other. There are probably multiple other solutions, but these are the two I tend to go with when working with pathfinding. I hope this helps 😄
I tried the "making enemies obstacles" method, but for that I need to update the navmech frequently and that causes a ton of lag
@@Deynum you could add a pseudo hitbox with its unique collision layer that will push out other enemies depending on how close they are to the center of the hitbox (better than making them simply collide as they can still be clumped together)
@@Deynum Try looking into "bodies"
@@Deynum wait I meant "boids"
How did you go about making the augment scripts? Did you use scriptable objects or something else?
wait whar 😨
ah nvm the title scared the hell out of me 💀💀
re: pixel perfect camera.
Why dont you have your normal camera capturing everything except effects like particles, then have another camera only rendering the particles and then smash it into one? You could then work around with layering stuff but I dunno how to do that
I had to do the same thing with my project in godot. Both because I wanted to upgrade to godot 4 from godot 3.5, and I would have needed to basically rewrite the core component to my game, and because I wanted to rewrite the entire game since I had grown considerably in the field of programming.
4:55 you should add a shadow under the draws that are hanging out in the file cabinets
Specifically for the front facing file cabinets
So until today i never heard of your project looks like it will be a great game i will prob give it a try once you finish it but you also sparked some passion in me and im thinking of returning to trying to learn unity are there any resources that helped you in the begging you could maybe share with me? Thank a lot and good luck on your game!
I wonder if there’s a way to use a second camera set to pixel perfect, and which only sees effects. Then make the default camera not see the effects and composite the result together.
if you figure out how to make enemies not overlap, I'd love to know how (and same for the pixel perfect stuff lol)
I would love the idea if youd kinda throw the pen in the air before dashing and catch it when finishing the roll