csanyk.com

video games, programming, the internet, and stuff

Category: Uncategorized

Steam and Censorship

A recent announcement by Valve on Steam’s community blog has created a great deal of controversy.

I’m not entirely sure how I feel about this, but my inclination is that Valve is trying to do the right thing, in a situation where they cannot possibly please everyone, and prefer to be neutral and let the market sort this out, allowing gamers to play games they want to play, and developers develop games they want to develop.

I tend to agree with their stance and reasoning.  I haven’t thought about it a whole lot, and I haven’t looked into specifics of what problems have been going on within the Steam community that gave rise to this decision, so this is just a preliminary reaction.  But I like free expression, I don’t like censorship in any form.  I think people should use their discretion when it comes to what they say, and what they choose to experience as entertainment.  I want games to be as powerful a medium as film or literature, and I believe in their potential to be more powerful than either.

Obviously, there’s a lot of nuance to this — we don’t always get to choose our experiences.  Games can surprise and shock people. But I don’t believe that games should be simply light entertainment that never offends anyone.  Part of what makes art powerful is its ability to shock, offend, or even traumatize.  When an authority attempts to exercise control over ways in which it is permissible to shock, offend, and traumatize, you end up with art that is safe for the establishment and promotes the interests of the powerful, and serves to persist the status quo.  Whether that’s good or not, depends on whether your values align to that of the authority.

I believe in authority that defends the rights of individuals to speak out in ways that contradict the establishment, challenge it, and can force it to re-evaluate, change course, and reform as needed, as times and prevailing attitudes change.

Obviously, people can be and are sometimes hurt in the course of this.  This is something I think most of us try to avoid.  Even so, it happens — occasionally deliberately, but often not.  Perhaps some degree of mitigation of this is not bad.  But it is dangerous, and needs to be considered very carefully.  I’d rather allow the offensive, controversial content to exist, and surround it with robust discussion, than to prevent it from being published and distributed.

If I could design the AtariBox…

Atari’s crowdfunding campaign for the AtariBox (or VCS, as they’ve taken to calling it) is underway and has reached the $2.5 million mark, with 25 days left in its IndieGoGo campaign.

My initial interest in the new console has been dimmed by the lack of concrete information about what it would be and what games would be available for it.

We now have some of that information, at least in terms of hardware specs. But we still haven’t seen much in the way of a list of new game titles that will be accompanying the launch. AtariBox will not be compelling enough to gamers if it does not offer a library of exclusive new game titles that are fun to play, and not available on existing platforms.

I’m not opposed to the idea of a new Atari console at all; done right, I think it could be great. The concept of a neo-retro game console is appealing. Atari’s approach is to use emulation to deliver the retro, and commodity x64 hardware to provide the modern.

The problem with this is that the specs aren’t impressive to modern gamers, and this amounts to a “me too” approach that will not provide Atari a means to differentiate themselves in the market. History has shown that the home console market can support at best 3 major competitors, and it’s unthinkable that a rebooted Atari can knock any of the established Big 3 out of the market.

Home consoles are dominated by Sony, Microsoft, and Nintendo. Desktop gaming is dominated by Windows. Mobile device gaming is dominated by Google and Apple. I’m very doubtful that nostalgia alone can give Atari the leverage it needs to re-enter the market. Not when Atari’s IP has already been re-packaged and sold on every available platform to be launched since the NES.

And we still don’t really know what new games will be launched on the console.

Atari needs to deliver something unique. And it has to be good.

Here’s what I’d do, if I were Atari.

Best Legacy

To properly honor Atari’s legacy platforms, I would include FPGA implementations of the Atari 2600, 5200, 7800, and 8-bit computer line. FPGA implementation of original hardware is the best way to provide the most authentic experience of Atari’s legacy. It would quiet objections of “But I can already run an emulator!” The state of emulation is very, very good, but an FPGA would be the ultimate.

