Trial and Epic Fail

Ventures of an indie game developer

Lizard brainz

I haven't done pretty much anything on the game lately. That's probably for two reasons: out of fear and lack of motivation.

The fear part comes from my lizard brain telling me that I'm not going to be able to make the controls engaging, and that thus I'll be wasting my time. So even if I create a puzzle game with a unique game mechanic, it's going to fail due to poor controls. Again. This fear is not unfounded, as this isn't a very improbable outcome.

I also believe part of the part of fear comes from the initial reaction from the maker of Cross Fingers as I e-mailed him for advice on how they made all the levels:
Do you want to steal our game design, or did I miss something??
I explained the situation further and he chilled, but I've been demoralized before by "intellectual property" look-and-feel. It just doesn't feel good if someone thinks you're stealing. It's ok if you say it yourself, and as long as you yourself think you're extending previous work. Sort of like science or evolution. But if someone else says it, it just doesn't feel right. Not for me anyway.

The lack of motivation comes from making a game which is not my best idea.

On the other hand I can get over my fear. And the idea is small enough that I could make it into my best game so far, by far. I think. I need to gain some momentum, the game is not going to write itself. Unfortunately. (This time it would have been nice. Getting old?)

Piece generator

The probably most complicated script is almost done, and as usual it was harder than I had anticipated. I hadn't thought about that very irregular pieces are really hard to visualize in 3D (especially so from a single angle). And I hadn't considered that concave pieces can get stuck. There is still a bug remaining, causing triangles to be lost in translation. But it won't be hard to track down. Here are three generated pieces from a single shape. Good luck in figuring out what the heck I'm up to.




Yesterday evening I thought a bit about how I should design the editor for the upcoming 3D puzzle game (let's call it Impuzzable for now). At first I thought the editor would be able to create only cubes, like a mini-Minecraft editor. But that I think might be too limited. In fact, the best thing about Cross Fingers is the triangles. They allow you to intuitively feel where pieces go, the triangle shapes are an essential part of what makes the game... not so boring. :)

On the other hand, ODE doesn't do prisms (oh, I'm taking it 3D btw, but you probably already realized that). ODE does meshes, but only badly. So I'll try to build physical prism shapes this way:

Thin green lines = 3D physics mesh, thick red lines = cuboids. Four physics shapes per triangle - some CPU-intensive shit! Nonetheless.

That settled, I started thinking about the editor again. This would be my first editor since I was a kid. I used Maya for my past games. Maya is not perfect, but on the other hand home-brews seldom are either. I saw a couple of different options:
  1. 2D editor written in Python, like a simple version of mspaint... like a version of mspaint, but only placing triangles. Editing each layer individually. The editor would export my native format, so nothing much would be required by the game engine itself.
  2. Make a generic viewer/editor written in C++, but which through stdin/stdout or sockets interface with a python script. I'd leave the logic in the python code, then I'd hopefully be able to reuse much of the viewer/editor for further games down the line. This editor would also export game engine native format.
  3. Make the editor in C++ and sort of part of the game itself. This way each level can be played while developing it.
I wasn't content with either solution, but both number two and three included longer iterations as I had to wait for the C++ linker a few hundred times. The first one seemed least bad so far, but even using tcl/tk would mean many days before the editor was ready to roll.

So in the car home from work today I thought to myself: can't I make it simpler than that? What is simpler than mspaint? ASCII art of course! In retrospect it's the perfect choice. The editor will be written in Python, but I'll keep the ASCII-import in C++, effectively making it a level loader. The idea is still a bit unclear, but I think I'll make four different applications:
  • One for generating shapes. Think of it as the outline of the puzzle object.
  • One for splitting the total shape into pieces, like jigsaw puzzle pieces.
  • One for generating a level, loading the pieces, moving them about, then saving the final level.
  • One for timing each level separately. The time will be used for setting level difficulty. And making sure that each level can be completed without bzguz.z
What a relief! I'm not too keen on this game in general, as it's a puzzle game. But most of the code will be a breeze to write, and pretty fun too. But best of all is I'll still have a little energy left when the game is ready for polish.

Open letter to the open sceptic

Ralph Waldo Emerson is often quoted to have said "a foolish consistency is the hobgoblin of little minds." I have been a small-minded fool for a long time, but I'm slowly improving. (If you want to cut that path a bit shorter for yourself, you'd better read this long post. :)

