12/18/2014

One of the biggest problems with creating a PC game is figuring out what resolution to use, and how to give the users the same, or at least a very similar, experience regardless of the size of screen with which they view the game.

Of course if you're doing a 3D game, the user is usually just picking the size of the viewport, and the biggest issues you will have with screen resolution is the placement of the HUD (short for Heads Up Display) elements. The article will focus more on 2D games, with some principles that can be applied to HUDs as well.

My previous approach on Plethora 2012 Disclosure was to scale the graphics based on the user's resolution. This gave consistent sized objects on all the included resolutions, but had the downside of a limited number of different resolutions, and graphics that didn't look their best on anything but 1920x1080. The problem is, if you are scaling a 4 pixel graphic to ½ size, you get 2 pixels, but if you're scaling a 3 pixel graphic to ½ size, you are going to get 1 or 2 pixels, depending on which way the number is rounded off. There are no half pixels! Heheh So only graphics that have no single pixel edges are going to look right. Simply scaling the graphics gives a strange aliased look, like the graphics are wrinkling as they move. So this approach worked, but it made my graphics look worse and I don't need any help making my graphics look bad, heheheh

There are so many possible resolutions, I had no idea which ones to include in Platfinity, and realized the best solution was to make it so the game would work no matter what. The solution I came up with was to make the interface fit into the smallest common Windows desktop resolution, 800x600. Yes, I know almost no one in the entire world uses that small a resolution on a desktop or laptop, but you have to consider there are netbooks out there that can run at 800x600 or 1024x600, like the popular Acer Aspire One. So there would be a few, and there's no reason Platfinity wouldn't run on a netbook.

The first thing a game should do, and I'm not sure why all games don't do this, but as of 2014 they still don't, is to figure out what resolution the user is already using. In Platfinity, I did this with a system call to figure out the desktop resolution. This is a default highest resolution the user will be comfortable with, and gives us our native resolution. For the biggest group of people, this will be 1920x1080, or HD 1080p. The second most popular resolution is 1366x768, or what I think of as typical laptop resolution, if we're cutting things to their lowest common denominator. Nearly 60% of resolutions are 1920x1080 or 1366x768, so we can just support those two and a few more and we're good, right? WRONG. We need to realize, that in the PC market at least, there is always going to be someone out there with a weird resolution. You can't even count on 16:9 ratio, as there are a lot of people out there still running 4:3 monitor setups...and you need to support these people.

But in order to support potentially everyone, we have to figure out a baseline, or the absolute lowest resolution we're going to see. In 2014, that's 800x600. I would be very shocked if you found anyone running their Windows desktop at 800x600 unless it's a netbook, but it makes a good baseline. You may see 1024x768 or 1280x1024. And there are a ton of additional resolutions that are not too far from these. What do these numbers all have in common? Just about any graphics card in the world is going to support 800x600. And 1024x768 are supporting the x768 in the most popular laptop resolution, 1366x768.

So what have we learned from all this? That 800x600 is the absolute minimum, but also that the Y figure is rarely greater than 768. And at the most, it's 1080. Sure, there are 1200 Y configurations out there, but aren't they going to be used to letterboxing at the bottom on all these games designed for 1080p? The point is, we need to plan for 600 to 1080 Y pixels. And 800 to 1920 X pixels. Looking at this, we can see the X pixel difference is much bigger, and will be much more of a factor in our design considerations.

OK, so what can we do - I.E.: get to the point - to solve these resolution problems and make just one game, or write code one time that will work regardless of the user's setup?

Step one: make everything based on the center of the screen. This may seem incredibly obvious, but the first thing you'll want to do, once you've figured out the user's native resolution, is to figure out where the center of the screen is. Then you base everything on this. In Platfinity, resolutions from 800x600 to 1920x1080 are supported, regardless of aspect ratio and with no resolution menu. All of the interface elements fit into a 800x600 space. So no matter the size of the screen, the interface still works correctly. All of your graphics X,Y locations should be relative to the CenterX, CenterY location you get by DesktopResX/2-1, DesktopResY/2-1. Everything is drawn at a location offset from the center X,Y and nothing in the interface is outside the 800x600 area that you can guarantee every user will have.

