Monday, July 23, 2012

Pick up Manual? [Y/N]

Instead of writing a long story about project management or Rock festivals & poop, why not do a shorter week-progress-report again, like in the old days?

Asides being a bit sick (thank you for passing the fever, girlfriend) in this stupid country where our summer days are filled with gray rainy clouds for 4 years in a row, last week’s programming was mainly focused on.... excited already? Real-time Global Illumination? Monster Inverse Kinematic animations? Superfast path-finding algorithms? Particle Accelerators?... Better, I programmed how to pick up an object! An old fashioned chipcard-key, to be exact. Spectacular. But don't think this was a five minute job, no no. If you programmed games, or red this blog before, you know that seemingly simple things often Have a whole lot more going on under the hood.

But wait a minute, didn't the "Minecraft" guy in the first T22 demo already pick up an hourglass or something? Yep, but don't forget pretty much the entire game-logic code has been replaced with state-machines and custom modules per object in the meanwhile. So, that code became obsolete, and ever since we didn't pick up flashlights or hourglasses again. But since Demo3 shall show some actual gameplay again, and collecting items is one of those basal game-mechanics... Mario picks up mushrooms, Doom Spacemarine grabs ammunition, Guybrush Threepwood collects all kind of crazy stuff, even damn Pacman already collected orbs. Or something. So, about time to fix this feature again. Including a real inventory screen, though we still need someone to draw the UI for that. Maybe our drawer Pablo knows a girl, but we'll have to wait till she finished her holidays and answers. Making this UI is pretty important though, because I program nothing without having good-to-look-at materials to work with. I'm not talking about that girl, I mean it requires textures, 3D objects, maps, sound or screen menu's to trigger my programming sparkles. Working with temporary “dummies” is like making a cardboard Gameboy for yourself as you can’t effort a real one.
Yet, the ugly "Pick-up" symbol is a dummy so far. Waiting to get it replaced with something good.


Picking up an object sounds like a pretty simple feature to program, and well, it is. But it's not just about "picking up X". It's about interaction with other (living) entities in the game-world in general. A keycard can be "picked up", a lever can be "pulled", an interesting thing can be "examined", a toilet can be "flushed", a guy can be "talked" to, or "smacked in the face" if it was a badguy. Just think about all the available actions you often see popping up in the screen in nowadays screens. These are “context-sensitive”. Stand near a door, and your player gets the ability to open it. The available action depends on:
- Where does the player stand? Where is he looking at?
- Is the player able to interact right now (depends on state/pose)?
- What kind of actions does the target-item offer? A brick probably offers different possibilities than a sexdoll or Enigma computer.
- Is the player allowed to perform action X? Does he have the keys / abilities, or triggered another event?
Questions, questions. And a billion different answers. In other words, "Picking up" is just one of the many interactions the player could have with an item. And how about the way it happens? Doom Spacemarine picked up ammo and chainsaws automatically with his toes when walking over. Guybrush Threepwood had to click an item, then click an action like "look" or "eat". And the (lazy & easy) modern way is to show a button symbol + available action when standing in the right position. Anyhow, there are many ways to interact, especially in a puzzle-like game as T22 where things shouldn’t always be too easy.

But instead of programming each possible action on its own, a more universal system should be programmed. And that's what I did. As explained a few times before, each object in the engine uses a DLL module that "controls" it. Physics, AI, sounds, how it responses on collisions, bullets, et cetera. And so a couple of interaction functions were added as well. Basically, it works like this:

Notice that this is the "normal way". Special objects may require different handling to get interfaced with, or automatically trigger something when approaching it (stepping on a landmine for example). Also notice that not each and every object requires its own specially coded DLL. Most "decorative" or "junk" objects use the same DLL. All doors or all key-like objects could share a single DLL as well, and so on. Each entity in the game has a list of custom properties that can be used to give some parameters. In case of “picking up”, we could tell the id-name of an item, it’s quantity, if it should be removed when being picked up, et cetera.


The last step in the figure is the actual event(s) happening when the operator(player) performs a certain action on item X. Of course, the actual actions again depend on whatever was programmed in that item DLL. It can vary from picking up something to deleting all files in the c:\windows\ folder. And sure, it doesn't have to stop there. There is a constant "ping-pong" between the operator(you or other guys with A.I.) and useable items, being hold together by the engine. For now, this Chipcard just disappears and adds itself to the player inventory. And from there on you should be able to examine it, and, maybe use it. On a door. Or... use your imagination. But we're not that far yet. Let's hope someone can draw a nice inventory first.

