JJSBlog

When 140 characters won't do.

My Doctor is Steven Moffat

- Posted in Uncategorized by with comments

Steven Moffat's time as showrunner of Doctor Who is nearly up, and many seem totally jazzed about it. But his work really clicks with me. In the earlier series of the show his was the first name I began to associate with standout episodes, so when he was announced as the successor to Russell T. Davies it was like a wish being granted. His tenure hasn't been perfect, but I'd boil down the major reasons I dig his version of the show to these points.

1. I like Time Travel

With two capital Ts. I appreciate stories that really take advantage of it, moreso than just using it to set the story in an arbitrary time and place. He was pretty good at stretching what could be done in a single episode with his episodes in the Davies days like Blink and Girl in the Fireplace, but as showrunner he was both able to make this happen on many of the biggest episodes (premieres, finales) as well as having nonlinear elements that spread across a whole series or even multiple. The Doctor from the end of series 5 popping into an earlier series 5 episode. The events of the end of series 7 being a cause for events at the end of series 5. I eat this shit up.

2. I like Moffat monsters

For better and worse we're probably never going to get away from Daleks and Cybermen, but it's great to see new types of foes with new twists. Statues that can only move when not being looked at. Creatures you forget you ever saw when they leave your sight. Making fear of the dark legitimate with living shadows that can eat your flesh. Something that can hide so well... the episode can't even come to a conclusion about whether it exists.

3. I like that he goes Big

Some of this is chance. Him being around for the 50th anniversary gave him an excuse to write something Major, in this case a story that revealed an unknown Doctor and in small part brought all the past ones back. Thanks to that unknown Doctor, he put himself in the position of being the one to write around that mysterious regeneration limit. Beyond that we see him doing things like letting the Doctor get stuck on a planet for hundreds of years in a single episode (without reversing it), or get stuck in a loop that takes billions of years to work through. Destroying and recreating the friggin' universe! He's also more willing to play with the various regenerations than any showrunner I'm familiar with, like having a phone call from Eleven in Twelve's first episode. That he's pulling back the First Doctor for his last Christmas special just seems par for the course.

ALL THAT SAID, he's had six full series and then some to make his mark on the franchise and some of his hallmarks have become pretty repetitive, so it probably is time for some fresh blood. It just probably won't be blood that tickles all of my specific fancies so well.

Recently Takashi Tokita teased working on some Switch project. As he is known for among other things working on various versions of Final Fantasy IV, it caused some guesspeculation that maybe some version of FF IV could be coming to Switch. That's a bit of a specific extrapolation, but just thinking about the possibility reminded me of of some issues with portable versions of the game in the past, and in general upgrading sprite-based games for the modern age.

Original SNES FF IV was designed around a screen resolution of 256x224. The first portable ports used essentially the same graphics files, but on screens with lower resolution. End result: while walking around you see less of the world as it's been cut off.

SNES: 256x224. 100% width, 100% height, 100% overall area. Duh.
WonderSwan Color: 224x144. 88% width, 64% height, 56% overall area.
Game Boy Advance: 240x160. 94% width, 71% height, 67% overall area.

Later a 2D remake was made for the PSP. That system has a significantly higher resolution, 480x272. So it could've shown all the area from the original and then some. However, instead of rerereusing the old SNES sprites, they created new high quality ones at double the width and height of the original. The result is that when considering how much of the world is able to be viewed, you'd need to compare it to a double size version of the SNES view (512x448).

PSP (compare to 512x448): 480x272. 94% width, 61% height, 57% overall area.

So in the end the PSP version actually showed less of of the world than the GBA version, though slightly more than the WSC version.

This image tries to sum up things with black being the original SNES view, green being GBA, red being WSC, and blue being PSP. Near-white in the midle is the area they all share.

So what would be the realistic options for something on Switch's 1280x720 screen, assuming integer multiples?

x1 (compare to 256x224): 500% width, 321% height, 1607% overall area.
x2 (compare to 512x448): 250% width, 161% height, 402% overal area.
x3 (compare to 768x672): 167% width, 107% height, 179% overall area.
x4 (compare to 1024x896): 125% width, 80% height, 100% overall area. (To be more precise 100.45%)

