Mark Grealish

Cats and wizardry.


2012

July


Progress!

Apologies for the terrible quality.

[XNA] Create an infinite background texture loop

Update: I created a standalone class here. I don’t like to resort to third-party instructional guides for most goals. While I’m perfectly happy to use a specific step in the solution to the problem, I prefer that my answer to be my own as much as possible. This is simplified example code for XNA to […]

[XNA] I shall not fear. Fear is the mind-killer.

I am Negatron One. In any stressful situation, I immediately assume the worst possible outcome will ensure, and act accordingly. Coding-wise, today was pretty fucking stressful; although I came out the far side of it with some valuable lessons learned, and some great reusable code, all I think is “I’m a failure!” I’m not. Here’s […]

Know your robots: N.E.P.T.R.

[XNA] Muzak

I decided last night that my repeat project would be a timed side-scroller that featured a catchy chiptune soundtrack. To that end, I need an encapsulated MP3 player that can: Load an .m3u file Offer random forward seek. Backward seek to a. the start of the song, and b. the previous track. Be pausable and […]

[XNA] Current status.

Scrolling, layered backgrounds, user input, and a soundtrack: Working. Next target is collision detection and improved font (read: Less messy) font handling.

[XNA] Muzak II

I did some basic soundtrack-handling last night. I ran into problems getting it to run before I discovered that Content.Load(bar) can only be called from the main class. That was a bit of a pisser, and it forced me to rewrite my class. I am defending its existence on the grounds of potential extensibility. class […]

[XNA] What is my actual summer assignment?

Entirely for my own benefit, since I keep forgetting, and hate delving into Windows Live every day: Create an empty game project in Visual studio 2010. Add the Code and Content files found (in the Live Group). In the Game1 class: Add the using namespace AnimatedSprite to access the classes from Game1. Create a new […]

Transmogrification…complete!

[XNA] Front menu

I need to spin this off into its own class tomorrow.

[XNA] Rage murder kill.

Let’s carry on from last night. While I know I said that I was going to delve into collisions next, I wound up seguing into game state instead. There’s a great write up on game state here, but if you’d like a TL;DR, then simplest way to describe game state is thus: if (X == […]

Molten Core? More like Molten CORED.

Legendary x2.

[XNA] Meet the Flyer

Know your robots: R2-D2

Know your robots: Maximilian

Know your robots: MSE-6

@dairequinlan

[XNA] Flyer Spritesheet

Know your robots: Bender

What does Bender do? Break rules. I had Bender fully drawn from the front for this picture, and while technically correct, it looked stupid; Bender is almost always shown in Futurama in profile or perspective. It looks better, and it’s a hell of a lot easier to draw. The arms stuck straight out because Photoshop […]

Bwahahahahahaha

It’s a great start to a Saturday when you challenge your asshole former rated team leader to arena wargames, and then crush him repeatedly, to the point that he rage quits out of the game.

The Siege of IOC-558

(Blatant DS9 reference.) For a non-premade game (I went in with three friends, the Alliance defence was exceptional; we lost all of the bases almost immediately, and we were pushed back to the keep; at one point in the first ten minutes High Commander Halford was down to 50% health. Through luck and strong (strong) […]

[Bash] Download an Imgur album

If I see one more rectangle this morning, I will scream. Instead I am writing a very simple Imgur gallery downloader for a friend, using extant Bash utilities. #!/bin/bash wget $1 LIST=files.list mv $(ls -1 .) $LIST # Strip the file down to the actual image links. cat $LIST | grep href | grep jpg […]

[Bash] Download ALL of an Imgur user’s images

I’ve consulted Imgur’s API and asked around: There does not seem to be any download limits in place. That said, my script does place nice, and you can throttle requests if you wish. Imgur’s API does include a way to just fetch a list of a user’s albums and their respective images, but I’ve spent […]

Know your robots: Wheatley

Know your robots: Zoidberg

Completely non-canon, but why not?

The two faces of Garrett Grealish

The two faces of Caira Clanton

091 Labs…

Putting the “hack” into “hackerspace” since 2010.™

ICE CREAM ICE CREAM ICE CREAM

Because it’s that kind of day

[XNA] Collisions (and a general update)

One of the coolest things in older video games (read: Asteroids) for me was the wrap: The sprite moves off the screen and smoothly appears on the far side. Imagine my crippling disappointment this morning when I started playing around will collision detection and discovered that it is basically eight lines of code: if (rectangle1.X […]

[XNA] Player class v1.0

Pretty basic: Take in a basic sprite and movez0r it. About the only part of the code I am actually happy with are the keyboard controls; I simply pass the KeyboardState to the class and let the class worry about it. // Move player. player.Move(Keyboard.GetState()); Easy. My next project is timers.

[XNA] Keeping a sprite on screen

I’m making a class for collision detection right now. if (rectangle1.X < 0) rectangle1.X = 0; if (rectangle1.Y < 0) rectangle1.Y = 0; if (rectangle1.Y + texture1.Height > gameHeight) rectangle1.Y = gameHeight - texture1.Height; if (rectangle1.X + texture1.Width > gameWidth) rectangle1.X = gameWidth - texture1.Width;

Bwahahahahahahahaha!

‎[W From] [43:Waynne]: My alliance guild has a “contract” on you that if we take a screen shot of killing you we get 1k, I can pay you but my hordies only have like 40g

Charon’s first adventure

[Bash] Prep version 3

I use a fairly basic script that formats pictures, uploads them via Dropbox, and inserts paste-ready HTML code into my clipboard. With some minor modifications this script can be used on Linux, Windows (Cygwin), or OS X. Taking a break from animating sprites, I wanted to improve this script, in order to reduce my work. […]

[XNA] What is Flyatron?

I’ve been working on the individual components of Flyatron without giving much thought to what the end game will be. Here it is: It is a single-player shooter/survival game. The player character, the H.E.R.O. Egregious Robot Ordnance (H.E.R.O.). The player is relentlessly pursued by a Malevolent Airborne Robot (M.A.R.). The M.A.R. is a simply a […]

Know your robots: K-9

[XNA] Timed events are working.

/toot

[XNA] New sprite guy

I am currently animating my PC, and found that the non-circular helm on the old PC sprite made my life a complete pain in the ass. Rather than fine-tuning every, single, frame, I redrew him with a circular helm. Also, more pixels.

[XNA] Ridiculously simple animation.

Pastebin. About 14 hours of work, learning from scratch. A fair bit of this time was spent in revising the sprites to fit.

[XNA] Flying Flyatron fly-mines!

This was my week past

[XNA] Flyatron’s on the final stretch

Remaining to do: Fix scoreboard (it doesn’t collate correctly). Import gun/bullet function code (already animated). Animate player death. Animate new game. Add power ups. Add sound effects. Only the last item presents any great difficulty.