I don’t think it would be too difficult to implement, either. The Atari 7800 was backward-compatible with the 2600, and achieved this by including the complete 2600 system in its hardware design. So by implementing an FPGA-based 7800, you get the 2600 as well. The Atari 5200 was essentially an Atari 8-bit computer, stripped down to remove the disk drives and keyboard to make it a dedicated gaming console. So a FPGA solution for the 5200/8-bit computers can share a lot of common components as well. Make both FPGAs a superset of the hardware needed to support the largest system, while keeping compatibile with all systems.

We can’t forget about Atari Coin-op’s legacy. Here, there’s too many unique system architectures to be able to re-implement each of them in an FPGA, so here I think we can accept emulation.

It would be neat if Atari would sell actual arcade cabinets that you can dock an AtariBox into, and use it to drive a more authentic arcade experience for those who have the budget and floor space for it. Modular, interchangeable control decks that can plug into the cabinet and provide the exact control set and layouts for classic arcade games would be amazing. Even just selling kits or blueprints to enable enterprising hobbyists to build-their-own cabinets to an Atari-defined standard would be great.

For less well-heeled fans of the arade, the AtariBox could still be played through a normal TV, with a gamepad-type controller adapting to each Coin-op title as best it can.

What legacy game titles should be included?

Ideally, all of them, of course. First party, third party, everything.

Copyright won’t allow that, of course. But it would be great if the entire Atari library, including third party releases, could be included.

But undoutedly, any list of essential games for Atari consoles would include games published by third parties, and they deserve to be included. The rights to these games would be a nightmare to properly secure. Personally, I’m in favor of expiring copyright on old computer software much earlier than the law currently does. A 10 or 12 year copyright, non-renewable, is more than reasonable. It’s just a dream, but then this entire post is just a dream.

I suppose if we had to accept a curated list of game titles, I wouldn’t miss the terrible games, but I don’t know that everyone can agree on what’s terrible. Since the size on disk for these games is tiny, there’s no technical reason not to include everything.

While I’m thinking about it, I also want the ability to install my own ROMs. Hacks and homebrews are a part of the Atari ecosystem, and should be embraced by the new console. Installing them should be as simple as copying the files to a directory.

Along with the ROM images, customers should expect high-quality digital copies of the manuals, original box art, etc. Since this is a fully modern console, why not develop a robust social community around each game title, as well? Online high score leaderboards, discussion forums, built-in streamcasting support, the works. The community integration features would make owning an AtariBox a must even for gamers who already own all the original hardware.

What peripherals devices should be supported?

This is a tougher question. I’m inclined to want every port and connector to be replicated on the new box, so that the old devices can be plugged in and work, since it’s unlikely that Atari would ever resume manufacturing all of them. But that’s highly impractical, and cost-prohibitive.

Perhaps some kind of USB-to-legacy port adapters could be produced, so that the console itself can have just a small number of USB ports, and any legacy hardware can be routed through it.

Better would be modern production of updated classic designs. I really like Atari’s new take on the CX-40 joystick, and I wish they’d also produce a modern paddle controller as well.

Retro Modern

I really don’t want to play Skyrim or PUBG on an AtariBox. If I want to play modern games, I already have plenty of systems to do that. If it can do it on the AtariBox, then fine, whatever, but I don’t care.

Oyua tried to court Indie game developers, hoping that an open platform with low barrier to entry would be attractive. This approach had merit, but utlimately failed, and so I don’t endorse Atari taking the same approach.

I think it’s interesting and worth a sidebar to examine why Ouya failed.  There were more reasons than what I’ll go into here, but I think these are the ones that are most relevant to Atari in 2018.

First, Ouya tried to market itself as an indie-friendly console, that was easy to develop and publish for.  Every Ouya was a devkit.  The thing was, Ouya came at a time when it had already become incredibly easy for indie game developers to publish games. This wasn’t true several years previous to Ouya’s launch, but it was true by the time Ouya hit the market, and is even more true today. Maybe consoles were still hard to develop and publish on in 2012, but in the PC and mobile space, self-publishing has been very easy, and that’s where indie developers had thrived.

