Thursday, April 28, 2016

Drake - 10 Bands - Design Decision: Music

Quality Reduction/Editing:

To get the sound bytes desired, I found a copy of the song and imported it into Audacity. There are eight different sound bytes used taken directly from the song "10 Bands". That doesn't include the gunshots firing sound byte I took from the song "Energy" or the song "10 Bands" itself. When exporting from Audacity, you most likely want to use the Ogg Vorbis codec as it is widely used on multiple platforms and has great compression. You can also choose the export quality (the lowest setting for this project). Lesser quality will create bytes that are smaller in size and because this is a mobile phone game, the quality is not nearly as important as if watching a High Definition movie.

When and Why?:

The 10 Bands, 50 Bands, and 100 Bands bytes are used before starting their respective level. During the level the full song plays in the background. If you collide with a phone it will play one of two sound bytes regarding Drake not using his phone. If you collide with a sleeping person, one of two sound bytes will play regarding Drake not "trippin'" and letting other sleep or rest in peace. Because there are two different phone sound bytes and two different sleeper sound bytes, I flush booleans to the app preferences saying which sound byte was played last regarding their respective reason of loss. This way the other one will always be played, even if you leave the app. You'll never hear the same death sound byte twice in a row. Before playing one of the collision bytes, I play the gunshots clip from the beginning of the song "Energy." I thought it was a nice way to tell the player that they just lost haha.

Always?

No. Of course I included options to turn off both the sound and music individually. These bytes get old fast and some people might find this game easy, but some will have difficulty. I know they don't want to hear gunshots endlessly. I even included a "locked" setting regarding the music. If you beat the second level you can utilize that setting.

Drake - 10 Bands - Design Decision: Art

Software:


Guidelines:

  • Put multiple images into one giant image (texture).
  • Make your textures width and height a power of 2 (i.e. 128x64).
  • Technically you could take every single texture you have and make one giant mega-texture but it's okay to keep them separate for quick and easy access. No need to have one texture for Drake's animations and the sleeper's animations.
  • If you're not an artist, find free art at OpenGameArt.org. Always accredit the artist how they prefer to be credited. Anything that is CC 0 is free to use and modify for commercial projects. Most things that are CC 3.0 can be modified and used for commercial products, but it is up to the artist to decide and it will usually say whether you can or not on the art page. I try to stay away from anything that doesn't fall into either of these two categories.

Art I Used:

  • Bands: I looked at a couple of different images for money and decided this was the best one. Most images regarding currency were coins or rings and that didn't fit the theme very well. I merged two of the images together because I wanted the dollar sign on the one image hiding under the rubber band of the stack from the image next to it.
  • Sleeper: My sleeper image is based off of an image depicting a man who is drunk and has fallen asleep next to his work computer. I decided to make the shirt green on a whim and the hair blond because that's how I look. After play-testing I decided to keep them because it looked similar to the colors used on the bands of money. This would make it slightly harder for players to tell where to go if playing for a faster time.
  • Floor Tiles: The blue color of Kenney's tiles looked really nice and somehow I always end up using some of his art in a project of mine. He just happens to have anything you would want but it's always just so cute. I only used the blank tile, none of the lettered ones.
  • Arrows: The arrow was taken from here and applied to the same tile I use for the level floor. The arrow tiles are sized to be 128x128 pixels while the floor tiles can vary depending on the size of the screen being played on.
  • Phone: I needed at least one phone and decided to use an iPhone looking image. The first prototype had a dark background so a white phone made more sense. After adding the tiled background I never changed the phone or tried different styles so that is something to consider design wise. Maybe a darker phone looks better against the light blue of the floor?
  • Drake: I had looked for images of Drake and found multiple that fit a video game style. I originally thought I would use one in particular. Was thinking I could have an overly exaggerated head, like a bobble-head, and stick figure lines for legs. I imagined endless animation of the legs jiggling around to provoke an attentive feeling from the user. I actually ended up emailing the artist of that image to ask for permission to use it and he never responded. Later I saw the art for Nothing was the Same and it appeared to have a copyright that seems like I could modify it without selling it. I decided to go with that and didn't wait any longer (thank god cause he never responded anyways). I should reach out to Emilio and let him know I'm using his art so he can also have the right to revoke me for copyright infringement (if I am infringing). I took his head image and planted it on the body of another image. This was faster than drawing stick figure legs and probably had better feel regarding collision detection.
    • Side note regarding collision detection. Phones can only be collided with by Drake's upper body and lower body, his head does not count. Sleepers can only be collided with by his feet, so it feels like he is literally walking on them. I gave Drake two different rectangle attributes for these different collision detection choices and I think it added some realism to the collision.