Either x3 or x4 would be pretty valid options viewed this way. x3 would essentially maintain the height and add more width, which is traditionally what people think of when things "go widescreen". However x4 would still show the same amount of world as the original, just trading off some height for width--and even the lost height isn't as much as any of the previous portable versions.

This image sums it up. This is just a comparison between how much of the world (compared to SNES original in green) is shown; in the real world the blue (x3) and red (x4) options are the same physical size.

Of coooooourse the other way out of all this sort of mess is to go full on polygonal like the remakes of FF III and IV on DS (later ported to mobile devices and PC). Then scale really has no meaning, and can be changed on the fly.

So I originally wrote the following shortly after the Switch reveal. I guess I never quite finished it, as it's sat in a tab in my text editor since then. I've made some slight changes to that version, updating with some things that seem less hazy now than they did then, though the real real reveal tomorrow night may change things yet again.


Though Nintendo is being coy about it replacing the 3DS, if all goes well Switch is intended to be the next step for Nintendo both at home and portably. That being the case, I thought it would be interesting to see how it looks as a successor individually to 3DS and Wii U. By the time they really decide to push the 3DS to the backburner they might have something like a more portable model of Switch available, but for now I'm working with the unit to be released in March 2017. And unfortunately since a lot of it is still uncertain, there is some rumor and guesswork in here.

From 3DS

PRO Resolution. Comparing from one eye's view of the main screen, 400x240 to 1280x720 is 9.6x as many pixels. Considering all the screen portions 400x240x2 + 320x240 to 1280x720 is 3.4x as many pixels.

Screen size. The original 3DS top screen is about 5.6 square inches. The 3DS XL top screen is about 10.5 square inches. The Switch scren dwarfs both at about 16.5 square inches. HOWEVER, the 3DS XL's top screen plus bottom screen added together do beat it, with a combined 19 square inches.

Tech specs. A lot is unknown about Switch's actual processors, but from what is known it seems ridiculously more powerful. Switch will have about 32x as much RAM as 3DS, and it seems like the rest of the improvements will be even bigger. Though it does somewhat depend on whether Switch is in docked or undocked mode, which apparently changes the GPU speed significantly.

Controls. Largely like those of the New 3DS, with the extra shoulder buttons and second analog control. However, both analogs will be full sticks, and sounds like one set of shoulders are analog as well. The controller portions that split off should allow for dual motion controls and possibly pointer as an alternate to touch. Touch will now be multi-touch, as opposed to the single touch of 3DS and DS.

Multiplayer. Local wireless and Internet play still possible, but now local multiplayer through shared or split screen is pretty standard too. Easy to get many two-player games going thanks to using the joy-cons individually.

CON Battery life. Rumors have varied on this quite a bit, but sounds like it might be worse than original model 3DS's was.

Size. Screen size is nice, but most people will find it impossible to fit Switch in a standard pocket.

Dual screen / clamshell. If you've come to appreciate the dual screen / clamshell design over the last dozen years as I have, unfortunately it's gone too.

Camera/mic. It seems there is no camera or microphone standard on Switch? There is some doubt on this.

From Wii U

PRO Resolution. Wii U Gamepad was 480p screen, Switch is a 720p screen. So 1.5x the pixels in either axis, or 2.25x overall. TV output for games probably maxes out at 1080p in either case, though Switch being more powerful it should hit it much more often. In fact with the GPU speed difference between docked and undocked, it seems designed to make 720p on the go and 1080p on TV an obvious choice.

Tech specs. Again there's a lot we don't know about Switch, but depending on how things pan out and whether it's in undocked or docked mode, it can probably do 2-5x as much as Wii U. RAM seems to only be doubled from Wii U, but rumor says the non-OS portion of RAM will be about triple what was available to developers on Wii U. Overall, still a fair gap below Xbone or PS4.

Architecture. Less exciting than pure spec numbers, but much of the Wii U was built with Wii compatibility in mind, and thus in some ways hampered back to GameCube tech designed at the turn of the century. With modern tech in, even though of the kind designed for mobile devices, Switch is a much easier target for current multiplatform games and middleware than Wii U was.