After reading Emerson's wikipedia page I surfed on to this and that and eventually ended up on the Swedish scientist Swedenborg's. What a stand-up guy! He independently of da Vinci came up with a sort of aeroplane. He published a scientific paper, he was a Swedish Board of Mines fellow, he helped construct a number of engineering masterpieces, he was a member in the Royal Society of Sciences in Uppsala and also in the Russian Academy of Sciences in Saint Petersburg, and fellow of Royal Swedish Academy of Sciences. He was offered a professorship in mathematics, but himself thought he wasn't competent.

He was internationally renowned, and didn't stop at innovations, physics and mechanics. He studied anatomy and all the great philosophers of the time. As with most people in the 1700s he studied Christianity. In his mid-fifties he realized a number of controversial things about the mind and the spirit and went on to be a mystic, totally forsaking traditional sciences. Now I know what he must have felt like. The mechanistic world-view totally looses it's radiance when you find something underneath. Something underlying which require totally different theories to encompass the new discoveries.

As I've mentioned earlier I've pretty recently come to realize that there is an afterlife. The evidence behind my conclusion goes something like this:
  1. Your mind is not executing in your brain;
  2. your brain is your soul's API to the body;
  3. your soul does not need your hardware/body to execute.
Before anything else I should say that, although still taboo, parapsychology today holds very high standards with extreme rigor in both statistics and experiments. I'll think you'll agree that it's not hard to imagine what decades of scrutiny from hardcore sceptics does to scientists any discipline. The articles I refer to here on are all peer-reviewed.

The first statement is in fact very easy to prove. This article shows that brains can be made to interact without direct communication. The setup is basically like this: two people meditate together for 20 minutes, to allow their minds to entangle. Then they are separated by sound-proof walls and Faradays chambers and EEG equipment measure their brain activities. One is exposed to 100 light flashes at random intervals, then EEG correlation between the two is computed. No data has been discarded except for segments where either subject moved, causing EEG saturation. Two types of control tests were performed: one without stimulation, one without any person in the room to safeguard against equipment failure. The probability of this happening by chance is 111:1.

This experiment checks if it's possible to detect if you're being stared at. Through surveillance equipment! The two subjects are separated by six or so rooms (map included in article), one either staring at the other through a monitor, or not staring. The result is weighted depending on if the subjects believe it's going to work or not. The article is joint-written by a sceptic and a proponent. Interestingly a conclusion is that your inclination or mindset affects your results (my stuff in color):

Swedenborg himself had a couple of well-documented remote viewings (i.e. experiencing things at a distance in time or space). This archaeological experiment in Egypt show the level of detail that can be produced with two good remote viewers at hand. The target site was Marea, an ancient city unknown to all but a few archaeological pros. The researcher performing the experiment was blind to the facts to avoid cold reading or such. Neither viewer had been to Marea, and were not beforehand informed that the project was taking place in Marea.

The lead archaeologist was a sceptic, thinking that it would be preposterous that remote viewing would succeed where sophisticated electrics had failed. He believed that if there was anything at the site, it would be the Roman acropolis. The two readers were instructed to:
  • locate the ancient city of Marea. They were told it could be found within a square 24x24 km;
  • locate a building within the city that has either tile, fresco or mosaic in it;
  • In the building, locate the walls, the windows, the doors, and the depth at which the floor is found;
  • describe artifacts or conditions within.
The first remove viewer, McMullen, had a go.
  • Locating the city.
    • McMullen placed the city on the map, and when transported to the site he provided a reconstruction of the city. What's the odds of that? They drove him by car to the site.
  • He walked without hesitation up on a hill without any visible remains of a building. In the sand on the hill he sketched the outline and corners of a building beneath the sand containing several rooms. He set stakes in each corner and one for the door opening, and also stated that the building was part of a larger complex.
    • After excavation the corners set were found to be located within inches, door opening was exactly where he said it would be. The building was part of a larger complex.
  • He located walls and indicated that the culture which had built it was Byzantine.
    • It was late Byzantine.
  • He said the depth below ground to the top of the walls was three feet.
    • They were four feet deep.
  • Indicated there were debris dropped there after being taken from a different structure.
    • Masses of pot debris uncovered.
  • Said the west wall would have tiles on it. He said the floor would be 6-10 feet deep (although he said "I can't see the floor"). Later he stated that the floor would be marble, smooth on one side, rough on the other. The tiles were set in a chalky sub-flooring. The tiles were square 5/8 of an inch across and one color each. The tiles had be laid in a colored pattern once.
    • No floor tiling found at first, but a hard chalk sub-floor was found. The lead archaeologist's assessment was that the covering floor had been stripped away. Later 11 round quarter-sized marble tiles were found, each in either red, black or white. Each smooth on one side, rough on the other. No wall tiling found, but it's not hard to imagine that it was stripped along with the floor tiling.
  • He said that green would have been the most prevalent color, although he reported others.
    • Substantial amount of green tile glaze found. Green color definitely standing out the most in a desert environment.
  • At 8-10 feet there would be a ledge running around the walls.
    • In most rooms ledges were found at 9 feet.
  • Something would be found associated with baths or bathing. Also, after excavation had started (but not finished) he stated one part of the structure had to do with head and fire. And he also said that the building was generally Roman, but the earlier observation was equally accurate to him.
    • Pieces of marble and a hydraulic mortar were probably debris from earlier Roman baths, which were currently excavated "down the hill."
