Mario has simple but nice camera rules.
You see more in the direction you're walking.
There is also a small deadzone for turning the camera around.
I implemented this in my game 🔽🧵
Lots of programming best practices are about decoupling code.
However, the gameplay code of video games is largely about having unrelated things affect each other in dynamic ways.
So there is conflict between independent code and dynamic gameplay. I have learnt to accept that.
The first time I used Unity I asked a friend: "so where do I put the code hierarchy of the game?"
I was expecting some kind of game.cs file where you explicitly structure the code.
This is how I used to expect games to be made and how I still think they should be made.
My game is now running entirely from a single MonoBehaviour. There's just one Start and Update function for the whole thing.
I REALLY like having the entire update loop laid out like this because
PortableBuildTools v1.5 just released!
It's a program that downloads MSVC compiler, linker and Windows SDK for you, without needing to install Visual Studio.
Great combo with Odin compiler, since that one needs the linker and Windows SDK 👍
I wanted to solodev games since I was 19 but never got around to it, now I'm 35 and just released my own game.
I think I could have done it much earlier by just committing. I was often afraid of what skills I was missing. But you can learn skills while doing projects!
Having fun making a lil landscape painter that uses Signed Distance Fields
Inspiration comes from there being so many pixelart concept images that have organic terrain, but many pixelart games end up with very boxy tileset terrain.
Made my "SDF Painter" Odin code open source:
You draw hills using a Signed Distance Field. It runs on CPU and is very inefficient, but the basic ideas are there!
I have written a big "Introduction to Odin" article!
It's almost a book.
It is an informal article that tries to bridge the gap between the existing online documentation and things I've learned over the years.
I hope you like it!
For many years I was stuck with not making games because I kept trying to write a game engine first and then put gameplay code on top of it.
In this blog post I talk about "Solodevs and the trap of the game engine":
Many people try to build their own abstract game engines in order to "reuse" code.
But you can just take a language + a library and starting making the game.
How do you then reuse code in next project? Just copy-paste what you need from the old to the new project. It's fine!
Any other programmer do this weird thing?
When I've scrolled away in my code editor to check something, I often use undo to jump back to where I was actually working (followed by a redo to undo the undo).
In May I wrote about how my method for making games is very similar to the method I had before I started working in the games industry.
While working in the industry I got a bit lost and started trying to make general purpose game engines. No more!
Just finished a full editing pass of the Odin book. 59700 words!
I will now send it for proof reading and go on a vacation for 2 weeks. When I come back I'll edit it based on feedback and do some polish.
Hopefully I can hit that November digital release!
Friends!
My game is currently at the top of "New & Trending" on Steam
I was in disbelief at first, so I even checked in incognito browsers
I am stunned!
Thank you all so much for playing my game 😻
These days I actually write "scripts" in Odin. No more Python.
Manual memory management is not a concern for most scripts: Just don't deallocate. It's a script. It will run for a few milliseconds and then shut down. When it shuts down everything is deallocated.
I'm not smart, but I'm very stubborn!
Almost everything substantial I've created took a lot of newbie mistakes to get there. Even though I feel like I shouldn't be making those mistakes anymore. But I still continue, because I am very stubborn.
To me, the hardest part of gamedev isn't the technical stuff.
It's the game design.
Finding something that is interesting, consistent and easy to teach is harder than any fancy GPU or physics programming.
Not true for everyone, but probably for those with technical background.
Visual Studio tip: I knew breakpoints can have actions that print stuff when it is hit. But I learned from this little info box that you can print the callstack. Super good for debugging UI problems where you can't actually stop on the breakpoints b/c it messes with the focus.
Editing my Odin book! It's currently 35000 words.
Target audience will be people who have done a bit of Odin or know some programming. Main focus is to make it enlightening about concepts that normally take a while to grasp.
Programming is like pasta.
When I was a kid I wanted basic pasta dishes.
Then I grew up and started experimenting with complicated sauces for my pasta.
But recently I have reverted to always preferring basic pasta dishes, but with a touch of finesse.
The Odin book is now over 40000 words!
My first editing pass is taking longer than I thought because I ended up adding additional chapters as I went along :D
Other than writing the first book on the Odin Programming Language, back in march I released the first commercial video game made in Odin!
It's a short and heartwarming story about things that go wrong when a cat tries to make pancakes.
I've made everything in the game myself.
✨🐱 CAT & ONION is OUT NOW! 🧅✨
🚀 Go on a short cat adventure
🐿 Meet curious characters
🥞 Experience a surreal and funny story
Only $3.49 + a 15% launch discount!
This is my first indie game. Code, art, music and sound by me. Marketing by me and
@gerryforcomms
!
Few seem to make their 3D graphics code specific to their game. They end up with very generic "material systems" etc that are hard to understand.
If you make a 3D game by yourself, you can just have a struct of shader parameters instead of materials!
I am toying with the idea of turning this article into an actual book (both physical/digital):
A book version would be greatly expanded, edited and have a nice layout.
Any recommendations of either publishers to contact or methods of self publishing?
When you buy CAT & ONION on Itch you also get the source code.
It contains:
- All the gameplay code for the game
- Editor that uses homemade IMGUI and homemade GUI widgets
- Hot reload code
- All written using Odin + Raylib
A problem with hot reloading code in both Odin and C has been that debuggers lock the pdbs, so I can't recompile.
However, with RAD Debugger everything works. I can have debugger attached and hot reload!
Takes like 1 minute to download get running.
Hi cat friends!
During the first two days I've managed to sell 300 copies of CAT & ONION!
I'm very happy about this 💖
Also: I've gotten 35 user reviews, 100% positive! 😻 They are such a joy to read!
I've also gotten 13 recommendations from curators ✨
Thank you all!
Hi friends!
My little cat game is now one week old, and what a delightful release week it has been! ✨
🙀 I've sold 500+ copies, exceeding my expectations
😻 I've gotten 60+ heartwarming player reviews
🌟 People are looking forward to my next game
Thank you all! 💖
Lets say you compile with /subsystem:windows, but you also want console output when run from CMD?
Then: Always compile with /subsystem:console, but if you don't detect any CLI parameters, just do:
win32.FreeConsole()
The console will never show up in GUI mode.
My "make games, not general purpose game engines" mantra is sometimes misinterpreted as "always use a big third party game engine".
I do not mean that.
It is fine to create your own tech. But only write the code that your specific game needs. No "maybe I need this later" code!
Doing fun software rendering things...
My program only uses WinAPI to open window and then create a bitmap.
The game is only fed an array to put its pixels into each frame.
Hi!
Releasing my first game on Steam sure was a roller coaster of emotions
Now I see some very kind reviews starting to roll in and:
I've managed to sell more than 100 copies!
This makes me very happy 😻
Thank you all for showing interest in me and my cat game ✨
If you are a solo developer, then use your name or a pseudonym instead of a "company name"
Make sure it looks like it was made by a single person from just seeing the developer name
Initially I tried to use "Zylinski Games", but just putting my full name is so much better!
There are replies hinting that ECS will fix this.
My main point was that that gameplay code is intrinsically messy. I have accepted that, making the messiness mostly a non-issue. No ECS needed! I don't like working with ECS, it makes it harder to be creative with gameplay code.
I wrote a whole game using Odin and Raylib and one day just tried to compile it on a really old MacBook and it worked with no code changes and no build system.
@McFunkypants
Just like we have depth buffer, we are now introducing time buffer, which contains the timestamp of when the object was added to the scene. This way we can sort objects of similar Z by their time.
CAT & ONION is made from scratch using:
Odinlang by
@TheGingerBill
: Modern C alternative —
Raylib by
@raysan5
: Library to enjoy video game programming —
Aseprite by
@igarastudio
: The best program ever made —
CAT & ONION is a short whimsical 2D adventure. Be a cat that goes goes up, out, inside and around to help a friend!
#gamedev
#indiedev
#pixelart
Solodeved (design, programming, art, music and sound) by Karl Zylinski.
CAT & ONION just reached 100 reviews on Steam ✨
99% of them are positive! 😻 Thank you all for playing my game!
To celebrate this, CAT & ONION has a 30% sale on Steam:
It's nice that I no longer need to upgrade my PC.
All the new games I play are often "strong art direction, low requirements". Very pretty games, but they run well on 10 year old PCs.
For the next version of The Machinery, I implemented subgraphs, along with automagical connectors for adding additional Inputs & Outputs.
@ourmachinery
Tweak the position of the green and red lines and the interpolation speed.
This works mostly like I want now. After this I want to add rules for when to change the y position of the camera.
When I say "game design is hard", some think I mean "coming up with game ideas is hard".
To me the hard part is later in production. The design can become like a jigsaw puzzle of contradicting game mechanics.
Playing games won't teach you to solve this, but making them might.
Inspired by Undertale, I made it so the release mode version of my game embeds all assets!
This means that the final game is just a single exe that contains everything. Whole game is inside!
How I did this 🔽🧵
Hi programmer friends!
Did you know that this whole game was programmed in Odinlang? It's a very comfy modern alternative to C.
Odin comes with Raylib bindings, so you can just download the compiler and start making your own game! ✨
Check it out:
✨🐱 CAT & ONION is OUT NOW! 🧅✨
🚀 Go on a short cat adventure
🐿 Meet curious characters
🥞 Experience a surreal and funny story
Only $3.49 + a 15% launch discount!
This is my first indie game. Code, art, music and sound by me. Marketing by me and
@gerryforcomms
!
My new YouTube & Blog series: Make games using Odinlang + Raylib! First two episodes are out now! ✨
Target audience is people who have more or less never programmed before. Each episode has both a YouTube video and a blog post.
Did you all know that
@jakubtomsu_
's game "Solar Storm" comes with source when you buy it on itch?
It's made in Odin with sokol_gfx for rendering. He's super smart so it can probably be very interesting to look at!
CAT & ONION is coming to Steam on March 12, 2024!
It's a whimsical cat adventure packed with curious characters and good vibes ✨
Help me by wishlisting my first indie game ❤
I completed Morrowind main quest 1-2 years ago, but I just finished my final task: Filling out the entire map by walking to every tiny square on the map.
If you have problems understanding how floating point numbers actually work, then perhaps this article "Floating Point Visually Explained" by Fabien Sanglard can help:
This is how the first playable version of CAT & ONION looked.
I made it on a plane, just as a way to pass time and because I wanted to try Odin + Raylib.
I didn't really know how to animate!
🧵 Thread on how it evolved over time 🔽
I always try to be nice online. Staying nice makes me less likely to get worked up and say stuff I later regret!
This is very important to me. I find it easier to stay motivated on projects if I don't associate them with bad vibes.
One of the biggest surprises of launching my game is that people seem to like my writing!
It's very silly dialogue. But somehow people got invested in the whole thing.
Looking forward to writing dialogue in my future games, and perhaps having a bit more confidence in doing so!
Short compile times is important for productivity.
My game recently hit 4 s compile time, I realized I was doing some silly things. Now I'm back at around 1 s.
If your indie game takes more than 10 s for a debug build, then don't be afraid to look into why! Don't just accept it
My Odin + Raylib + Hot Reload template now hot reloads properly on Windows while a debugger is attached:
You can use any debugger. It works by outputting a new PDB each time the game DLL is built (it cleans up the PDBs when you do a fresh start).
I actually fixed a bug in the Odin compiler itself 🎉
I have submitted lots of PRs to fix things in the standard library, but I haven't felt like digging into the C source of the compiler itself before.
It's quite straight forward code in there ✨
The reception for my new video has been very heartwarming.
It's essentially a 90 minute video of me making a tiny game and explaining most aspects of it.
I hope to make more such beginner friendly videos.
Thank you all!
Juicing up The Machinery: New graph input and output editing workflows -- Here I edit inputs directly in the input node, with drag n drop re-ordering. Will be available in the next (December) version.
@ourmachinery
Hi nice people!
My lil cat game just reached 50 user reviews!
Since 98% of them are positive, it means my game is now labeled as having 'Very Positive' reviews. Yay! 🎉
Thank you everyone for making this such a pleasant release week ☺
I'm available for Odin tutoring and consultation!
❓ I'll teach you Odin concepts or discuss issues in your Odin code
💻 Online video call with screen share
💵 $30 for 1 hour, $50 for 2 hours
More info:
A tough thing about technical writing is choosing target audience.
I'm leaning towards "people who have programmed a bit, but perhaps in more high level languages than Odin".
This way I can talk freely about interesting specifics in an informal way.
Thoughts?
CAT & ONION will release on itch on January 26! ✨
It's a VERY CAT ADVENTURE GAME where you climb, talk, fly and SMACK your way to places where no cat has EVER GONE BEFORE 🐱
Step 1: Add debug lines. Green is where the player should 'stick'. If you walk past a red line, then it moves the camera to the green line on the other side.
I'm at
@AMazeFest
in Berlin until Sunday!
I look like this!
Say hi, ask me about how hard it is to get started on a second game!
I got CAT & ONION merch for everyone!
Recording new Odin + Raylib tutorial video tomorrow!
It's gonna be a single video where I make a tiny game from start to finish.
I hope to continue creating such self-contained tutorial videos, it feels more fun than doing massive multi-part series.
I have a 4K screen (3840x2160).
I've been confused why playing games in 1920x1080 made then look fuzzy. It's half the resolution. It should be possible to draw without subpixel smoothing issues.
Today I found this "Integer Scaling" setting that fixes this! ✨
Shipping a game was hard!
No-one told me that the period afterwards where one tries to start a new project can also be stressful!
I'm like: What to do? I can do anything!
HA! Do nothing. And feel bad about it.
Amazing.
In order to create a friendly Discord community and YouTube channel, I have these rules for myself:
- Never be rude and overly negative
- Don't interact with rude comments
- Have rules against rude behavior on Discord
"angry programmer rage" will scare away the friendly people
One of my favorite examples of positive gamedev people is
@raysan5
! For example, watch this interview and see how INFECTIOUSLY HAPPY HE IS 😻 I can watch this just for his happy face alone
My YouTube channel is now 1 year old!
I'm already past 2000 subscribers and it's growing all the time.
My recent Snake game tutorial video already has over 1000 views, faster than any of my previous videos!
Thank you all for watching!
If the player walks past a red line, set the camera offset so that the player will end up on the green line on the other side!
Now I need to interpolate instead of snapping the camera.
CAT & ONION will release on itch on January 26! ✨
It's a VERY CAT ADVENTURE GAME where you climb, talk, fly and SMACK your way to places where no cat has EVER GONE BEFORE 🐱
On my Discord server you can:
- Show your gamedev projects
- Talk about Odin
- Look at cat pictures
- Ask questions about my projects
- Tell us about your favorite video games
- Post cat pictures
It's a friendly place!! ✨