Saturday, July 14, 2012

Classified

As your Russian U-boats may have picked up, we're making another demo movie. Another? How about making the game itself, fool! Don't worry, unlike that Radar, the stuff inside the demo is actual game-content. Which also means it will be focused a bit more towards horror then. Don't expect a character running around with a weapon and doing complex interactions, we're not that far yet... Which is also pretty much the reason to make another demo; finding more people. At this pace, Tower22 will never be finished, or limited to a 4 store high retirement home.

Problem with T22 is that the intentions fall a bit between a full commercial game, and the relative simple/small Indy platform fun game. We're trying to accomplish a high quality horror game with good graphics, professional sound, and rich, lengthy gameplay. That goes far beyond the average Indy game that usually bets on just a few small sized, but addictive gameplay elements. Like… launching pigs as far as possible. Programming a 3D engine is obviously more work than a 2D (platform) engine. But also making the contents takes a lot more time. If someone mails me a sword made of 6 polygons with a blurry 128x128 texture, I'll send it back and tell him to shove that thing in his virtual ass. All assets need to look good, detailed, including specific dataMaps for all the shaders we have.

You don't have to be a genius to figure that will cost a lot of time, and filters out a lot of help-offers from artists that either have limited time, or not enough experience. That’s where the ridiculous budgets for nowadays commercial games come from. But here we expect magic to happen for free. Or as we would say in Holland “Voor een dubbeltje op de eerste rang willen zitten" (= not willing to pay more than a dime to sit on a first row seat)... Wouldn't it be smarter to adjust the requirements a bit? Accepting we're not a professional studio that can work 40+ hours per week on a game, having money for Freelancers and professionals? Tuning down the graphics a bit to get rooms and other contents faster done, having a wider choice of people who like to help? Making T22 less tall so it can be realized in a reasonable amount of time? Yeah folks, probably that would be a wise choice. But will I do it? Nah. Of course not.
Improved the glossy reflections a bit with higher-res sampling and blurry blurs. The small picture shows the actual reflection buffer. In the end-result, most of it dissapeared because materials such as wallpaper aren't really that reflective. Quite a lot effort for a stupid green dot below a litten wall.

About 20 to 30 hours are spend on T22 each week. Probably it would double if I would still live with my parents in a stinky bedroom + computer. It pretty much means that if I'm not sleeping, working, doing something with the family, drinking beer with friends, or sporting trying to burn that beer, pretty much ALL free time is reserved for T22. No TV, no early bed, no videogames, no daydreaming with a fishing rod somewhere, no reading books, no time for other hobbies. But I won't complain, because I love working on this project. Too bad other helpers don't spend that much time on T22, but I can't blame them as this project is not a lifework for them. Hopefully it will be one day :) Anyhow, the point is, if T22 wouldn't be the way it is now, I wouldn't spend that much time on it either. If it would be reduced to a simplified “budget” game, I simply wouldn't be motivated probably. And I wonder if the other artists would really like spend too much energy on simple stuff they can do with their eyes closed. Modeling a cardboard box instead of a dumptruck. Composing a monotome 8-bit background tune instead of an orchestra. All of us want to learn and to improve.

Sure, it certainly can be a relief to make something simple, with short-term results. It's like mcDonalds. No waiting, no bullshit, just stuff that hamburger, be happy, and feel like a ho 10 minutes later. But don't be fooled, also a 2D Indy game involves more work than you think. At least, if it's a GOOD one. Quickly setting up a playable framework might be possible in weeks or even days. But making the core elements work really well still requires attractive art, tasty sound and very well tuned programming work. I did quite a lot of smaller games before T22. But usually after a few months, I would get bored. So much effort, for such a small game that doesn't really, REALLY interest me anyway. Tower22 is a much more difficult/impossible task, but I know I will like the results, even if it's only demo movies for now. And that makes it worth to keep going.