Step two: figure out where the edges are. The top left edge is going to be 0,0 in most cases. The bottom right is going to be DesktopResX-1, DesktopResY-1. Things that go on the side of the screen move inward from these positions. Text starts on the left and goes to the right, so text can be set to zero on the left but is X border minus len(text) on the right.

Everything in your user interface is going to be set to the edges, or offset from the middle. Use variables for every positioning of anything in the interface, that way anything can be moved, and everything is based on the center of the screen or a known screen edge.

The playfield in Platfinity is 1920x1080. The character stays in the middle of the screen, as if the 'camera' is focusing on the character. There are two levels of zoom, 2X and 4X. Regardless of the level of zoom or the users screen size, the playfield scrolls around to show the visible pixels. If the character approaches the edges of the playfield, the playfield stops scrolling to avoid showing the empty pixels off the sides or top/bottom of the playfield. The offset from the side of the playfield to the character's position is calculated for each resolution, and everything is based on the same math regardless of the size of the screen the user is viewing the game on. When editing, the mouse cursor scrolls the screen when it gets close to the edges, so the user can place objects or tiles anywhere, no matter how small their actual screen resolution is. None of the numbers are hard coded, so they work in any case.

I hope this gives you some ideas on how to solve your resolution problems with PC games. I think some of these same principles could be used for Android games, as there's a great variety of different screen resolutions on there too, or on web based games that may be played on different browser setups.

10/28/2014

A probably rambling explanation of where the idea came from for Platfinity, and how it developed into what it is. I have noticed that people were not that sure what Platfinity is, or what it does, and I thought I should write a bit more about it in case anyone is curious enough to read about it and learn a little more about it, how it ticks, and why. This isn't going to be sales text, so if you're wanting me to talk you into buying it, you'll have to scroll down to the bottom and click on the link to buy it. While you're downloading it, scroll back up here and read this. I'll wait.

OK, then. I was reading an article written by one of the people who worked on Legend of Grimrock. He was talking about how he was able to edit the game while he was playing it. He could go into the code, change a bit of code, and the game would automatically update and he would be playing the changed code, without having to wait while the game recompiled. I thought this was an incredible idea, and I was jealous of that feature, having to go make a tiny tweak to my game – at the time I was working on a shmup – and then rebuild the code before I could see if a 5% change was the right amount or 7% would have been better, and then try it again with the other number. Anyway, the shmup crashed and burned on the altar of your-graphics-aren't-good-enough-so-who-cares-if-the-game-plays-great-and-is-lots-of-fun, so I went back to the drawing board. We all saw MineCraft and how everyone loved it and I thought well, obviously, it's just Legos with you walking on top of the blocks. So I got thinking about how everyone loves platform games and thought, what if you could do the same thing in a platform game? What if you were in the game, running around, but you could change it around the character? What if you could change the character? So I started thinking about how to reduce a platform game to its simplest components, like the essence of what a platform game is.

I was very inspired by the Platformance games, Platformance Castle Pain and Platformance Temple Death. They were both single screen games that could zoom out to show the whole level, or zoom in to show a closeup view, focusing the camera on the character. The also rely on a popular platform game mechanic, checkpoints. When the character is defeated, they go back to the last checkpoint. There are unlimited lives, and the challenge becomes completing the level at all, and then completing it with the least number of deaths. This quick restarting mechanic is used in Super Meat Boy, and about a billion other games. It allows very challenging areas that just wouldn't be fun to play if you had to run through the whole level to get to the part you were stuck on.

Having figured out the essence of what a checkpoint based platform game was, I started figuring out what elements to include, and what to cut out. I wanted the game to be as fun, user friendly and easy to use, that my daughter, who was four years old at the time, would be able to use it. I also wanted it to be powerful enough that what you could do with it would be nearly unlimited. I came up with the idea of the Toolbox. You simply Right-Click your mouse or press the T key to open up the Toolbox. Click on something in the Toolbox, and then click in the game to place it. Move the character and you're playing again, click the mouse and you're editing, move the character and you're back to playing. Everything pauses when you edit, and resumes when you move the character.

Everything in Platfinity is drawn in order, so each layer is drawn to the screen and then covered with the next layer. This way you can sandwich your character in between the background and foreground, so he or she or it can walk in front of a wall or into a building and look out the window at you. You can edit the background or simply load a background you have made. The Background is 1920x1080, or 60 tiles by 34 tiles. It doesn't matter what your screen resolution is set to, Platfinity automatically changes its resolution to match your computer, and scrolls to the edges if there is more to see. It also knows better than to show the black area on the sides, and if your character or your mouse cursor goes there, the screen stops scrolling. The next layer is Background Tiles, as it's a lot easier to fill in the background or sections of the background with tiles. Next up is the Normal Tiles. These are the tiles on the same level as the character, can be any shape, and have collision with the character. In short, the character 'walks' on these tiles. Special Tiles are tiles that do something when the character touches them, like checkpoints, ladders, warp points and the like. You change the Properties of the tile to change what the tile does. Hazard Tiles are any tile that hurts the character, like spikes or lava. Platforms, Moving Hazards, and Rotating Hazards are Objects, meaning each one of them is a separate entity. Each tile in the game shares the same properties as any other tile like it in the Toolbox. Each Object in the game has its Properties set up when placed on the game screen. Platforms can move and can be placed anywhere, not just on a the grid like tiles. Moving Hazards can be placed anywhere and move, Rotating Hazards are similar but rotate, so you can have stuff like pendulums and sawblades or out of control Ferris Wheels. The character graphics, like anything else in the game, can be changed into anything you want. Animation frames were limited on purpose, so people could focus on the fun of making a character, instead of drawing a ton of pictures over and over. Foreground Tiles go in front of everything, and if their colors are transparent, the player can look through and see the character , so you can make windows, or water, or haze, or an old TV effect, like I did in the first part of 8 Bit Love Affair. You can add your own sounds and music as well. Graphics can be edited with the easy to use paint tools provided, or loaded from the disk. The game automatically saves your work when you quit the program, and when you start it again, it loads everything back in just as it was. To share a game, you simply copy the game folder. When you run Platfinity, the game will be there in the load menu.

People have said they aren't sure what Platfinity is, is it software, is it a game maker, is it a game? And I guess the answer is it's all of the above. It's like Pinball Construction Set and Platformance had a baby. It's like RPG Maker for platform games, it's like Game Maker with all the boring and un-fun parts taken out. It's a game that you play while you make it. It's like drawing your own game. It's a platform game with infinite levels. It's a game, it's a construction set, it's a game creation system, it's a toy. It's something different, and I think, something very cool. I think we've got to the point where all games are fitting neatly into a genre or a category, and people don't know what to do with something they can't immediately understand and compartmentalize. It's kind of like asking what do you make with Legos? The answer is whatever you want.

Over the years, so many people have told me they wanted to make a video game or computer game. I believe that most people have ideas for making games. If people know you make games, they usually ask how you do that or how did you get into that or what do I need to learn to make games? So I hope what I have made gives some people a chance to make their own game, or another way to be creative, or another toy to play with. I've made a few demo games with Platfinity, because I wanted to show what it can do, and some of the effects you could achieve with it. But I'm really mostly interested in what people like you out there will make with it. I'm sure there are things I never thought to do with it, and adventures you can create that will blow me, and everyone else, away! And I'm looking forward to playing them :)

07/17/2014

Just a small one this time. Sometimes I have stuff in my head and it's nice to post it somewhere just to get it out :)

Upgrade items and their effect on gameplay----------------------------------------------------

As I see it, an upgrade item such as those given with a pre-order or other day-one DLC option has one of three possible effects on gameplay.

1. Item has no effect on gameplay.

2. The item makes the game easier.