Controls. Largely the same as what's found on the GamePad, except one set of shoulders should be analog. Dual motion and possibly pointer should allow for somewhat more advanced version of wiimote / nunchuk controls. Single touch on the screen now multitouch.

Off TV Play. If you imagine undocked Switch as an evolved form of Off TV Play, then this is one where 100% of games work with it and the range is infinite, versus a couple dozen feet for the GamePad. Also since it's not an image being transmitted wirelessly there's no image quality loss from compression.

Multiplayer. Local shared/split-screen play and Internet play still possible, but now local wireless connecting to nearby Switches should be a pretty normal thing, too.

Sleep mode. Being a staple of portables it's necessary here, which will add some convenience for quick long-term pausing.

CON Dual screen. When docked the image outputs to TV and the tablet screen is mostly physically blocked, so games built around different things happening on the TV screen versus a held screen do not seem possible.

Camera/mic. It seems there is no camera or microphone standard on Switch? There is some doubt on this.

NX is Switch

- Posted in Video Games by with comments

So today the NX was unveiled as the Nintendo Switch, and... it's pretty much exactly what the solid rumors of the last few months have said, so my previous post about why I was positive on NX still applies. There are a few things technically still up in the air. Like after the video, people started wondering why it never showed the screen used with touch? And relatedly, the split controllers were never explicitly shown to use motion controls, either. So was it an indication Switch has a regressive control scheme in order to make identical controls for home/go modes easy? I don't think so. The same solid set of rumors that were right about 90+% of everything so far also say it's got a multi-touch screen and motion controls similar to Wii Remote Plus, so why start doubting them now? It seems like Nintendo just wanted to push a simpler message today about playing the same games at home or on the go with a few standard control options, and didn't want to deviate into more specifics in a 3-4 minute video.

As is always the case, there is some doubt about whether the name is good. I'm a bit split on it. I don't think it's particularly awful, and don't think Switch is worse than Box, Cube, Station, or other things game systems have been named... except they haven't been ONLY named those things. Without some other word attached, Switch feels kind of like some regular dictionary word accidentally got promoted. Just Switch, not GameSwitch or XSwitch, or PlaySwitch or any other such thing. I could go for the DipSwitch myself, controlled by the Dip-Cons and the analog Dipstick.

One of the more interesting rumored/speculated things that turned out to be accurate is that the two controller halves (Joy-Cons) can each be used individually for simpler multiplayer control. A big question was how do you design something that works well both in tandem vertically and solo horizontally? The answer seems to be... well, you have to let one suck a bit more. The sideways mode definitely doesn't seem the way many would choose to play. The analog stick and buttons are cramped pretty close together, and depending on whether you're using Joy-Con L or R they're off-center to one side or the other. What are the shoulder/trigger buttons when played normally are still present, but will be located awkwardly to either the left or right side. Still, I see this as more of the emergency setup. If you're really planning on some multiplayer you'll get extra sets of Joy-Cons or Pro Controllers, but this is the way that you can be sure to NEVER be without a multiplayer option, and any two Switch owners who meet up are equipped to get four-player going.

There's been some concern about Nintendo saying it's first and foremost a home console. Buuuut this seems totally a PR thing, like back in 2004 when they were claiming the DS was a third pillar separate from GBA. In this case, the Wii U is much deader than the 3DS, so it needs replaced first. There's also that while neither price nor battery life has been announced yet it seems both will be notably worse than 3DS for now, so it's better to talk up its console side while 3DS is more slowly phased out over the next couple years. By that point Switch can be cheaper and have better battery life, either by way of larger battery or system revisions. Maybe even a smaller variant meant more for portable play, the opposite of the XL machines the DS and 3DS got. But it still seems clear Switch is the basket Nintendo intends to put all of its development eggs into if the public will let them.

One game I was very happy to see in the video was Skyrim! With the remaster coming it was one I hoped for as there was no technical reason not to, but feared that either due to western third parties' dismissive nature towards Nintendo machines and the hardware not being out for months after the remaster's October release it would be considered too late. But here it is. Some question why it's such a big deal for a port of an old game shown in a new console announcement video. I'd say the biggest thing is it shows Nintendo getting support from companies who traditionally haven't bothered with their hardware, and showing off a type of game that's never had a proper portable version is no little deal either.