Yet, we got to be a bit realistic. All cool and the Gang, but without an end-product or soon-to-be-realized goals, you still have nothing in your hands but dreams. And letting both the team and you (the gamer) believe in those dreams is difficult with such far-away targets. Why would one spend a lot of effort in something that is likely not going to be finished anyway? The irony is that if they all would forget that argument and just start and do a lot, such a goal would be suddenly a whole lot more realistic. But ok, that’s not how motivation works. I always tell the team it requires momentum to get things done. There is a big rusty iron ball laying in the dirt. If you start pushing all alone, you'll break your back. Instead, all of us have to push, at the same time. But once rolling, it's easier to give it an extra push to keep it rolling. Makes sense, but to get them pushing, I still need to explain them why they should push. Preferably I’ll provide sub-targets that are worth doing, even if T22 as an end-product would fail. Learning something new, making a monster you really like. And making a demo movie is also one of those things. It's always nice to show your friends or future work a little "portfolio" movie, right?

As for the longer-term, there are plans as well. But don't tell anybody, these are classified of course:
1.- If the next demo movie is good enough, I'll poke it to a popular games-magazine as well. Hopefully that will generate attention to a wider audience, which hopefully gives us more artists with talent + time on their hands. Because that is what we really, really need right now.

2.- Eventually even more demo's are made if needed. To use as testcases for certain programming tasks, to get more attention, and to please ourselves of course.

3.- Although the game is complex, it does not contain full CG movies, super advanced animations, tons of enemies, complete orchestras, dialogs requiring professional voice-actors and lip-syncing techniques, or ground breaking techniques. Just making the environment & a working engine is the biggest part.

4.- We won't make the full game right away. The plan is to create about one-third of the game (the easier sections first), and release it as an Indy, or even free, game. If received well, it creates possibilities for the second part. If people are wildly enthusiast, getting more (professional) help and a budget should be easier. And if not, a man has got to know when to stop.

5.- You can't buy luck, but money certainly makes things easier. If the progress on the first "episode" is finally going well, meaning we made a substantial part and I’m able to plan forward, I might open the doors for donations (via Kickstarter or something). That's probably not enough to drive cars and feed the family, but if I can pay a few bucks per asset, it certainly helps the artists to reserve some extra time for it.


That's pretty much the Battleplan in a nutshell. But before we get that far, we need to create some game content and that third demo movie first of course. Hey... any new pics from that Demo? I'd love to share everything, but there is a reason why game companies always keep mysterious: reveal too much and it won't be a surprise anymore. Then again, if you show nothing at all, you'll miss the audience as well. People won't wait forever!

Friday, July 6, 2012

Pooptales

Congratz with another football victory Espanol! Since almost half of the T22 team is made of sundried Paco Loco, I got to support them a bit (even though the bastards shattered our World Cup dreams two years ago in the grand finale).

Vacation is over again, time to sweat again till somewhere December. Did we do anything interesting past 2 weeks? Friends & I visited a rock festival in Belgium (Rock Werchter) and there we're some family-duties in Poland. I don't speak a word Polish, so all this ideal son-in-law does is drinking dad’s beer from the fridge. Nevertheless, I did some useful programming while drinking, and observed the remains of the communistic era a bit.
Realtime glossy reflections here by doing raymarching through 3D textures filled with the surrounding scene. Pretty cool, and it runs pretty fast on my 2008 laptop but... the grain artefact stinks like socks. The reason is the reflection is done on low-res buffers with low-res data.


Rock Werchter (though it's more about poop)
-----------------------------------
But let's tell something about that rock festival first. Came and left with a mixed feeling. The line-up was pretty great. To name just a few; Jack White, Elbow, DeadMau5 (not rock, but after hearing guitars all day, you know) and my favorites Cypress Hill and Pearl Jam. Didn't see but also there were the Chili Peppers and another favorite, The Editors. Cool and all, but I always wonder if those artists really enjoy what they're doing, asides living the life of a rockstar, big house, five cars, being in charge. I mean, for us mortals the performance sounds overwhelming and we audience feels flattered if Gary Lightbody sais "Iek haouw vaan joelie" (Love you in broken Dutch). But don't forget these guys play the same jingle every festival. Rapper B-Real is wondering “How he could just kill a man?!” for 20 years already. I guess most of them just play their hour full, say love you, receive their cash, fuck you, and then get out of there ASAP.

Nevertheless, Elbow was crystal clear, Cypress Hill made us feel a L.A. gangster for a moment, Bombay Bicycle Club was also surprisingly enjoyable, and especially Eddy Vedder gave a hell of a show and behaved like a real guitar hero. So, what's the mixed feeling about then? Well, it isn't the music. It's just that I'm not made for the whole camping shit around it (this festival takes 4 days). I enjoyed sleeping in tents 15 years ago being member of sort of a cheap equivalent on the boy Scouts, but those days you didn't wake up with beer-hangovers in a 40 degree sun-baked tent. You would get a (healthy) breakfast and explore the forest or something, instead of sitting in the mud & sun, waiting/hoping to get that headache disappear. And then the crown on the turd; back then our "toilet" (craphole) was shared with 15 or 20 kids, instead of 2.000 drunk-puking- diarrhea men. Do you know Pyramid Head from Silent Hill? Imagine his uh... Pyramid head being made of brown chunky turds, 35 degree Celsius, smiling at you each time you visit the toilet and forgot not to look in the hole. My girl asked me what happened to me when I got back home. “You know what happened to professor Brundle in The Fly?”, I asked here. You would get a fusion with the toilet contents if being in there for more than four seconds. And yeah, if you drink beer, toilet visits are hourly business. If not for pissing, then to empty your alcohol tortured body with one happy rectum bang, like a combi between Rambo on the M60 and the Probotector/Contra Spread-Gun.

All of that might have been bearable if I didn't have a sore back. Don't know what I did, but after a few hours already, the lower-back started hurting, commanding me to sit down. On the mud, pizza-plate, piss, plastic beercup covered ground of course. I came to see artists, not the legs of 80.000 people (although seeing that "forest of legs" around me with Deadmau5 in the air was quite a bizarre sight... maybe an idea for T22). Probably walking around with lot’s bags in Poland, sleeping on a couch, and sitting in a train for almost 20 hours (back from Poland) was a bit too much for my rusty back. Hey, getting a day older as well! Finally, maybe even the whining about dirty campings and a sore back would be gone if I was a true music lover. But I'm not. I listen and enjoy, but I won't shout, dance, or fall in coma when Michael Jackson enters the stage. Over-enthusiast people give me the creeps. So, on day 3 I decided to go home a bit earlier as planned.

Conclusion: Make your own private toilet with wheels, a coolbox, and a cylinder that can pull it up so you can sit, watch the stage, drink, and piss whenever needed. Or a more realistic solution, if you’re like me, just stay for 1 day only when your real favorite artists perform.
Don't mention the black dots, those are just flies. The same technique for Glossy reflections can also be used to sample G.I. and Ambient Occlusion. The low resolution and low amount of sampling rays still make it a bit... unusable. Tried thousand-and-one Ali Baba tricks, but usually the consequences are either bad performance, light-leaking, not suitable for large scenes, or all of it together.


Fear and loathing in Polska
-----------------------------------
Enough Pooptales, Poland then. The first half of the vacation we visited my girls mom and dad again. I'm not really their son-in-law by the way, we're not married (yet). Anyhow, it wasn't the first time, no big surprises this time, so I won't write the same stories about alcoholics, cozy country village-life, and other typical Polska folklore again. But if you are interested, check these earlier posts:
- Poland 2010
- More Poland, and Auswitz

Neither did we see much of the European Cup football tournament being held in Poland & Ukraine btw. Our (sleeping)train traveled through the south parts of Poland, away from the football cities. I kept my eyes open for ugly (Soviet) buildings & flats, which are of course part of the Tower22 inspiration. As said several times before, it's not that Poland is stuffed with half collapsing concrete monster flats and abandoned nuclear silo’s. For one reason, a typical Soviet apartment block isn't that high (8 to 15 stores), at least not here in Poland. Second, Poland evolves as well (luckily), so old crap will either get a facelift or disappears sooner or later. Third, most of the South-West country is filled with dense forest and agricultural fields instead of stinky industry-villages. And the south-central part looks pretty charming actually. In the summer at least. The words "Soviet-village" make me think of decayed concrete buildings, blackened by factory fumes, between graffiti covered metal skeletons of old trucks, tanks, play-yards, somewhere in an extreme cold snowy wasteland. Sure, the connoisseur can find such sights here, but most of the landscape here is made of rolling hills, forest, rivers and pretty charming villages with houses & yards that are bigger than the average Dutch house. Although I must say the winter transforms it in an ugly gray monster. Not that Holland -or any other country- looks that nice below a package of gray rainy clouds, but the lack of maintenance on the buildings and infrastructure reveals itself when the trees, busy street-life and garden barbeques aren't helping. No, for Tower22 inspiration you'd better visit Poland during the Winters. Or maybe autumn, my favorite time of the year.
My vacation photo's, dobre.

It's quite funny that working on a game like this makes you open your eyes. For one thing, I always try to keep track of how things get indirectly illuminated. You know, the ambient-lighting story. But also, from a more artistic perspective, you'll focus on things a normal person would ignore. People must have been thinking "what is that idiot shooting?", when I was taking photo's while the train passed a whole row of infamous large factory red-white striped chimneys that each self-respecting Polish village has. A local just walks by and doesn't notice rusty gas-pipes, graffiti walls or sober apartment blocks. The average Polish guy just looks bored, tired, or "dangerous" in the case of youngsters who still need to overcome their insecurities. Women keep their eyes on shops. Though smaller cities here lack exuberant shopping centra, so women switch over to their second favorite activity: watching & criticizing other people/women. Then a tourist would focus on the good stuff. Rich decorated buildings, mountains, historical remains, et cetera... if there were tourists. Who the hell visits a small Polish village? But my focus is on gray walls, containers, old mining factories, rusty signs, weird stairs going to dark corners in the street a normal person would pass, old train wagons, holes in the pavement, and the ugliest parts a building has to offer. The best sights are the ones where you wonder "why?!". Why are two different color corrugated metal plates used to cover that hole? Why is that door only 130 cm tall? Why is there Zebra-skin wallpaper in this little restaurant room that probably wasn't a toilet first? Probably due the lack of money and urgency to perfectly design things, you often walk into half-finished improvised, charming, erh, junk here.


Polish Urban mysteries
-----------------------------------
But honestly there wasn't that much new "cool inspiration". As said, Poland is cleaning up itself slow but steadily, and been there / done that. Although... a few things are worth a mention:

* The good old Air-Raid.
In a small village like Milowka, the firemen are usually handymen -or something else- doing the fire extinguishing as an extra (volunteer) job. So that means they won't be standby at the fire-station. Instead, the siren has to pull them out of their beds, pub, or whatever they were doing. It sounds quite impressive, and you know shit will hit the fan as soon as the sky starts groaning. Each time I visit Poland there is at least 1 big thunderstorm, and that automatically inherits forest fires, burning sheds, toasted electronics, and thus a cool air-raid.

* PKP, that is Polskie Koleje PaƄstwowe, which is Polish State Railways
The Polish rail network is not (fully) controlled by computers yet. Most stations have two houses next to the track, being used to control the rail switches. One of them being old, deserted, graffifucked and with shattered glass. And another house, being populated with one person, usually an older woman, hanging bored out the window, watching as the train passes by. I wonder though, how often does this go wrong? It looks boring but it's quite a responsible job. Fall asleep, forget a switch and boom. In fact, Poland had a large train accident very recently, killing 16 people. And yes, the cause seems to be a “human error”. But back to those houses… Each time when passing by I wondered why they need a whole building for one or two grandma’s hanging out a window. What’s inside those things? Gigantic levers? Just curious.

* Mysterious towers
Another typical Polish sight nearby those train-houses; these towers;

What are those? First I thought about storage towers for water, coals or grain or something. But the windows on the sides reveal those are just hollow cylinders. Doesn't make much sense to fill these with water. It seems people work(ed) at the tops, but as what? You're not going to tell me they have yet another rail-control building. Operating two or four switches at a small village station doesn't require a house, another abandon house, AND a weird tower right?

* Blockwave gas-pipes
More railway fun, though I think I can explain this one. But enlighten me if I got it wrong. Quite often you can see thick, block-pattern shaped pipes along the railways in cities. Most probably those were/are gas or maybe even oil pipes. Smaller pipes going into the city, tapping from these main pipes? Or maybe transporting gasses/fluids between the stations and factories that are nearby usually. But why this block-pattern? So you can walk or drive under the pipe each 20 meters? Eastern Europe mysteries!

* Church rock
Not much of a mystery, but quite odd for a guy like me nevertheless. Dunno about other villages, but in Milowka, the church plays a song at 21:00. Each day. And each day it's the same song. Something about virgin Maria and the three kings. As you know, Poland is quite catholic (that's why the average Polish man is never drunk and paints like an angel). A church playing music isn't that special, but there is something about that tune. It doesn't sound like Quasimodo & bronze bells. It's trumpet music, sounding a bit sad and triumphant at the same time... A bit like a Saving Private Ryan tune. I like it.



Most of you probably won't give owlcrap about block-pattern gaspipes or why rail switches are controlled in a house, but I'll try to extract interesting little details for our game out of it. The world is full of (rusty) miracles if you look a bit further!