The second remote viewer, Hammid, had gotten nausea from waiting in the baking desert sun for McMullen to finish, so she was taken directly to the site.
  • Hammid walked to the same hill, said the building was buried under the sand there and outlined the northwest corner.
    • Highly accurate northwest corner, exactly coinciding with that stated by McMullen.
  • She described walls, multiple colors but especially green. Tiles on the wall, possibly green. Said the building had multiple rooms. A sense of bathroom, something to do with baths and washing. A colored design laid polished stone floor, possibly in marble.
    • Accurate and/or coinciding with McMullen's viewing.
  • She saw an alcove containing a broken column or statue, and something round and free-standing but not complete.
    • An alcove containing a free-standing, broken column with a round top was found. The column was definitely not part of the original site and it was the most confusing to the archaeologists, and the least probable to have been anticipated.
I urge any sceptic non-archaeologist to put a dot on a map, go there, tread up to the best dune you can find and start digging. Don't forget to guess the color, depth and shape of what you'll find beforehand. E-mail me when you've found anything ancient. I shan't be holding by breath.

What's the overall risk of lab-controlled experiments being bogus science? According to this meta-study in ESP the risk that the outcome of 108 studies in Ganzfelt is by chance is 18861051:1. The risk that the result in 37 studies in Anticipatory responses is chance is 2.9x1013:1.

So if science can prove that the mind is reaching outside the brain, and it is neither sound nor an electromagnetic field, then what? Whatever it is, it's not confined to your scull.

My next claim is that the mind uses the brain as the API to the body, what's the basis for that claim? Terminal lucidity is. That article is plain psychiatry and neurobehavioral sciences btw, no new age mumbo-jumbo there. The term is coined from the unexpected return of mental clarity shortly before death in patients having severe psychiatric and neurologic problems. The stunning examples range from brain cancer to schizophrenia; some have been in catatonic state for years, then suddenly become normal shortly before they die. One former nun went raving mad, and was admitted to an asylum. Three weeks before she died she was completely normal. Which might be said to be strange as her brain was so swollen that the cranium could not be closed after autopsy; "[t]he blood vessels were engorged with blood, and the brain tissue itself was unusually soft."

They seem to have personality outside of their brains, don't they?

Near-death experiences (which of course is also well documented by materialistic science) show that a lot of people around the world have similar experiences. They almost die, come back, get better and tell about what they've seen; mostly it's cosy and nice. The new part for me here is "Peak in Darien", i.e. people who almost die, meet someone on the other side whom they don't think is dead, return and tell about it, then find out that the person had just died. Random dreams by coincidence? Well, when the EEG flatlines you're not supposed to dream, are you? To me this seems like the mind jacks back into the brain.

Finally, my third bullet. I've already touched upon it in the last paragraph, but here's the bulk of new age: the spiritual mediums. How about this article?  In one of the experiments a photo is sent to a medium, and no further information is transmitted. The medium does a reading, the reading is recorded and transcribed. To each "sitter" 6 transcriptions are sent, where 1/5 is their own, and they rank them. The experiment resulted in a z-score of -3.89, which means the risk that this happens by chance is 1 in 10k.

If you have four more hours to spend, sneak a peak at these videos:
Today I met a friend who had obvious spiritual abilities, but refused to believe it. ("I know it's impossible to explain that the deep freezer moved several meters in our basement by itself!!!") I for one need a bunch of evidence to believe, but I'm not ignorant. Swedenborg was way smarter and came to this conclusion by himself. Only little minds consistently agitate for materialistic science though evidence is staring you in the face.