It still remains difficult, however, for indie developers to publish games that are financial successes.  There are a tiny number of notable successes where indie games have made their developers wealthy.  Most developers struggle to make enough money to cover development and operating expenses. Designing and making a very good game is still fairly difficult, but publishing it is comparatively easy. But it’s not enough to simply publish a very good game. You have to know how to market it. A lone indie developer has an almost impossible time doing it all well enough to stand out among thousands of games being released every year.  Many newly released games drown in a maelstrom of other new releases, failing to secure the attention they perhaps deserved.

Second, Ouya didn’t provide indies with a compelling reason to release their games exclusively on Ouya, and the lack of exclusive titles gave gamers little reason to pay attention to Ouya. Ouya started with a lot of crowdfunding hype, but tiny marketshare, and it needed to grow marketshare quickly to be viable.  But they lacked first-party games, and this was a major mistake.  Ouya failed to command market attention, didn’t build marketshare, and thus wasn’t attractive as a market for third party game developers to target with exclusives. It could run games that already ran on other platforms.  But it wasn’t particularly powerful, so couldn’t play everything.  Atari seems to be doing exactly the same thing with AtariBox.

Ouya was based on Android, which in turn was based on Linux, so game developers who wanted to reach the widest possible market were better off developing games for Android which has hundreds of millions of devices, or Linux.  AtariBox is also based on Linux. Ouya lacked the deep pockets that would have been needed to pay developers for exclusive rights to a game, so Ouya never had a “killer app” that would compel gamers to buy Ouya.

Until I see them announce some exclusive new first-party titles, I see the same happening to Atari. Atari can and must learn from this if it wants the AtariBox to be successful, and I haven’t yet seen indication that it has.

The AtariBox we’re getting from Atari is just a nice looking x86/64 system, meaning it’s generic PC hardware that can play games developed to run on this hardware, which means potentially a very large library of pre-existing games. But pre-existing games aren’t enough to compel users to buy a new device. It’s good for developers because they don’t really have to do much to make a game run on the AtariBox, but it’s bad for AtariBox because the same games can be compiled to run on Xbox One, or Playstation 4, or Nintendo Switch, or Windows, or Android, or iOS, and people already own those.

What I would have liked from Atari would be imaginative interpretations of what could have been, if Atari had stayed in business.