3. Without the item, the game is too hard.

1. In case one, the item could just be cosmetic, but if the item does not give at least a perceived advantage, why would the player want the item?

2. In case two, the item makes the game easier. Often these items make games, which are already tuned to be completable by the largest number of players, too easy.

3. In case three, the game has been tuned to be too hard without the item to encourage players to purchase the item. The danger in this case is that the player will become frustrated with the game and stop playing it instead of paying for the upgrade item. This type of players are likely to give a game low scores or complain about the game on forums.

I believe the only viable option, and the one chosen by 95% of developers, will be option two: makes the game easier. The pitfall here is that some players will be put off by the too-easy difficulty. This must however be a minor concern, as players rarely complain if a game is too easy or an item they are using is overpowered. The evidence of this is pretty much every multi-player game, where players routinely spawn camp new players and obliterate them with superior equipment and skills. No one in online games ever seems to complain that the 'noobz' are too easy to kill.

02/06/2014

So, talking to people recently, I have noticed there are a variety of different feelings about 'cloned' games and even more varied opinion about whether or not certain games even are clones. I'm afraid it isn't going to be easy to ever come to consensus on what a clone is, and it will inevitably become a quagmire of argument, so I will side-step that part of the discussion by simply saying you know one when you see it. You can have a cartoon of a duck, a stuffed animal of a duck, or a photograph of a duck. I hope we all agree those are 'ducks'.

Instead of getting lost in semantics, I'm not going to talk about what clones are, I'm going to talk about why they are bad. I frequently see statements to effect "So what is Dumb Bird is a clone of Stupid Bird? How does that hurt anybody? How is that hurting the game industry?" I'm glad you asked.

In the process of making a game, What is the difference between making a completely new game, versus remaking or copying Space Invaders, for instance? The difference is we already have Space Invaders, it already exists, so any time we have a question about how our game should look or how it should play, we just look at Space Invaders. How fast should the bullets go? How fast do they

go in Space Invaders? How fast should the aliens walk? How fast do they walk in Space Invaders? No one is ever accused of cloning football when they make a videogame of football. That is because football exists and the point of computer football is to copy football as closely and as entertainingly as possible.

Most game developers can make a Space Invaders game pretty quickly, and the same goes for cloning a farming game. All of the design questions are figured out, all of the game feel should be the same as the successful example. So it is much quicker to make the copy, as there is no pre-production, no figuring out how to do anything, no experimenting and failing. No prototype to build. The prototype is the game you're copying. There are no failed mechanics or features that need to be cut, as every mechanic and feature was tested in the other game. So what is it that a cloner has stolen?

R&D. Research and Development. The original game creator has spent hours, months, even years working out gameplay, formulas, graphics proportions, and a myriad of other things that pretty much nobody but a game developer knows about or can see. From the initial idea, to the game mechanics design, to the layout of the game, to the way it actually plays, all of these things take time and effort when creating something new. It's this time and effort that is being stolen. Cloners do zero R&D. They just look at whatever the best selling thing is, and copy it the easiest way they can. There is no honor in this. It's about as morally bankrupt as you can get. It's not illegal. That doesn't mean it isn't wrong.

So who is to blame for all of this? Why are cloned games so successful? Why do they often make more than the games they are stolen from?

Most users don't know what a clone is. If the game is a copy of an older game, they have most likely never seen or even heard of the older game. Many of these people have only a few games. They do not recognize game mechanics from other games because they have simply not played other games. When shown a game and its clone side by side, they often do not see the similarities. They

will point out any difference. "This one is ninjas and that one is pirates!" They will defend the game they like, the one they play. Especially if it is the clone. It's a fool's errand to try and educate the users about this issue, because they simply do not care.

The users don't care if a game is a clone.

The users don't care if a game is a clone.

Yes, I wrote that twice, that's how important this statement is.

The users don't care if a game is a clone.

Read that statement over and over until you have internalized its message. You know who cares if games are clones? Game developers. My informal research suggests it may be only game developers that care. And I'm pretty sure game developers aren't the cloner's target market.

And it is the users that ultimately spend the money that makes a game successful. It is the users that ignore a game and make it a failure. Like it or not, all of the games that you love, the ones that you talk about with your friends and have inspired you in your own game development, were all successful. They are the ones you've heard of because they made money. They were successful because people liked them and spent money on them.

So what to do? Giving up is certainly an option. That's what I feel like doing when I see a really dumb phone game or a clone game attain massive success. Become a cloner yourself? That's nothing I've ever wanted to do. What's the point of making games if you aren't going to contribute anything? There is no easy answer. For me, I guess I will just keep making my games, trying to make something new, trying to further the art form in some way, watching others copy my work and find more (monetary) success than I do. But hey, if my game is well known enough to be copied, then I must have done something right! I hope you enjoy my games. I hope in thirty years people will talk about them fondly like we do about 80s arcade games today.

12/11/2012

One of the rumors going around about
the next generation of game consoles is that they will include some
sort of technology to block used games. There are various methods
discussed, but they all come down to forcing consumers to only buy
new games that they cannot resell. I'm going to try and explain why
I believe this will be a disaster for consumers, the console makers,
third-party software developers, and the environment.

Let's start with the most obvious
effect. Game sales will go down because the risk of getting stuck
with a bad game will go up. Only the top few games will have
respectable sales, because they are known hits. If you thought
innovation was low now, wait until people have to decide if they want
to buy a $60 game forever. Weird games, stuff like Cubivore,
will have no chance of being made. “This looks cool, maybe I'll
try it” will turn to “I can only afford just this one game, so
I'd better buy one of the top ten games.” This will crowd out
third-party developers. More on this is a minute.

Piracy on consoles will increase.
Because pirates feel entitled to try out games before they buy them
and generally react negatively to any restrictions put on their
software, they will have a ready made excuse to not pay for games.
“They aren't playing fair, so why should we?” will be the
mentality. “I don't want to be stuck with a bad game.” will be
the excuse.

PC Piracy will get even worse. Because
PC games are generally easier to pirate, any game that is available
on consoles and PCs will be “tried out” on PC. Many of these
players will try the whole game, and then decide to buy it on neither
platform.

Innovation will die a horrible death.
Any game that isn't an instant hit will disappear. Why? Because if
a game doesn't get instant traction, it will fall to the wayside and
production will stop. Game makers will make only games they know
will be successful. Too many sequels now, you say? You haven't seen
anything yet. Also, people will stick to first-party classics,
making it very hard for third-parties to get by.

What if you want to buy an older game?
And I don't mean something from five years ago, I mean something from
earlier that year. You can't, because you will have to buy every
game right when it comes out. Console games are made by the console
owner (Sony/Microsoft/Nintendo) in giant batches. Basically, you
order 30,000 of them and then if those sell you order more. So once
an initial set has sold out and demand slows, they will not make any
more! This means if you want to play some old obscure game like Mr.
Mosquito or Chulip, you can't because they have all been sold
already, and even if their owners don't play them anymore, you can't
either.

New game quality will suffer. They've
already got your 60 dollars, why should they care how much you hate
the game and how broken it is? As long as it passes Sony, Microsoft,
or Nintendo technical requirements and ships, we can ignore every
game breaking bug or annoying exploit that comes up. This is a
bright spot for marketing people, because if you thought every game
was hyped as having a living, breathing world and being an alternate
universe where even the rats have sweat glands, again, you aren't
prepared for what will happen with no accountability once the seal on
the package is broken (or the folks at GameStop did it for you).

How does the accountability provided by
used games effect the quality of new games? I'm glad you asked,
because they are, in fact, related. Allow me to go a little deeper
to explain why, with something I like to call the Daikatana effect.
Daikatana was an over-hyped, much delayed computer game that most
people felt didn't live up to it's lofty promises. When it shipped,
it was $30 or $40, or whatever a new computer game sold for back
then. Once reviews came out revealing it was not a very good game,
the price went down very rapidly. What is the one thing that drives
the price of a game down? Less demand for new copies. At some
point, brand new copies could be had for $1.95. Why were new copies
so cheap? Because they had to compete for sales with used copies
of the game. When a game sucks,
the used game stores are flooded with copies of it. They have to
price these used copies below the price of new copies, because no one
would buy a used copy for more than the price of a new one. If a
store has a bunch of used copies, they have to keep lowering the
price to increase demand or they get stuck with 100 copies of
something they can't sell. A drop in the used price has the effect
of lowering the new price, because if the difference between the used
and the new price gets too large, almost no one will buy it new. So
this has the effect of the new price chasing the used price to the
bottom.

One huge problem that no one seems to
think is a problem with blocking used products or first sale doctrine
issues is its impact on the environment. What exactly is going to
happen to all these games someone used to play that they don't play
anymore? If someone buys Madden 2015 and already has Madden 2014,
where does the 2014 disc go? In the trash. And then to the
landfill. Forever. The entire Earth will eventually be covered with
garbage, because no one will be able to sell any of their old stuff
to someone who would use it. Do we really, as a species, want to
create more stuff that gets
thrown away when we're done with it?

The history and heritage of video games
will be damaged. Want to play the classics and brush up on old RPG
stuff from 2013 so you can make 2017s most awesome RPG? Sorry, those
are all gone now. You could dig them up at the landfill, but they
won't work.

But what of other places where you buy
once and have forever, like a console manufacturer's built in store?
Aren't they selling only brand new stuff?

Yes, but they are doing it all wrong.
By way of example, Nintendo has just released a new Mario game, New
Super Mario Bros. 2, for 3DS. Its price at the physical store is
$39.95. Its price at the Nintendo eShop? $39.95. You save 0 cents
buying it directly, even though when buying it at a store you get a
cartridge, a booklet, and a case. Once you download it, you can
never sell it. It costs $39.95 in the stores and the lowest price,
right now, today, on half.com is $32.95. That's a seven dollar
difference. So a player can buy this game, decide they don't really
like it, sell it, and only be out 7 bucks. Unless they download it,
and then they're screwed for the whole 40 dollars.

What's the big difference between this
and Steam? Steam sells downloads of games for much lower prices.
Sure, they sell brand new games at the retail price, but they have
very frequent sales, offering a new game on sale at a deep discount
every day. Unless the console manufacturers are going to start
selling their games at the sub-$10 prices Steam routinely offers, the
single sale plan will be a disaster. Which, dear console
makers and developers, brings me to this point:If people are
going to be stuck with games forever, make the prices
reflect this.

But what can the console manufactures
do? They have to do this because GameStop is eating their lunch,
giving them none of the profits from the used games sold. No, they
don't. Simply write GameStop a nice little letter, something like
this:

Dear GameStop,

It has come to our attention that the
vast majority of your business seems to come from selling used copies
of our games. In fact, your shelf space has more used games than new
games. Since we are the creators of this content and we do not make
any money from this practice, we demand that you immediately stop
selling our games used. We are the sole manufacturers of these
products. If you choose to continue this practice of selling used
games, we will stop sending you any new games. We will also send you
no consoles, no accessories, no hint books, etc., you get the point.

Sincerely,

Nintendo, Sony, Microsoft, and Sega.

That should do it.

And what of us gamers? If the
manufacturers block used games, we're stuck right? Nothing we can do
about it, right? Wrong.

This issue comes down to this:
Consumers, who have the power to not buy any
of these consoles and stop this foolishness immediately, are
voluntarily giving up their right to not like games and get
rid of them any way they see fit. If none of us buy the consoles
that block used games they will stop selling them and make the same
console that doesn't block used games. Just
that simple. If they sell zero consoles, their stock will plummet
and they will be forced to acquiesce and make an unlocked console.

If the console manufacturers go through
with blocking used games, I will not be participating. I will simply
not buy them. For the reasons noted above. It's simply the right
thing to do. You can do the right thing too.