Drake - 10 Bands - Design Decisions: Code

*DISCLAIMER*


This information regarding code is not meant to:
  • Show you how to get your IDE setup
  • Show you how to import LibGDX into a project
This information regarding code is meant to:
  • Go over some design choices I made considering the framework at hand
  • Explain how you can modify the code to create your own levels/obstacles.
  • Cover some OOP concepts regarding game architecture.

This is not basic game design instructions. If you are looking for that, please go follow LibGDX's guide to making a simple game first and build off of it with the simple game extension like I did. Most of the information on their wiki page explains different things that I utilized such as animation, stages, using the accelerometer, etc. etc. I will cover some of those topics lightly.

*END OF DISCLAIMER*

Copied Code:

Classes include:
  • GenericActor
  • HorizontalMovingActor
  • VerticalMovingActor
Some code I utilized from a completely different game I had been working on three months prior to starting 10 Bands. During that game's development process I had to make use of stages and actors extensively because it has many layers to it. The Drake game didn't have many layers, but it was much easier to create one stage to have moving actors (phones) on instead of trying to keep all of their positions updated via their particular level class. It keeps code use to a minimum and already came with some animation looping settings that I was able to apply to the sleepers.

Horizontal and Vertical actor classes extends Generic Actor and Generic Actor extends the base Actor class that LibGDX supplies. Mine are built to take in parameters such as single/multiple texture regions to use, positions to be drawn at (starting and ending for moving sprites), floating value for speed in which the objects move, and booleans to state whether the animation should stop when it reaches its destination or continue going and whether or not to flip the textures when they return (such as a sprite that needs to face a certain way when heading in that direction). My HorizontalPhoneActor class extends HorizontalMovingActor and only has code telling it what to initialize regarding how it works as a horizontal actor. The same goes for my VerticalPhoneActor class.

Other Extensions:

After finally mocking up the screens and determining how I want my menus to look, I noticed that some things didn't change much between said screens:
  • All of them had a button in the top right that either said "Back" or "Quit."
  • They all had a title.
This was a perfect opportunity to create one screen with these options setup and to have my other screens extend them. My particular screen class included:
  • A string parameter that could be defined upon calling it where it would be printed to the same spot always in the center of the screen horizontally. If you go through all the menus you can see what I'm talking about.
  • A button already created which only needed to be defined for its action in the class extending this one.
The main screen class that the rest of the screens extend is GenericMenuScreen.

Best OOP Practice:

More extending! No seriously, in every level you have to:
  • Draw Drake
  • Check the collisions of Drakes various rectangles against the rectangles of the bands, phones, and sleepers
  • Play music and sound bytes
  • Draw floor tiles
  • Save record breaking scores/times
Why would you not put all of that into one class and have your levels extend it? There is so much code there I would hate to see it copied for each class. The main class is Level in which all of the level classes extends.

Tidbits:

  • The game is in landscape mode so I move Drake on the X axis based on the phone's accelerometer Y values and vice versa. If the game was in portrait mode then I would've used the X and Y values naturally to move him along those respective axisissys

Drake - 10 Bands - Post Mortem

Story or "Why I decided to do this to Myself":

"If you're Reading this it's too Late" came out and it was pretty awesome. A friend of mine would occasionally sing the chorus to "10 Bands." I thought it was silly... 10 Bands... 50 Bands... Every time my friend sang it I would imagine Level 1... Level 2... Level 3... I would say "This is a video game. It's not even a song. Every level you need to get those bands to proceed!" I swear I said that for an entire year. If I heard it in a bar, at a club, from a friend, on the radio, if it was processed in my brain it was processed as VIDEO GAME. In early April, Drake announced that "View from the 6" would drop at the end of the month on the 29th. On April 12th, it dawned on me that I should create the game particularly for the release of the album. It would be a great challenge to complete a game in two weeks. Kind of like a game-jam for myself. I had been working on a separate video game for the last 3 months so I already had the motivation and some foreknowledge regarding LibGDX. It could be a great learning experience and maybe I'd release some tutorials on how to make your own game. I thought it would be easy, but I was wrong.

Making Games is Hard:

What I already had planned in the one year I was stewing on this idea:

  • Make three levels: 10, 50 and 100 Bands.
  • Use the accelerometer for the movement of Drake.
  • Put the song 10 Bands in it.

THAT WAS IT. In the real world that isn't good game design. That's not even a game-spec. It's bullshit. You don't walk to your devs and say "Code a game about Drake using these three facts." And you definitely don't do the same for your artists either. Good thing the sound was already decided right? Haha.

April 13th, 2016:

