Braid Code Cleanup (part 1)
number-none.com
number-none.com
I think that works well for parallelizing game subsystems, too. Physics and the renderer can run at their own rates on different cores and then publish (read-only) global snapshots of their state for other subsystems to consume.
In practice you must always have at least a smaller version of your physics engine, that your rendering loop needs to run before actually creating the frame, to do one of these two things:
- interpolate between the last and the previous physics state, accepting a constant additional latency between input and result
- extrapolate forward from the last physics state, accepting that what is displayed will occasionally be slightly wrong for a frame
Both of these come with their own problems, which may be bad enough to completely invalidate their use depending on whatever game type they're being used for.
So even if you decouple and parallelize your loops, you end up with 3 ways to handle the result, neither of them being without disadvantages. There are no silver bullets.
On that sort of hardware (and I'm assuming only in fullscreen mode) you should be able to match your render framerate to a multiple of your physics framerate.
Whether you'd want to is arguable. If people noticed it they'd probably complain that maxing render at 140 Hz (assuming 20 Hz physics) on their 144 Hz screen is wasting their hardware. If you're doing it dynamically as physics perf varies up and down, the abrupt shifts in render framerate might be noticeable.
That sounds like you're advocating variable-length physics steps. Just a warning that that can be hilariously disastrous. Due to the way physics are simulated on computers, the simulation is never perfect, and the same timeframe simulated in 5 steps can give very different results than 1 step.
Standard solution is to interpolate position between two known physics states. This means physics is one tick behind in the normal case.
There's a clever approach I read recently. It's to trrat physics like fighting games test netcode. Extrapolate physics (usually a huge no no) and fix up in the unusual case that it's wrong.
Now that 144Hz and even 165Hz monitors are common I expect to see more experimentation with this type of thing.
More: https://developer.oculus.com/blog/the-latent-power-of-predic...
Exactly. Doing physics at 30Hz and rendering at 60Hz seems like a bad idea. Doing physics at 60Hz and rendering at 120Hz seems completely fine.
Why is it usually a huge no no?
But scrolling text is a very special use case (and not physics) and probably nobody should want to scroll text at 60Hz/100dpi/arbitrary velocity...
EDIT: It was the game developer named Fez who made the statement [1].
[1]: 39:00 mark of Indie Game: the Movie .
> Fish, meanwhile, is heartbreakingly invested in a game he can't finish for his own perfectionism. "It's me, my ego. My identity is at risk. It's my perception of myself," he says of Fez. In the film's most startling moment, he's asked what he will do if he doesn't finish the game. "I will kill myself," he replies, meaning it. "That's my incentive to finish it." The flash of black humour relieves the tension, but it's an alarming vision of a man in desperate times.
http://www.eurogamer.net/articles/2012-03-06-indie-game-the-...
> In the previous posting I said it “was a good place to stop for the night”. And I had decided to, but as sometimes happens, I changed my mind
I wonder if all his days are like that.
Funny story, my 4yo finished (with lots of assistance) her first adventure game (The Lost City [1]) the other day and immediately broke down in tears because it was over. Honestly, for the next couple of days she cried whenever she remembered about it.
Actually, would love to hear of about great tablet games for young kids too.
FEZ - also a puzzle-platformer, featured with Braid and Super Meat Boy in Indie Game: The Movie
Portal/Portal 2 - a first-person platform/puzzler with a sci-fi atmosphere
The Long Dark - a single-player adventure/survival game that takes place in the Canadian wilderness. Not a puzzler, but has a painterly art style like Braid and a sense of discovery exploring new locations.
Terraria/Minecraft - these games are already immensely popular among kids. Mining/crafting adventure games in 2-d and 3-d, respectively. There is a creative component in building forts/bases.
FTL: Faster than Light - a spaceship rogue-like game. Too complex for a young child, but fun gameplay if you're into Star Trek/Battlestar Galactica sci-fi themes.
Kerbal Space Program - THE game to learn rocket science and orbital mechanics [1]. Fun, engaging, and tremendously educational. If you've ever dreamed of orbiting the planet or landing on the moon, this is an incredible game. I recommend starting with Science or Career mode, because Sandbox is just overwhelming with the number of parts available. You will probably need to design the rockets at first, but your child can be involved with launching/staging (just requires pressing space bar at the right time).
EDIT: Disclaimer for The Witness: Go in without reading much about it. It's got plenty of puzzles about connecting paths, but that's all you really need to know. The game is as much about discovery and thinking outside/around/underneath the box as it is solving the explicit puzzles.
[0]: http://store.steampowered.com/app/210970/ [1]: http://store.steampowered.com/app/257510/
Additionally the puzzles mostly revolve around moving around in the game world until you can see the "solution" to the board in the surroundings, at which point you then simply input it; while working out the solution based on rules inherent to the puzzle is often impossible.
For example there are two entire sections where the puzzle boards offer zero hints as to the solution and the player has to move around so ----------, which one then follows or redraws with the mouse. Other puzzles involve around walking ---------------------------- so that ---------------- form continuous lines which one then traces with the mouse.
I found myself utterly bored because even 10+ hours in i still felt like playing a really elaborate game of "find the easter egg" instead of actually using my brain.
YMMV.
Additionally, after playing through the game I felt the same way about it. Particularly the "post (meta?) game" puzzles. Perhaps some enjoyed solving those, but for me it was a tedious exercise that brought little satisfaction to the point that I ended up looking up most of them in walkthroughs.
Also, spoilers? In a game that does not have a story?
I'd love to hear which parts of my post you consider spoilers, since i only see "align --------- and trace them" and "walk ----------- and trace lines -----------" as possible spoilers, and puzzle-wise they're incredibly mundane.
Hope the censoring i did neutralizes it enough.
A few more suggestions are:
Fez: Similar to braid, it's a very well done puzzle platformer with a unique gameplay mechanic.
In braid it was time travel, in fez it's warping the perspective of the level to reach places you couldn't.
It has a heavy pixel art style and lasts longer than braid just because of the crazy number of secrets hidden everywhere.
The level warping affect might feel strange but after 20-30 minutes your brain will just accept it and you'll be able to move along.
Antichamber: I'd consider this a mix of braid meets open-world portal.
It's first person, but each area has its own little mechanics you'll need to learn to get through it.
Don't worry about the harsh looking visual style, it was much less than I thought once I started playing.
Portal: Since I've mentioned it, portal & portal 2 for obvious reasons. Often considered "THE" first person puzzle game.
Hyper light drifter: An unusual one, I'm putting it here not because of the gameplay, but because of the art and story.
This is an atmospheric top down exploration game with short difficult fast paced combat segments that are very forgiving, doesn't matter if you die you can just try again or walk away.
The art style is super vivid pixel art and its story is just like braid where you don't quite get it until the end then you'll end up watching an explanation video on youtube and preceed to go "Aah" for the next week.
Seconded. It's brain-breaking in a fun way, playing with your expectations.
And Blow is an animal! I wish this guy was on my team and not an indie developer. His output level (and pragmatism) are insane! Change the fundamental structure of a ~100k loc project in a few days? No problem!
It's quite sad that you need to proactively add a notelemetry.obj to your link line to turn off telemetry when generating your code.
The game Braid originally shipped to the world in 2008, and after some ports in 2009, I have only worked significantly with the code on a few occasions. But I want to maintain this game indefinitely into the future; in the back of my mind, there have always been some clean-ups that I have wanted to perform on the code. Often when shipping a game, the best answer to a problem isn’t evident, and we are under time pressure, so we solve the problem in some way that is sufficient but sub-optimal. Other times, we need to design the game to meet technical constraints of systems we want to deploy on, but as the years go on, these systems become irrelevant, so the code can be cleaned up. I figured it would be interesting to talk about some of these things in a blog (and the blog will help motivate me to think about these situations and clean some of them up!)
Game code is often (not always, and in larger studios that maybe have their own engines even less so) fire-and-forget.
I'm almost kind of jealous. :)
Throwing away never-called functions, chopping out hacks for now-outdated platforms, de-duplicating subsystems, switching to easier-to-reason-about data structures, making assets and related code use more standard formats, etc. must be pretty satisfying, like peeling old faded cracking paint off a wall and refinishing it.
I wonder where he’ll end up.
I think, though, that he could come up with some new creative power-ups and such to add to the gameplay.
I keep thinking like a Mario vs Mario 3 idea. Sure it still had firepower and such, but adding the flying added a lot to the game.
The same thing will happen with the Deadpool movie sequel. The first movie was innovative in that it was the first mainstream movie to break the fourth wall, have tons of R-rated jokes, etc, but you can only do that once.
You're either very young, or haven't watched very many movies.
At least, that's the charitable interpretation that makes the claim not-laughable-on-its-face.
Depends on the sequel. If the sequel is just an additional collection of levels, then just provide a fun "additional levels pack" as an add-on, and/or provide a way to share community-produced levels. That doesn't have the same expectations as a sequel.
If you're going to actually make a sequel, put enough effort, new mechanics, and story into it to make it a new game in its own right. For examples of sequels that put enough effort in to be a new game while still feeling like a sequel to the original, look at Portal 2, or Super Mario Bros 3 (by contrast to Lost Levels, which was fundamentally just a level pack). Numerous sequels pull this off, even of innovative indie games.
But it's also possible that the new game will end up with entirely new mechanics and story to the point that it isn't a sequel, and instead becomes "a new game from the makers of ...". And that's awesome too.
What's it all about, Alfie?
Check out Naked Gun kiddo.
What he probably meant to say. So often we forget that literally everything is an "overdone trope" at this point, unless you do it well.
Wow. Less than 512MB. I can't imagine how they fit stuff like Destiny and Halo: Reach into that.
Interesting reading: How Naughty Dog Fit Crash Bandicoot into 2MB of RAM on the PS1 https://news.ycombinator.com/item?id=9737156
That's right. The entire RAM bank was made of chips designed for graphics. So it's no wonder it was so expensive.
Edit: and this was necessary to decrease the latency between graphical operations and processor operations. You can load graphics directly into what is essentially VRAM, rather than having to pull it through regular RAM first. Because there is no regular RAM.
The tradeoffs made sense at that point in time, because DDR1/2 sucked a lot, and pulling data through multiple stages would drag down performance.
As such it was conventional for game consoles to have fast-but-small RAM. The reasoning is that console games mostly bottleneck on the rendering of a scene at acceptable framerates, vs. simulating all aspects of a complex scene or achieving maximum detail as a movie would. Since ROM cartridges were fast and optical allowed data to be streamed in "fast enough", there were plenty of ways to achieve the right effect under tight RAM conditions. One exceptional case where tight RAM did not play out well is the N64's 4kB texture cache, which imposed a large burden on the entire art pipeline(if you wanted a high res texture, you had to resort to tricks like tiling it across additional geometry).
Today what is demanded from a console is much more in lock step with every other consumer device - they do more computer-like things, they can multi-task some and scenes are doing more memory-intensive things so they're more well-rounded, and get more RAM.
[0] http://vignette2.wikia.nocookie.net/vgsales/images/c/ce/Esti...
https://forums.epicgames.com/archive/index.php/t-553976.html
Either way they're very different environments. For instance you usually have a unified memory model on most consoles where on PC you have to shuffle textures across a memory bus to the GPU. Leads you to optimize for different things(although most ports I know of were done with a skeleton team).
Just no. And the steam refund if played less than 2 hours doesn't help. For most games, 2 hours is not enough.
The reason is that if you are interested enough to try the demo, you'll only be swayed to not buy the game if you're dissatisfied, it obtained enough from the demo that you're no longer interested in the actual game. If you're already going to buy, you won't try the demo. In both cases, it's bad for the developer.
Sure, you might realize after 10 hours that it's not as great as you had hoped - but that's still (usually) quite a lot cheaper entertainment (per hour) than buying a CD or going to the movies?
[ed: to clarify, if you had a great time playing a game for 10 hours - even if you then find that it has less replay value, or too little content compared to what you would like - hopefully you've then had fun for 10 hours playing it...]