Nerd Bytes

A collection of ideas, code, DIY and other things I geek about

Overview of the Map Editor [Save Files]

When Paul and I sat down to discuss working on MoF2, I was really happy to see that he had fairly detailed design documents of the whole project. Considering the 2 month deadline he was asking, it’d have been very difficult to finish in time without them.

Taking a look, I realized that the most important thing to deal with first would be the game maps, and how they’re represented. The game maps are the foundation that govern how the rest of the game is played out.

Continue reading

New Project and Partnership!

I’d like to announce the start of my newest project!

A certain Space Cat Studios and I have decided to partner up for the release Master of Fortresses 2.

I’ll be programming the flash-based game, while Paul takes care of artwork and level design. MoF2 is being programmed in Actionscript 3 / Flex, using the lovely free and opensource FlashDevelop IDE and the awesome Flixel API library. Thus, I’ll be updating my blog with a more code-based approach this time around. Stay tuned for more!

For more information about the game, hit up the Space Cat Studios blog or this summary here.

 

 

Day 1 – One Week Countdown!

bitSpace

It’s the final stretch! I’ll be posting every day with updates on the game during this last week of the National Game Development Month.

Alongside the newest build and the changelog, I’ll be going into bitSpace’s game design, what’s really been eating up my time and slowing down development for me, and ideas that I wanted to implement but won’t be able to by the 30th. Screenshots included on the different bullet mods at the end of the post. Continue reading

Level One Complete

bitSpace - Green player, red bad guys. Nothing flashy or dangerous, I swear.

bitSpace - This is the pretty flashing color version. (runs slower than the one above it on low-end machines).

Controls:

Arrow keys: movement
Space: shoot
Z: autofire
1 and 2: Weapons
Q: Expulsion bullet mod

—–

Had some more fun with the 3D modelling program, and was able to put together a shiny title screen and a new boss. Other than missing some weapons and bullet modifiers (easy to implement, wanted to focus on implementing other things), it’s pretty much the same code but quite a bit better optimized (note how the circle fire actually sends out 360 bullets and doesn’t lag). Enough that I can run it at 640×640 without any FPS problems, which means I don’t have the upscaling issue and can throw in as many 3D renders as I want.

The first level is complete! (Yes, you’ll see three levels in the menu, but each leads to #1, that’s there for testing and layout purposes).Enemy and boss spawning work, there’s a basic boss AI + boss weapon system going on. I implemented the same player weapon system on the enemies/boss, so I can come up with some more interesting bullet patterns in the future quite easily. The enemies are flat colors as I’ve been playing around with the flashing color build. Originally, the files are greyscale, with a color overlayed on top. It’s still basic as I haven’t thought about the model designs yet.

HUD is going to make a comeback next update. For now the player can take 10 hits, and has either 2 or 3 lives. That should be enough to beat the level without too much difficulty.

Nothing is really balanced right now (leaning moreso towards easy), as the code mechanics are implemented, but I’ve been focusing on getting other things working.

Level Art Preview

I hadn’t been able to update the blog or do “new” work on the project the last week due to some family friends from Germany dropping in to visit Vancouver.

However, that’s all in the past now and I have a couple new exciting announcements.

I’ve decided on the name for the shmup, “bitSpace”. This is based on the new art-style that I’ve been playing around with the last couple days. It’s going to be a mix of 3D generated backgrounds, and either 2D retro sprites like Space Invaders with a modernized look or 3D rendered models. (Probably the former.)

Secondly, I got a chance to sit down and I’m now almost done reworking the code. I was able to fix some issues I had earlier with memory usage, letting me cram in more bullets. You really can’t have enough bullets in a shmup. And where better to shoot them on than on a lovely 3D rendered map, like below! I’m really excited, this is a huge graphical boost compared to my old crummy 2D drawn tile-map (*shudders* ick programmer art). There’s a couple issues in rendering it properly as the game is currently running at 640×480 resolution, but everything is being drawn at 340×240 and upscaled by 2x. Meaning, the current way I’m importing the level image in, it also gets upscaled and becomes extremely pixelated. If anyone knows how to get around this, I’d be glad for the help. I’ll be posting the next playable demo once I get this fixed. For now though, here’s a sample of what the first game level looks like. Right now it’s just a flat layer, but I could potentially render it in parts and put the player/enemy layers inbetween, so you can fly under/over some of the arms of the beast.

Oh and to give you a sense of scale, the player is about the size of one of the medium sized blocks in this image. These are some big abstract behemoths!

My Top 3 Anticipated Techs of 2012 | Part 1 – Raspberry Pi

I’d like to deviate from my regular postings with a three parter in the next couple weeks. Each post will talking about one new piece of technology of up-coming that I’m extremely excited for, and how I imagine this kind of tech can work together: the Raspberry Pi, the Leap, and the Oculus Rift Head Mounted Display (HMD).  (excuse me while I geek out, or rather, come and join in!)

Continue reading

Quick Update | June 11th

Latest build w/ music – 1.5mb (No Performance Monitor)
Controls:
1 to 6: Different weapon types
Q: Toggle “Expulsion”
W: Toggle “Slingshot”
E: Toggle “Suction”
Z: Toggle Autofire
Arrow keys to move
Space to shoot
—-
  • Performance monitor added in. You can find the source here, by Mr. Doob.
  • Fixed the scrolling background and added in a new background map. Scrolling looks a bit goofy at the top of the map, I know, it’s due to map design. Map creation is done with DAME, while the tile-set + all other graphics are created with free version of Graphics Gale.
  • Fixed the HP bar.
  • Added in a placeholder music track for the level, Pressure by yd. Nicely done piece with exactly the mood I’m going for.
  • Enemy bullets up to 120 max at once.
  • 1 second invincibility state after getting hit. No more instantly getting gibbed by a group of bullets.

Currently I’m playing around in FamiTracker, seeing if I can compose something. There should be another update late in the afternoon/evening. Thinking of setting up levels with proper mob spawning and collide-able objects.

 

Huge Update

Game – Latest build

Controls:
1 to 6: Different weapon types
Q: Toggle “Expulsion”
W: Toggle “Slingshot”
E: Toggle “Suction”
Z: Toggle Autofire
Arrow keys to move
Space to shoot

—–

 

Update: Bug in collision detection fixed, should be playable. Resolution bumped up to 800×600.

 

Yesterday I was able to sit down and knock out a bunch of things I wanted to do. A lot of it was behind the scenes stuff that’s not visible in the demo. This was partially due to the nature of things, and partially because I got distracted while coding and haven’t finished/fixed it yet.

  • Game states! There’s a menu (with a shiny button), the infinite loop scrolling level, and a game over state. This with the maps means I can start making different levels.
  • Maps / Scrolling background! I broke this. Got distracted while editing, and it got fubar’d. Should be in next update. Oops.
  •  Enemies got a few upgrades.
    1. X velocity randomly generated so they don’t just move down in straight paths.
    2. They now shoot! Phew phew.
    3. They now spark when hit.
  • HUD with score / lives / HP bar. HP bar will be in the next update. Guess what else I broke while distracted?
  • Pixel perfect hit detection on both your bullets and enemy bullets.
  • 3 new graphics: two powerup boxes and 1 WIP boss idea I’m tossing about. The globes on him would be the weakpoint hitboxes. The 3 on the back would require curving the bullets to hit them.
  • Some soundclips finished but not included in the build, should be in next update.

WeaponTypes / Modifiers

Update: Added in a third modifier.

——

One of the reasons why I decided upon the shmup genre was an idea that came into my head about weapon modifiers. Usually in shmup games, we see either X different weapon types you can cycle through, or a single/group of weapon types that get upgraded via power-ups. There’s been some interesting twists on this. Take the Force Device from R-Type 3. You choose 1 of 3 devices that distinctly modify the weapon type power-ups. Not only that, but the device can be used to block bullets, attaches on either side of the ship (changing weapon firing direction respectively), and if released from the ship can act as a turret. This is a badass game mechanic that makes your game distinct and memorable, while adding in a new complexity and challenge.

I loved this in R-Type 3, and it got me thinking on what kind of weapon modifiers one can implement to make using weapon types more interesting. Rather than having another ship, I wanted to modify how the bullets themselves interacted. Poking around, I implemented two so far that I was pleased with, the “expulsion” and “slingshot” modifiers. Skip to the demo at the end if you just want to go in and play around.

Weapon Types: (Keys 1 to 6)

1. Basic double shot firing upwards
2. Basic double shot firing upwards + downwards
3. Basic quadra shot firing upwards
4. Circular ring shot
5. Quarter Semi-circle shot
6. Shield shot (Moves with player while this type is selected. If weapon type changed, bullets become inert and sit in that location until destroyed or until the Shield shot type is selected again. At this point, they dash back around the ship.)

Bullet Modifiers: (Keys Q and W to toggle)

Q. Expulsion – With this on, the bullet’s x location is checked against the player’s x location. Depending on the difference between the two, the bullet’s x velocity is changed to “push” the bullet away from the ship. The further the bullet is from the ship, the faster its x velocity becomes.
W. Slingshot – With this on, the bullet’s y velocity when shot is normal. During a small delay, it decelerates until it hits half that of the regular y velocity,  then has its y velocity increased by 3x instantly.
E. Suction – With this on, the bullet’s y velocity is changed to always moved towards the ship.

I chose the “gravitational” modifiers (Expulsion and Suction) to affect all bullets on screen, rather than the bullets launched after a modifier was toggled. This creates an interesting strategy of pre-launching bullets and using modifiers to aim and attack. Something like this could be implemented as a strategy versus a boss who’s very hard to hit, has a minimum damage threshold you have to overcome, etc that using only the regular given bullet types is impossible to do so.

—–

Bullet Demo – Updated

Controls:
1 to 6: Different weapon types
Q: Toggle “Expulsion”
W: Toggle “Slingshot”
E: Toggle “Suction”
Arrow keys to move
Space to shoot

Blog is Live!

Welcome to my new blog detailing all of the computer-related ideas that I’m working on. I’ve set this up as both a motivator to start finishing my projects, and as a way to document and organize my work.

First up, I’ll be participating in the National Game Development Month (NaGaDeMo), from June 1st-30th. I’ll be coding in Actionscript 3, using the Flixel platform (with Flixel Power Tools), to create a SHMUP. Definitely one of my favorite genres of games growing up, with such classics as R-Type and Gradius having eaten away at hours of time and patience. Most likely doing my own pixel art, but I’m completely unsure what I’m going to do about the sounds/music for now.

Other foreseeable projects include a lot of tinkering around on my Raspberry Pi (RPi) once I’ve received it sometime late this month. Depending how NaGaDeMo goes, I might push back RPi dev until July. I also have some hardware DIY stuff that’s been on the backburner since forever, that I’m hoping to move from my Arduino to the RPi.

For anyone that’s curious about the site, I registered my domain and hosting through Nixihost. Great company, you should check them out if you’re thinking of setting up your own site. Currently running WordPress unless I find a need for something else.