I followed the LibGDX guide to make a simple game as my starting point and built upon it using the simple game extension. From there I added accelerometer detection and had a sprite moving around based on phone movement. I was on a roll!



April 14th, 2016:

I added band generation and collision detection. If you collided with a band it would add one to your score and generate a new band immediately. I also had some screens in between starting a new game just because the simple game guide had some to begin with. I determined that the obstacles to avoid would be phones and people sleeping, if you play the game or are familiar with the lyrics, then you will understand. Still on a roll!



April 16th - 23rd, 2016:

This entire week was spent making the levels and getting the core design to work. These seven days were the best of the fourteen used on the project. I'm a pretty decent dev so bug fixes were smooth. The other game I was pausing development on had classes I could copy over and use in this game, so that saved time too. I also had to have a background because it made moving obstacles easier to gauge as to where their boundaries could be. I was sailing, so fast that I thought I would be done with the game by the end of the weekend.

April 24th - April 26th, 2016 or "The End?":

A word I threw around a lot during these days was "fuck." I had no idea how the UI would look, but I'm not bad with design. UI wasn't even important for this game. Seriously, the game is free. Good games are about good game design, not about how pretty your UI is. I figured I would just throw something together real fast and be done with it. Well guess what it took three fucking days to do the UI and they were the worst. Highlights include:
  • It took forever to get the buttons to work because every tutorial I followed was missing one particular line of code needed that sets the boundaries of buttons for touch detection.
  • I redid the title screen three times. There are at least seven screens in this game and it took me one day to do the first one.
  • The "With My Woes" font I downloaded did not have numbers. I had to use a separate font for anything that had digits. It just looks bad having two very different fonts against each other like that.
Not having mock-ups or a general idea of how things will go is the biggest mistake you can make in software or game design. I'm glad this wasn't a project being made for profit. It's experiences like this that will make you a great game developer, but it will not be this game that has what I learned about decent UI planning. Without a plan, you are literally just wasting time walking around in the dark. I was up until 2am or later each of these nights. Work this week was excruciating because I was coding literally all day. Go to work, code. Come home, code. My emotions became numb. On Tuesday I had finally finished the screens and decided to finish that night. I wrapped up the designs for each level and tested exporting the game. It worked fine, so I uploaded it to the Google Play Store for my friends to beta test before the Friday release.

























April 27th, 2016:


My game got suspended from Google Play for copyright infringement. Not even the beta testers got to see it. I wanted to make multiple games based on music/lyrics, so future games cannot be uploaded there. I also wanted to buy a MAC and possibly release an iOS version but they actually have a week long review process so I'm sure it would get revoked from them too. I decided to appeal.


April 28th, 2016:

They said no. At this point I am like "well eff my life." All I wanted to do was make a game for fun. I didn't want to profit off of Drake (besides learning more code related to LibGDX and maybe getting some followers for a future game I'd actually sell). There is honestly nothing to be gained currency wise from a game you rush to complete, beginning to end, in two weeks. I went to the bar after work and when I got home I decided "What the hell? Let's make the post-mortem and write some tutorials!" I uploaded the Android apk and source code to my Google drive and started writing this article. It is now 11:47pm. Drake's "Views from the 6" has premiered on his OVO Radio show through Apple Music. I'm going to be up for a couple of hours writing some tutorials.

Saturday, March 5, 2016

Screenshot Saturday: Snazzy Effects

Reddit's doing Screenshot Saturday. The topic is Snazzy Effects. All I've been working on in my game lately is effects. LET'S CUT TO THE VIDEO:


It's kind of hard to see objects in the video so here's some screenshots:



Thursday, March 3, 2016

1000%!! I USED TO GIVE A FUCK

I'm messing around with parallax layers. Hills, clouds, water, moon. It's pretty noisy but it'll get straightened out:



I also got a power up inspired by the No Love music video!


Sunday, February 28, 2016

Spread Eagle: Power Up Demo Video

I've made lots of progress on my current video game! I spent a lot of time updating classes and restructure the architecture, but hopefully it will speed up level development. There were plenty of bugs to fix regarding targets animating incorrectly (and there's a bug in this video if you look closely). But once all of those were fixed, adding more items to the level happened to be much more interesting.

This video shows:
  • Different items that can get hit
    • Non-animated and animated targets
    • Targets that fall over when you hit them
  • The power up effect given when you hit a mushroom
  • Different sounds/music I'm using

Some quick facts:
  • I'm trying to finish this game before April, because of thew time crunch there will probably be only one level.
  • The thumbnail of my video is the same thumbnail of Death Grips music video for the same song. I also named the video the same as theirs, hopefully it tricks people into seeing my video.