There were snippets of some other Nintendo games in the trailers, but not a whole lot to tell about them from a few seconds of footage each. The 3D Mario platformer did interest me, though--with the camera angle used it didn't seem like a "3D World" style game, and nor did it seem to be based on planetoids like the Galaxy games. So it seemed most similar to the oldest 3D Marios, Super Mario 64 and even moreso Super Mario Sunshine--and by the time this one releases it might be 15 years since SMS's release.

GameMaker Arrays

- Posted in Uncategorized by with comments

So I wanted to continue working on the system of different asteroids for different sizes. My thought is I'll have an array (or series of parallel arrays) which will have information like minimum mass, maximum mass, sprite used, name of object. Then given a certain mass it can pick only from valid options. Both a minimum and maximum are because I figure it's more interesting if there's some overlap between types of objects, rather than a flat cutoff. Or it could even be possible to have rare objects that only exist in a very narrow range. Whatever. But before doing this I needed to see how arrays work in GameMaker, and it seems... kind of stupid. More a pain to use than in other languages I've dealt with.

Thing 1: Initializing arrays. In some languages, you can just give a specific size for an array. In other languages, it doesn't set limits, and you can even use words as keys for the array rather than just a series of integers. In GML, you need to initialize every spot in the array similar to declaring a variable, before the program is allowed to do anything with it. Like for Zenzenzen purposes if I wanted to keep track of the last 10 asteroids I merged with for whatever reason, I'd first have to do some sort of loop and set lastmerged[i]=0 as a default value or whatever.

Thing 2: Initializing the data in arrays. In PHP which I've used the most in recent years, if I want to set up an array with multiple values it can be as simple as $Names = array("Josh", "Zach", "Austin", "Luke"). In GML that isn't done. I'd need to have a line for name[0] = "Josh"; and another for every other value. It seems like unless you're dealing with a very small set of data it will be the sensible thing to set up a file with the data (or a string which can be made to be treated like a file) and read that into an array with a loop.

Asteroid types

- Posted in GameMaker by with comments

Asteroid types

One of the plans from the beginning was that as the player grew, they'd see different types of objects, while thus far I've just used the one asteroid shape. Well today I've added two more. Still crude placeholders and the code working them is also basically a crude placeholder, but now that the crude way is up and running I can replace bits of it at a time.

I added in new sprites for circle and diamond asteroids, each with the same number of color variations as the original. When an asteroid is created it checks its mass. If it's over 10000, it's a diamond. Otherwise if it's over 100, it's a circle. Otherwise, it's the regular asteroid. Regardless of sprite, behavior remains the same. Also added in that pressing X creates a random asteroid at a random location on the screen, with possible mass ranging from 1/10 to 100x the current ship mass.

Here's a shot from early on, with a few large circles in play.

And later having built the ship up, things look like this. If you look closely at the ship, you can see now-small circle asteroids layered on it.

Death of a scan bullet

- Posted in GameMaker by with comments

So I previously described my "scan bullet", which I thought was a pretty interesting way to get the results I wanted, but obviously flawed. With a bit of advice from folks at NeoGAF's GameMaker thread, though, I learned of a few tricks to do it better without an actual scan bullet object. As I said there, GameMaker's help system is very nice, but it can still be trouble to find if a certain type of function actually exists if you don't know quite what to search for. In this case I learned of a few important things.

The collision_line function can take a start point and end point, and return whether there would be a collision with a certain kind of object anywhere along that line segment. The problem is, if it would collide with multiple things along that line, it seems to just return information about one of them at random. So not perfect by itself for determining what is right in front of the ship.

Lengthdir_x and lengthdir_y are used for finding points a certain pixel distance away from a point at a certain angle. So knowing where the ship is located and what its angle is, this can check for what's 1 pixel in front of it, 2 pixels in front, and so on. So it's easy enough to do a loop of this and return information on the first asteroid (if any) it comes across.

It might be the case that there would be some computational savings from doing collision_line to see if there's any collision at all, then using a lengthdir loop to make sure the closest is found... but I'm not sure how much of a savings, and for my simple project where it's only being used to check one thing probably not worth the hassle, so I'll just put collision_line back on the shelf for now.