In the early 80’s, the differences between different systems were much more apparent. A game might be developed and released on Atari 2600, 5200, ColecoVision, IntelliVision, Oddyssey2, Commodore 64, Apple ][, and IBM PC, ZX Spectrum, MSX, etc. but it would be written from scratch, or ported to each specific hardware architecture, each of which had its own distinct capabilities and limitations. Limitations which, especially for the more primitive sysetms, gave all games for that system a somewhat distinct appearance. This meant that, even if you had never seen a particular game before, you could look at a screen shot for a game and have a pretty good chance of being able to guess what system it was running on.

With today’s computers, and their 64-bit, multi-core, multi-gigaHertz CPUs, multiple gigabytes of RAM and Terabytes of Storage, 32-bit color and 1080P or 4K resolution, there is nearly limitless capability, but barely any constraints. Game developers are free to make games that look like anything. But yet they mostly make games that look the same — only, the constraint is the market success of whatever the best selling games are — design tends to converge on the look of the top AAA titles.

Those constraints that the old systems had often served to inspire creativity, out of necessity to work around the limitations of tiny, slow systems. In recent years, “fantasy consoles” such as the PICO-8 have turned back to this idea that small systems with harsh constraints can inspire creativity while achieving a greater unity of aesthetic.

It would be very cool if Atari embraced this, by designing a “fantasy console” to run neo-retro Atari games on. This fantasy console could be a virtual machine, and run on commodity hardware, which would help keep costs down and also give the AtariBox capabilities where and when it needs them — for things like media streaming and so forth.

I think that Atari could design a flexible fantasy console, with soft constraints that are configurable, to be managed by the game developer, who could relax them by degrees to simulate hardware constraints that would have been in place in 1977, or 1982, or 1984, etc. A configurable fantasy console could impose limitations such as: number of sprites that can be drawn to the screen, number of colors per sprite, number of colors displayed simultaneously in one frame, number and type of sound channels, specific color palettes available to the graphics system, amount of memory available to the game program, and on and on.

This would give AtariBox games a specific flavor, and make its games look and feel distinctly unique from the current modern-day look.

We won’t be getting any of that, but I think it’s an interesting idea. And there’s no reason Atari couldn’t give us a neo-retro fantasy console to develop for and run exclusively on the AtariBox hardware, without changing anything else about how they’re doing the actual AtariBox.

The way to attract developers to create exclusive titles for the AtariBox is simple: Pay them, and respect them. I doubt that Atari has the pocket book for this, but if they could pay indie developers say, six figure salaries, and/or royalties, to create unique and exclusive games for an AtariBox fantasy console, I’d be very excited — both as a gamer and as a developer. The current industry is incredibly competitive and harsh, and the way it treats developers is not sustainable.

What about the GAMES?

The most important thing about the AtariBox, as with any game console ever released, is the games it plays.  AtariBox must have good, unique, exclusive games that excite the market and make people feel compelled to own the console, or it will be a flop.

I can’t answer the question, “what do people want?”  But I can say, if AtariBox’s new games are just the same modern titles that are available on existing consoles, it will not excite the market or compel buyers.

I can better answer the question “what do I want?”

I don’t really want Atari to try to do modern AAA games with old classic IP.  You can easily envision Atari putting a Pitfall Harry skin over Lara Croft Tomb Raider, or making “Combat 2018” as a Call of Duty/Medal of Honor/Battlefield FPS.  I don’t want more of the same, “me too” games like that.

What I would rather have is new games that continue the aesthetic and style of the early 80’s Atari. That’s the main reason I suggest AtariBox use a “fantasy console” approach, to constrain developers to those limits.  There isn’t really a word for it — I guess retro is it — but if you can imagine what Steampunk did for science fiction based on an 1890s world, I’d like AtariBox to do for videogames based on a 1980s world.  I want games that answer questions like: “What would Pitfall 3 have been like, if they’d done it on the 7800?” “What kind of games could have been made for an Atari with 1 megabyte cartridges and 128 kilobytes of RAM?”

Games like Solaroids and Rashlander would be right at home on a console like this.  Pac Man: Championship Edition, which came out over a decade ago on Xbox 360, would also be a natural fit for this console.  (I bought my Xbox 360 solely because of Pac Man CE.) These titles already exist though, and that kindof begs the question of why the AtariBox is even needed.  Retro games already exist, and exist on multiple modern platforms.

But I do think AtariBox would be best off targeting the market that wants to play that kind of game.  Atari has trademarks that they can reboot, and if they do it the retro way, rather than trying to bring them up to date, with the right talent behind it, it could be awesome.  As AtariBox exclusive titles, it could make the system a success.  And without them, I don’t see how it can be.

Adobe Flash EOL in 2020 – how will we preserve games?

Adobe announced today that it would cease development and support of Flash in 2020.

Of course, there were (and are) a lot of issues with Flash:

  • the proprietary nature of the Flash Player plugin;
  • memory and CPU usage;
  • stability problems;
  • security problems;
  • privacy concerns over Flash cookies;
  • Flash advertising/malware;
  • lack of accessibility in many Flash objects, resulting in issues for people with disabilities, screen readers, search engine indexing spiders, or for anyone who simply didn’t have the Flash Player installed, etc.;
  • and poorly programmed Flash objects.

So it’s not entirely a bad thing that Flash’s time is nearly at an end.

While this news doesn’t exactly come as a surprise to those who have been following the life of Flash since the iPhone launched, it does raise a serious question:

What will happen to all the games created in Flash when Flash is dropped from mainstream web browser support?

How will the history of games developed in Flash be preserved?

[Update 5/2/2018:] Here’s an article on one effort to preserve Flash games.

This is no small question. Over the 20+ years that Flash has been around, thousands of games have been built with it. Many of them are good games that still hold replay value. But without a viable platform with which to play them, will they wink out of existence and be forgotten?

I think the best approach to preserving Flash’s historical legacy would be to create a version of the Flash Player in Javascript or Web Assembly, and then any web site can use that to backfill support for any Flash objects that they wish to serve.

What are your favorite Flash games?

The Ongoing Sale

Since I announced yesterday that I’d finally earned my first $100 payout through the GameMaker Marketplace, I dropped my price on all paid assets to $0.99. I had another purchase today, so to celebrate that, I decided to adjust the terms of the sale.

The payday celebration sale will continue through 4/10/17 as planned.

For each paid purchase I get during the sale, I will extend the sale by one day.

Update, I had another sale today, 4/11/17, which will extend the discounts another day.

So as of right now, the sale on all my paid assets will last until 4/12/2017.

Get csanyk GameMaker assets on GameMaker Marketplace!

Galaxian is a triumph on the Atari 2600

As a child of the 1970’s, I’ve been attracted to arcade video games since I was tall enough to reach the controls. This was 1981-84, during the heyday of the arcade’s Golden Age, a time when games like Pac Man, Dig Dug, and Galaga were new, hot, and everywhere. Grocery stores, gas stations, seemingly anyplace people might spend time, you’d find a couple of arcade games, ready to suck the quarters out of anyone who passed by.

Just slightly older than these games were the ever-popular Space Invaders, and its evolutionary next step, Galaxian. Although these titles were top shelf games in their day, I found that I didn’t enjoy them very much.

Space Invaders was just frustratingly slow at first, but then sped up to an unfair pace by the end, and I could never manage to destroy that last invader on the first wave. You had to have perfect aim to hit it, and it moved so fast it was seemingly impossible to track, so you had to be lucky. If you missed, the slow-moving missile took forever to disappear at the top of the screen, and you couldn’t fire again until it did. Usually this delay meant your death, as the hyper-paced final invader would reach the ground, ending your game. Plus, it was black and white. It felt old. I respected it — even then I could tell that it was a important game — but grudgingly, I had to say that I just didn’t enjoy it that much, although I wouldn’t have admitted it to anyone back then.

Galaxian, too, was a game I found too slow and frustrating to play at arcades. It seemed like the next step in the vertical space shooter. Graphics were now in color. A formation of aliens marched back and forth across the screen, but this time instead of descending toward the earth, they stayed at the top of the screen, while one by one, or in pairs, individuals would peel off from their formation and dive bomb you. Their bullet patterns and flight paths seemed to make it all but certain that they would hit you if you didn’t hit them first. I could usually survive for a while, maybe clear a screen, but it never failed that if I happened to miss a dive bombing enemy, it would corner me in the side of the screen and crash into me, or hit me with too many bullets to dodge. You could always dodge one, but there’d always be another one following up, and your first dodge would put you right in its path. It seemed unfair, and so, not very fun. I always gravitated toward the games that I could last a bit longer on, so I could get my money’s worth out of my quarters.

I had a cousin who owned an Atari 5200, and played Galaxian on it once or twice while visiting them. The 5200 port was a very faithful reproduction of the arcade experience, not exactly arcade-perfect, but nearly so. I still didn’t care much for it, because it suffered from the same shortcomings. It wasn’t as bad to lose at home, since it cost nothing, but I still preferred to play games that felt fair.

It never entered into my mind that maybe I just wasn’t very good at Space Invaders or Galaxian. But probably, I was. Ok, not probably. I sucked. But in my defense, I was like 6, and just tall enough to reach the stick and see the screen. But back then, I blamed arcade games for being “greedy” in contrast to home consoles, which seemed to reward players with longer games that were still challenging, but more fun because they weren’t so brutally ass-kicking hard.

I never played Galaxian on the Atari 2600 back in the day. I’d played the 5200 version and was impressed with its arcade-quality graphics, and I remember seeing the pictures on the back of the box on the 2600 version, and being unimpressed. Since I never particularly enjoyed the game, I didn’t have any interest in owning it on the 2600, never knew any kids who had it in their collection, and so never played it. At some point, we had an Atari 7800, which had Galaga, the sequel to Galaxian, and one of my very favorite games, so I played a lot of that.

I’m not sure when exactly, but at some point I picked up a copy of the 2600 port of Galaxian, probably a few years ago. I recognized it was a significant title in videogame history, and so I wanted it for my collection, despite not having favorable memories of it from its heyday.

I finally got around to playing it today, and came away very impressed. Here’s a video review so you can see what it’s like:

The 2600 port plays much better than I remember the arcade. The motion is extremely fluid, which, considering the limitations of the Atari 2600 hardware, is nothing short of amazing. Maybe I’m just better at videogames than I was at ages 5-8, but I found that the game felt very fair, with divebombing enemies that are actually dodge-able. I’m sure, the horizontal aspect ratio of the screen plays into this somewhat, as you have more room to dodge, and also your shots that miss take less time to leave the screen, meaning that you can fire follow-up shots that much faster.

I was always a fan of vertical shooters of the Atari 2600, my favorites being Megamania, Phoenix, Threshold, and Tac-Scan, and Space Invaders. Galaxian is every bit as good as the best of these, and is still fun to play even now.

Playing Galaxian tonight, I found that my strategy was different from how I played the arcade original some 35 years ago. My old strategy was to try to shoot the enemies still in formation. They were easier to hit, since they didn’t swoop or shoot at you, and it seemed to me safer to eliminate them before they could turn into a threat. I’d try to shoot the divebombing aliens as they flew over me, and dodge out of the way of them and their shots, but mostly I concentrated on blowing away he ranks of Galaxians in formation, much as I approached Space Invaders.

My new strategy was much more successful, and rewarding: I ignored the galaxians in formation, since they don’t do anything that can hurt me, and focused on the divebombing aliens. It turns out, this has many advantages. First, by focusing on the divebombers, you are focusing on the only thing in the game that can threaten you. Shooting them is a much more reliable way to avoid them than dodging. You will need to dodge sometimes, but if you focus on developing skill in shooting the moving enemies, it gets pretty easy to pick them off before they can collide with you. The green Galaxians are simple, slow moving, and easy to hit. The purple ones are harder to hit, but with a little bit of practice the timing becomes easily mastered.

Hitting divebombing enemies in mid-flight makes you safer in two ways: enemies are destroyed before they’re low enough to collide with you, and they can’y get all their shots off. Typically, you’ll hit them as they cross ahead of you, and so you’ll be moving in the same direction, to track them, and the shots they do get off will fall harmlessly behind you, and by destroying the alien as it passes directly above you, you prevent it from getting ahead of you where it can drop bombs that would be dangerous to you.

Additionally, by hitting them as they’re diving toward you, your shot has less distance to travel, which means that you can get off more shots — since you can have only one shot on the screen at a time, when they hit something low on the screen, the shots don’t have as far to travel, meaning they hit the target sooner, meaning that your bullet is consumed and you can then fire another shot more quickly. If you miss one of the bombers, you might still end up hitting one of the galaxians still in formation, especially early in the stage, which isn’t so bad either. But the lower your shots are when they connect with an enemy, the faster you can shoot.

This in turn sets up a rapid flow of firing, hitting a dive bomber, then hitting the next dive bomber with a rapid follow-up shot. Once mastered, you can mow through the entire formation in quick succession in this manner. This turns out to be very enjoyable. You feel more skillful, since you’re targeting the fast-moving enemies, getting more points for them, and it looks more risky, since you’re often hitting the enemies pretty low on the screen, when it looks like they’re most dangerous — but at the same time you’re actually playing the least risky style of play. Of course, that’s what skill is — finding the right pattern of actions to minimize your risk, while doing what looks the most daring.

It’s clever, because the more intuitive way to avoid risk would be to try to avoid the dangerous enemies and attack the enemies that aren’t a threat. But counter-intuitively, when you focus on the dangerous enemies, and take the aggressive approach of destroying them rather than running from them, it minimizes the risk they pose to you, while the enemies that aren’t a threat remain a non-threat.

At this point, I recognized what a truly well-designed game Galaxian for the Atari 2600 is. I’m curious to see whether this strategy applies to arcade Galaxian. Since I don’t have ready access to an arcade with Galaxian in it, the next best thing is to watch a YouTube video of a skilled player.

And it looks like this is indeed the strategy to employ, although this player also has enough time to target plenty of enemies still in formation. I think the 2600 and arcade versions are different enough in their game play that they feel like different enough that while the basic strategies are more or less the same, the specifics are different. In the arcade, there’s much more space between the bottom of the screen, where you are, and the top of the screen, where the enemy formation is. But ultimately, I think the Atari port gives you less time to target the enemies in formation, forcing you to spend most of your time focusing on the swooping divebombing enemies.

In any case, Atari 2600 Galaxian is a fantastic game, and if you’re into vertical shooters is a must have, being one of the finest examples of the genre on the Atari, as well as an outstanding port of a historic and classic game.

GameMaker Asset: Rolling Average

In creating my last tutorial and demo, I needed to calculate the rolling average for the fps so I could measure performance differences between Instance Pooling and Create-Destroy.

It turned out that the functions for setting up a rolling average were pretty simple, yet were a pain to do well. So once I got them working, I decided to make them into an asset for GameMaker: Marketplace, so they’ll be easy to re-use in any project, with any series of numeric values, and so I can share them with the community.

Calculating a rolling average over a series of streaming values is now simplified by these new functions:

rolling_mean_create()
rolling_mean_destroy()
rolling_mean_add()
rolling_mean_read()
rolling_mean_size()
rolling_mean_resize()

Rolling Average on GameMaker Marketplace (free download)

Rolling Average on itch.io (free download) (free download)

Full documentation

Ludum Dare 37

Ludum Dare 37 is next weekend!

This is a milestone for Ludum Dare, as they are running this jam on their new website, ldjam.com. The old website had served admirably for many years, but lately the scale of the event has exceeded its capability, and the ad hoc customizations to the wordpress site were such that it was difficult to maintain the site. The new site will be a welcome renovation as well as a new foundation from which a better LD will be possible.

I am planning on using GameMaker Studio 1.4 one last time (probably) for LD37, because GMS2 is still in beta, and YYG have not yet released the HTML5 module, and I prefer to be able to create a HTML5 build of my project so that more people can play it. I’m looking forward to learning what the theme will be.

KB Tester utility helps you see what value to check for when a key is pressed.

KBTester is a utility/demo I made to help out with coding your keyboard_check routines. It is born out of frustration and necessity for handling certain inputs from a very fundamental input device for computer games, the standard keyboard, which are not supported out of the box.

If you program keyboard input in your games, you’ll find that, for most keys on a computer’s keyboard, you can use vk_constants and ord(letter)… but for some odd reason YYG didn’t create a vk_constant for every key on the keyboard, and don’t plan to. Not only that, but there are certain keys that don’t return the right value for ord() to work with keyboard_check.

For example, say you want to check if the period key is pressed. You might think that you can do keyboard_check(vk_period) but to your surprise, there is no vk_period constant defined in GML. So, then it must be that you need to do keyboard_check(ord(“.”)) only… it doesn’t work!

That’s because ord(“.”) returns a value of 46. But for some reason, if you want keboard_check() to return true when the period key is pressed, you need to check for the value 190. Why? Why are certain keys on the standard keyboard treated as second-class citizens? Because, sadly it’s not in YYG’s vision to improve keyboard support.

To paraphrase a certain “Evil YoYo Games Employee” who commented on my suggestions for ways the current keyboard support badly needs to be improved:

<paraphrase>Why should we improve keyboard support when you can just research what codes map to your keyboard keys, make an extension that has a few constants in it, and then hope that these will work with all keyboards and all target platforms? Just code it once and then put it up on the Marketplace. Now that the marketplace exists to provide stopgap coverage of GM:S shortcomings, we don’t have to pay our own programmers to fix those holes anymore.</paraphrase>

So, I guess we’re supposed to figure out the numbers and then code some constants for the missing vk_constants, and use those. This, despite the helpfile recommending against using hardcoded numeric values in keyboard_check because you never know if it’ll work on the target platform if it’s not Windows/Mac/Ubuntu:

NOTE: These functions are designed for Windows/Mac/Ubuntu desktop platforms only. You may find some of the in-built variables and constants aren’t valid on other platforms and many of the functions won’t work on mobiles.
Now, each key is normally defined by a number, called the ascii code, and you can directly input this number into these functions and they will work fine… But, as it’s a bit difficult to remember so many numbers and the relationship that they have with your keyboard, GameMaker: Studio has a series of constants for the most used keyboard special keys and a special function ord() to return the number from ordinary typed characters (either letters or numbers).

The implication is that, YYG seem to be saying, “Despite the promise of GM:S to be a development environment that supports multiple target platforms, we didn’t see the need to ensure that your code will run the same on all target platforms we support, or all region/localities, or with all keyboard layouts. After looking into it we decided it was too hard for us to deal with, so we’re passing it along to you to figure out for yourself. So just be aware that these may or may not work on all platforms, and that’s all the info we’re going to give you about that. You’re on your own to figure out how to solve keyboard input from any platforms that don’t work with our keyboard input functions.”

Well, for whatever reason, YYG doesn’t provide FULL keyboard coverage between ord() and vk_constants, and it’s not in their vision to address this shortcoming, so I guess you’re going to have to go out and find some reference that will tell you what numbers represent what key, and then hope they still work.

In the meantime, you can use KBTester, press a key, and get the answer without having to hunt the info down on the internet and hope it’s correct. If you’re having trouble getting keyboard_check to work, and need to verify that the magic number you’re using is indeed the right one, you can run KBTester. Press the key you want to use, and KBTester will tell you the value that GameMaker sees when it is pressed.

Open Letter to Smart Phone Manufacturers

Dear Smartphone Industry,

I don’t need a bigger screen, OK? I need a screen that will fit comfortably in my pocket. My front hip pocket to be exact. The dimensions of the Samsung Galaxy S5are about as big as I can go. Really, the S2 was more comfortable.

I don’t need a thinner phone. I need a phone that feels comfortable in the hand.

I don’t need a thinner phone. I need a phone with ample battery, such that I don’t need to charge for several *days*, despite heavy use of the device. If you made the phone phone that was inch thick, and all that extra space was battery, and I could go a week without charging, that would be AMAZING.

While we’re at it, I would also really like intelligent battery management. I would like apps that need to use the network to not talk to the network directly, but talk to a network handler, which will determine if/when to allow the data to be transmitted. I can then configure the network manager to either not allow any transmission (like airplane mode; saving maximum battery), or allow all transmissions at any time (fastest response but lousy battery), or burst mode (leaving the transmitters off most of the time, but waking up and reconnecting every N minutes, sending/receiving data that has accumulated in that time, or when I request it).

Lastly, tell network providers to quit bundling apps with their phones. I don’t want or need so many of them, and there’s no way to uninstall the ones that are baked into the firmware. I can figure out what I need and install it. If I’m upgrading or migrating from an old phone, it should carry all that stuff over, with all my settings and data anyway. There’s no need to bundle anything. Just provide me with a bare phone.

And tell network providers that they must roll out security updates in a timely fashion (days, not months) so that users aren’t left vulnerable. Frequent, more granular updates rather than one or two monolithic updates before support for my handset model is dropped entirely, would be great.

Thanks,

csanyk.com © 2016
%d bloggers like this: