John Carmack Profile picture
May 19, 2021 7 tweets 2 min read Read on X
Before the iPhone existed, I worked on a few games for what were called "feature phones": Doom RPG 1&2, Orcs&Elves 1&2, and Wolfenstein RPG.
Qualcomm's native-code BREW platform had better versions, but I haven't seen any emulators and archives for it, so they may be lost at \
this point. The J2ME (java mobile) versions are still floating around, and can be emulated.
My son wanted to get O&E2 running, so we set out on a little adventure.
Kemulator ran the game, but audio was glitchy and it hung after you died in game. Well, we are programmers, we \
should be able to fix it. Unlike most emulator projects, Kemulator turned out to be closed source abandonware, so we moved over to freej2me, which is a live github project.
The hang didn't happen, but audio was even worse. Missing sound effects was a simple bug fix -- \
MIDI sounds weren't seeking to the start on replays. We will submit a patch. Still, everything was glitchy with audio underruns.
We noticed that the emulator was taking an absurd amount of CPU, despite the game being built for <100 MHz mobile CPUs. \
We spent a frustrating afternoon exploring java profiling tools, but finally, Flight Recorder and JDK Mission Control pointed out the root cause: explicitly invoked garbage collection. A vague memory of having to call system.GC() every frame to avoid problems on some mobile \
phones bubbled up. We couldn't change the source on the game, but the jvm has a handy option -XX:+DisableExplicitGC that fixed everything right up.
This is an interesting case where an operation is >10x slower on a modern computer. \
A GC sweep on a phone with 128k of heap is a very different thing than a desktop with a multi-GB heap.
Some old writing about the early cell phone work:
web.archive.org/web/2006050217…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with John Carmack

John Carmack Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ID_AA_Carmack

Feb 17, 2023
Skyfi.com is a startup that lets you order a new satellite picture taken like you are a movie government agency, but on the web for $175. I got one for fun, and a day later I had a 7k x 7k image sent to me. It looked good on opening, but when I zoomed in close,\
the pixels looked terrible, with saturation, gamma, blocking and stretching issues. I was pretty sure I knew what most of the problems were, so I got in touch with the developers, and everything got sorted out in a few days (they were already aware of some issues).
Startups are so great like that — see a problem and just FIX IT THAT WEEK. The time to deliver a fix to VR users at Meta was often over six months, disregarding all the problems that were just ignored. Note that Facebook ran like a startup for an unusually long time. I heard \
Read 4 tweets
Jan 24, 2023
This is an example of an “object culling” bug in VR Shell, but it is an error that you can see in a lot of 3D software outside the battle tested engines. You want to avoid wasting time drawing things that won’t be seen, so you typically first do some calculations to see if a \
rough approximation of the object, usually a bounding box, would be off screen. If so, you don’t draw the object. That is straightforward for static objects, but more complicated for animated ones, where just calculating the bounding box can be a lot of work. In this case, \
I thought the bug was that the culling was only looking at the headset position, without taking the entire avatar bounds into account, but it is weirder than that — it only does it when we are sitting on the floor, and not standing. Not sure what is going on. \
Read 4 tweets
Jan 9, 2023
When I first started getting successful in my 20s, I went through a period where I loaned money to anyone that asked me. Well into six figures went out — “emergency” expenses, start a business, make a down payment, etc. Most of the people just never spoke of it again, and \
I didn’t press them on it. It was a learning experience for me, calibrating some general people behavior. I don’t think anyone intended to not pay me back, but things often just don’t work out the way you plan. To my surprise, nearly 25 years later, one of the larger debts has \
been repaid. @americanmcgee was a close friend and co-worker on Quake, and I often fronted him “advances” for various reasons. He wound up doing game development in China, and I wished him well, but I only had sporadic contact with him. I am very much a “water under the bridge” \
Read 5 tweets
Dec 17, 2022
I resigned from Meta, and my internal post got leaked to the press, resulting in some fragmented quotes. Here is the full thing: facebook.com/permalink.php?…
As anyone who listens to my unscripted Connect talks knows, I have always been pretty frustrated with how things get done at FB/Meta. Everything necessary for spectacular success is right there, but it doesn't get put together effectively.
I thought that the "derivative of delivered value" was positive in 2021, but that it turned negative in 2022. There are good reasons to believe that it just edged back into positive territory again, but there is a notable gap between Mark Zuckerberg and I on various strategic \
Read 4 tweets
Dec 2, 2022
I learned from @fabynou ‘s book amazon.com/Book-CP-System… that the arcade system had rarely used, dedicated hardware to render star fields. I have considered that in VR — there is no way to render “perfect” star fields today, because the compositor will distort anything you render\
In such a way that the point light stars will not be the perfect 4 pixel linear distribution regardless of what you do. “I could fix that” lurks in the back of my mind when I see an occasional space game, but I know it would be ridiculous to define and support an interface.
Stars are perfect point light sources to the eye, they will not cover multiple pixels unless you are doing an intentional bloom effect with a max-value core. You can have dim single pixel stars, or larger max-value stars, but don’t draw large, dim stars!
Read 5 tweets
Oct 19, 2022
A few years ago, in wildly out of character behavior, I attended three rather exclusive private tech gatherings. I was kind of surprised to find them worthwhile. I met some really admirable people at them, and the interactions were qualitatively different than e-mail/twitter/etc\
\ I feel I benefitted from them, which brings up the question: should I go to more of them? I have a deep mistrust of anything resembling going on a “convention circuit” instead of actually working, and I mourn any work week with a hole shot in it, but, again, I got value there.\
\ Many similar offers are open now, and I am currently turning them all down, but I am unsure if I am making the right call. Even if you have strong hermit tendencies, I would advise you to give one of these things a try if you get an invite.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(