Pork Anus, continued

- Posted in Uncategorized by with comments

I know it wasn't a serious project, but I wanted to compile Pork Anus for Android so my buddy could see it run on the phone. However, keyboard controls are pretty much a no-go, so this did involve a little extra coding to add mouse/touch control. Pac-Man doesn't move any faster, but now if there's a mouse/finger press on the screen he moves directly towards that point, and is himself angled appropriately toward it. Also added in a Game Over for the unavoidable eventuality of getting 50 green anuses on screen at once, rather than just letting it freeze.

If you want to try the new and improved Android Pork Anus, here's the APK.

Loading images from the Internet

- Posted in GameMaker by with comments

Away from home today, so I decided to try something mostly unrelated to what I've done before--loading files from the Internet. Since online databases are one of the things I do, I think it might be interesting to draw info from them into a program made with GameMaker, either as a way to make a sort of custom app for accessing the information, or just pulling live information as an alternative to only using whatever data the game has been built with. In this case I used files from the DohBell database. Since the cover thumbnail images are stored in one directory with standardized naming and each single/album is guaranteed to at least have a Regular cover, then it is easy to get a valid cover image URL from a random number.

So I made a simple sprite and object for a button inviting myself to Click. When it's clicked it picks a random number from 1 to 600 and tries to load the regular cover JPEG for that number. When that's done it goes to a new image loaded event (since to just wait for it would cause the program to pause indefinitely) that assigns that loaded image to a new "rect" object. Then to make things a little less boring and more like some kind of screensaver, I made the rect object so it picks things like a random size (from quarter-size to full size), a random speed (1-3 pixels diagonal per frame), and made the images bounce off the edges of the window.

Result: it works. Though you'll just have to trust me that things were actually moving around.

Pork Anus

- Posted in GameMaker by with comments

Something a little different today. I wasn't sure whether to bother documenting this, but what the hell. I was showing off GameMaker to a friend of mine in person, showing how quickly one could get something simple with interesting effects going, and basing it loosely on some messages he'd sent me over Steam a few days before about transforming Zenzenzen into something called Pork Anus. So here's the rundown of how our Pork Anus ended up.

Player sprite is a straight-up Pac-Man ripoff with several frames of animation for mouth opening done roughly by me deleting parts of a circle. He moves in four directions by the arrow keys, with the sprite rotating for each. This does mean going left he appears to be upside down from the regular player's point of view.

"Pork Anus" object says that in text. Appears in a random location on screen, and every frame has a chance to move some a bit on the X and/or Y axis, which in practice means it moves in kind of a jerky diagonal. Whether he goes left or right, and up or down, is randomly determined at creation. Was having problems getting this to wrap around the screen edges correctly, so instead when it leaves the screen it gets destroyed and a new random one created. When Pac-Man collides with one of these he grows by a few percent, and a new random Pork Anus is created. Also when Pac-Man gets one of these a voice clip of me saying "Pork Anus" plays.

Second object is more of a graphical anus, but still very loosely. It is the more interesting thing in terms of trying out new ideas. It moves forward at a constant speed, with every frame a chance to alter its angle somewhat--in practice this means every several seconds it takes a slight turn and keeps moving that direction. When Pac-Man hits one of these he shrinks, but not evenly by X and Y, so he ends up more stretched with time. When one is destroyed by running into Pac-Man, one is always created to take its place, and there's a chance of a second--so as the game goes on they become more numerous and hard to avoid. Also, if they overlap with each other they start to grow. With increasing numbers and that, you get a situation where they start to get impossible to avoid, but this is not exactly a Balanced Game.

Working on that object actually did bring a lapse in my knowledge up. Instead of them growing, I originally wanted two that collided to become one larger one. However, since the collision event happened for BOTH of the colliding things, whatever I wrote in would happen twice. Destroy the other object? Both get destroyed. Grow large? Both grow large. I'm sure there are ways to work around this, and I can even guess at one. Instances of objects have a unique ID, so it should be possible to get those and declare the "greater" and "lesser" one to be treated differently, so even if the code ends up run twice they would both decide to resize A and destroy B. Hopefully there's an even better way I'll eventually learn, though.

Probably about an hour spent messing around with this.