Buggy boy

This is me attempting to make the pieces schtick to a "grid" using this algorithm:
const vec3 inp = ...;
vec3 outp;
outp.x = int((inp.x-0.25) * 2) * 0.5 + 0.25;
outp.y = int((inp.y-0.25) * 2) * 0.5 + 0.25;
outp.z = int((inp.z-0.25) * 2) * 0.5 + 0.25;
Looks more like I'm shuffling cards than putting together a puzzle. Trial and epic fail, as always.

I also realized that I couldn't use arbitrary meshes as collision volumes, as ODE can't handle triangle-vs.-triangle collisions very well, as opposed to convex volume-vs.-convex volume. But perhaps that limitation isn't all that bad. I really want to use diagonal shapes (in 2D space, in 3D space would make the game too hard I think), but I'll just have to make sure they're all composed of cuboids.

I think I'm finally seeing the benefits of using my own game engine. This simple prototype contains simple rendering, ray picking, physical 3D movement and collision detection, iOS portability out of the box, importing gfx+physics pieces hand-made in Maya (I'll eventually generate the shapes) and a good level of configurability for things such as physics settings. In two evenings and about 330 lines of new code. Generating the pieces and the "environment" will be the hardest. Then look and feel. Then generating some 500 or so levels. And finally all the screen shots, icons and splash screens. If these tasks each take a week and no others pop up, this game should take four weeks to make. X-mas hit?

Alarm functional

I finished my homebrew security alarm some months ago. Or so I thought, after the initial smoke test. So this summer we turned on the alarm for the first time and left home to go swimming in a nearby lake. When we returned home after four hours the alarm was buzzing and had done so two times since we left. I've mounted the horn on the outside of the house, so the neighbours had duly noted the false alarms. They weren't too happy about it.

My initial reaction, as always, is to blame someone else. I e-mailed the IR sensor manufacturer and got back
... check your power supply for noise
- Mhm, I thought. So much for support. But a couple of days back I pulled my finger out and tried a software approach instead. I use signal sampling instead, i.e. 50+ hits means sensor activated, instead of single hit. Voilà, everything works! (Or at least with a chance of 268435456:1 if we assume the conditions are the same as this summer. Which they're not, we had an exceptionally hot summer. Climate change. Where was I.)

Alarm works, my homebrew internet radio/music player works and my Wi-Fi auto-off works. The last one is a miniscule hourly cron job on my Ubuntu server which curls to my DSL router once an hour and turns off Wi-Fi (if on). It's not that I'm hostile towards technology. Ok, maybe a little. There are two main reasons for this invention:
  • I'm afraid of the radio waves generated,
  • if you prefer to use the iPad to surf on something, it should be a deliberate act where you first take the time to go the the router and press "Wi-Fi on".
I don't believe surfing or watching Youtube on end is any good for one's well-being nor for the general level of education. Sure, you'll see tons of new stuff if you spend a day surfing, but you never go into detail the way you do when you read a paper book or article. And pretty much the same way TV works, there's a rubber-banding effect where your brain wants more, but which steals humongous amounts of time from mindfulness, exercise, working with your hands and so forth. Less being more, this too is a good hack of mine which I'm proud to run at home.

No gamedev lately, but at least I've reset my intentions. Next game (after some refactoring) isn't going to be an MMO. Possibly the next one thereafter. But the next one might just be a 3D version of Cross Fingers.

Cross Fingers is an exceptionally simple 2D puzzle game, in the most original sense. If I make a 3D clone if it and call it something like "IQ", it could actually sell! And it's so tiny, it would be a shame to not do it. I think I will, but not today. Today I'm simply going to enjoy my hacks.

Radio and muzak

Got a wounderful little headless radio going at home now, and felt like I just had to get a pair of Cambridge Audio Minx Min 11's:

They're tiny, but with tremendous sound.

Want to take the software for a headless spin? Download the binaries and mplayer.exe and unpack to same folder. Then it's just to run AidBand.exe. Press [F4] to start playing your favorites playlist, for instance.

Currently only Swedish public service radio is supported, but it's a piece of cake to add more. You simply add a (publicly available) streaming mpeg URL to a text file. Done. The source code is available on github. Some 700 lines, packed with stuff like a remote telnet-style control, various playlists, using Spotify artist search for filling your playlists, using Microsoft Speech to let you know what's going on, building .exe a file, etc. Go crazy!

About the author

Min bilder
Gothenburg, Sweden