Friday, November 23, 2012

Latest and greatest updates...

Can't believe it's been 18 days since I last posted...@_@  Been really busy with applying to jobs and what have you, and I guess I kind of forgot about updating my blog.  So I got about 10 applications out right now, since I got back home.  Been working on programming various new tools and such for a new project.  Altered a bunch of new stuff as well, which has been an excellent project to take up time.

I've been working on my GUI XML tool, and it's come a VERY long ways...I spent about 10-13 hours working on it over the course of thanksgiving, along with altering the Parser Library class to include a few more variables and methods.  The GUI tool I made before used a system where you would click on a save and display button to show your current updates, and it only saved part of the variables in the system, not all of them (which would explain some problems I had in Harper's Gate).  So I changed a lot of how it saved and loaded content, and gave it an automated system similar to my Level tool.  Over the course of the day, it was mostly testing the program, and adding in fail-safe systems into the Parser Library...In fact, I set up a system to help save space in the XML files.  It reduced the lines of XML by about 20-30 percent, and also helps with keeping track of all the default variables.  It's rather nifty.  ^_^

Also, I figure since potential employers are viewing this, I should avoid saying things like shazam bitches on here...>.>  Not very professional of me, and since there's a lot of hell being raised about things like facebook posts, I will assume the same for blog posts.  However, as a note to said potential employers...I would be an awesome and fun addition to your team!  ;-P  I'm a very high energy person, and if I got a job, I know I'd work my tail off to get everything done in a timely, and professionally executed manner.  So don't judge me by my blog language...

Anywho, I'm signing off so I can go update my wordpress...o_O  Take care!

Monday, November 5, 2012

360 input stuffz and cheat code...coding. o_O

So yesterday I decided to buy a cheap 360 controller (Only on the cost...Razr Onza Tournament Edition ftw), and test out the input in XNA 4.0.  To say the least, I got a lot of stuff done with it, and am very fond of my new controller, despite not having a 360...although now I can enjoy a good game of Borderlands 2 with a controller instead of a mouse/keyboard.  ^_^

Aside from that, I got some code in that makes the controller vibrate every 2 seconds, it's rather fun...although if you don't change the vibration back to 0, 0, it'll keep vibrating.  o.o  Only way to fix that is unplug it.

Other than that, I found more about the variables used for the controller, like how the analog sticks use a normalized vector (basically max of 1 in either x or y) for its direction, which is very logical and useful.  The triggers also use a float to determine how far pressed they are.  I notice some FPS games basically use a hair trigger for shooting, and it drives me nuts that you can basically tap the right trigger or left trigger, and it'll fire.  It seems like something that could easily be customized by the user, how far they have to press before firing. I suppose there's hardware out there that's for it, kind of like the resistors on the Onza sticks.

Anyway, as for the last thing in my title, I set up a system in my game for making cheat codes using a string...>.>  So basically what it does is use a timer, whenever you click a button, the timer is reset to 0, once it hits 60 (1 second at 60 FPS), it resets the combo text.  So basically if you can type in a combo within 1 second of each press, you can create a cheat code...I decided to use the epically amazing Konami Code as my example, so the combo text is basically "upupdowndownleftrightleftrightba", although this can easily be shortened if you really wanted to...Once the konami code is inputted, it displays a lovely little text of "SHAZAM BITCHES!" under all the other mumbo jumbo in my test.



So that's basically the display of the program.  I created a TextObject class, which basically draws a single string to the screen with a black background.  This is the basic class for the object:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace InputTesting360
{
    public class TextObject : DrawableGameComponent
    {
        public string text;
        public Vector2 pos;
        public SpriteFont font;
        protected Game1 parent;
        protected bool vibrate;
        protected int timer;
        protected const int maxTimer = 60;
        protected string combo;
        protected GamePadState prevState;
        protected string output;

        public TextObject(Game1 game, SpriteFont font) : base(game)
        {
            this.parent = game;
            this.font = font;
            vibrate = false;
            timer = 0;
            output = "";
        }

        public override void Update(GameTime gameTime)
        {
            //Might make the text follow the mouse around, or maybe the controller.
            GamePadState gps = GamePad.GetState(PlayerIndex.One);
            bool a, b, x, y, dup, ddn, dlf, drt;
            a = gps.IsButtonDown(Buttons.A) && prevState.IsButtonUp(Buttons.A);
            b = gps.IsButtonDown(Buttons.B) && prevState.IsButtonUp(Buttons.B);
            x = gps.IsButtonDown(Buttons.X) && prevState.IsButtonUp(Buttons.X);
            y = gps.IsButtonDown(Buttons.Y) && prevState.IsButtonUp(Buttons.Y);
            dup = gps.IsButtonDown(Buttons.DPadUp) && prevState.IsButtonUp(Buttons.DPadUp);
            ddn = gps.IsButtonDown(Buttons.DPadDown) && prevState.IsButtonUp(Buttons.DPadDown);
            dlf = gps.IsButtonDown(Buttons.DPadLeft) && prevState.IsButtonUp(Buttons.DPadLeft);
            drt = gps.IsButtonDown(Buttons.DPadRight) && prevState.IsButtonUp(Buttons.DPadRight);

            text = "Packet#: " + gps.PacketNumber;
            text += "\nController 1 is connected? " + gps.IsConnected.ToString();
            text += "\nLeftStick Vector: " + gps.ThumbSticks.Left.ToString();
            text += "\nRightStick Vector: " + gps.ThumbSticks.Right.ToString();
            text += "\nLeft Trigger: " + gps.Triggers.Left;
            text += "\nRight Trigger: " + gps.Triggers.Right;
            text += "\n" + output;

            if (a)
            {
                combo += "a";
                timer = 0;
            }
            if (b)
            {
                combo += "b";
                timer = 0;
            }
            if (dup)
            {
                combo += "up";
                timer = 0;
            }
            if (ddn)
            {
                combo += "down";
                timer = 0;
            }
            if (dlf)
            {
                combo += "left";
                timer = 0;
            }
            if (drt)
            {
                combo += "right";
                timer = 0;
            }

            if (combo == "upupdowndownleftrightleftrightba")
            {
                output = "SHAZAM BITCHES!";
            }

            timer++;
            if (timer >= maxTimer)
            {
                timer = 0;
                combo = "";
                //output = "";
            }

            prevState = gps;
        }

        public override void Draw(GameTime gameTime)
        {
            parent.batch.Begin();
            parent.batch.DrawString(font, text, pos, Color.White);
            parent.batch.End();
        }
    }
}


Unfortunately I don't know how to add in code snippets, if I did, I would totally do it.  -_-  But yeah, this, added onto the following Game1 class would give you everything you need to load the game, excluding the TNR14 variable.  That's just a TimesNewRoman size 14 font I use...

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace InputTesting360
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        public SpriteBatch batch;
        TextObject text;
        SpriteFont font;

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            base.Initialize();
        }

        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            batch = new SpriteBatch(GraphicsDevice);
            font = Content.Load<SpriteFont>("TNR14");
            text = new TextObject(this, font);
            Components.Add(text);

            // TODO: use this.Content to load your game content here
        }

        /// <summary>
        /// UnloadContent will be called once per game and is the place to unload
        /// all content.
        /// </summary>
        protected override void UnloadContent()
        {
            // TODO: Unload any non ContentManager content here
        }

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // TODO: Add your update logic here

            base.Update(gameTime);
        }

        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            // TODO: Add your drawing code here

            base.Draw(gameTime);
        }
    }
}

Tuesday, October 30, 2012

Jobs jobs jobs...wherefore art thou jobs?

If you made some kind of association with Steve Jobs from the title, I smacketh thee...I'm trying to focus a bit more on the job market, however the last couple of days have involved being stolen away by my cousin for one day, and today another cousin visited.  Soooo, I've been kinda busy.  >.>

Also, happy halloween!  I made up a pumpkin today with my Grandfather today as well, although I only got to add on some nifty scars, and a blood splatter, it actually turned out really well.  Unfortunately the light he put in it doesn't work...but I'm sure he'll jury-rig something up.  o_O  That always has been his specialty.  But the amazing thing is, despite being jury rigged, everything he does works...better than most stuff too.  Although it may not be pretty, it damn well does the job.

So yeah, right now, I'm finally getting around to blogging a little bit, it's kind of nice really to relax a bit and explain my plans.  I wrote a little list of all the crap that I need to do over the next few days, so whoever is reading this, please tell me what you think!

  • Update my portfolio
    • Harper's Gate stuff.
    • Add images for each project.
    • Coding examples from each project.
    • Make downloads easier to find.
    • More personalized
    • Add this blog in there.
    • Add portfolio to Facebook and LinkedIn
  • Find jobs to apply for.
  • Make semi-generic cover letter
  • Update LinkedIn/Facebook profile a bit.
  • Update my resume.
  • Add Portfolio to blog.
Now something to note is that all of these things don't have any specific order, they're just written out as things to do.  What will actually get done, I have no clue.  :-P  We shall see yes?

I was also considering changing this blog to look a bit more like my WordPress blog.  If anyone has any opinion on that, feel free to comment, thanks!

Friday, October 26, 2012

Finally unbusy!

Harper's Gate has officially been turned in for school!  The game really was never completed, sadly enough, however it turned out far better than I could have expected.  :-)

This means I'm officially done with school through DeVry!!!  Took me long enough, right?  Hehehe.  Onward to the job market, I'm officially available for employment as a computer programmer.  Doesn't matter what field for the programming, I am willing to do just about anything really.  Game's are definitely my passion, however I know it's really difficult to get into video games and the business itself is very difficult on programmers.  Right now I would much rather get my career going as a computer programmer than hop directly into video games.  Plus, I'm sure I can get a lot of work experience and more coding experience outside of video games.  For the few readers out there, wish me luck with my endeavors!  :-D

Wednesday, October 3, 2012

Long time no see huh?

Well, it's been over 2 weeks here, sorry for taking so long to post.  Been extremely busy with school.  @_@  So much craziness with school, it's not even funny.  Absolutely tired of it, however, it'll all be over with soon...

Anyway, I got a LOT of work done on Harper's Gate over the last couple of weeks.  I made a series of context objects, which acts as things like minerals, plants, and other things that you can interact with, i.e. collect resources from.  It's still in the baby phases of actually working...I'm focusing on getting assets created right now, so that's been a bit of a hassle.

There are many great things that have come out over the last week or so, including images, and various other things...Anyway, here's a basic list of images I made via GameMaker.













Each of these strips of images were created with Game Maker, it helps having the automated strip saving system...and the transparency.  I don't have any decent programs for making these images other than Game Maker, so yeah...These are strips of images I'm using.  From top to bottom, we have a grass strip, ingot strip, magical book strip, mineral (context object!) strip, ore strip, paper, pickaxe strip, Gate strip, potion strip, E button strip, stairs, and a flower of some kind...

These strips will be useful in many ways, the ores and ingots, for instance, show the different types of ores and ingots available, the book shows the inventory image of different levels of books you can find.  The pickaxes act the same way.  The portal image may be hard to see, but it has a transparent key hole in the center, and it's meant as an animation, rather than a single image.  Same goes with the E, however it's meant to loop back and forth.so it glows red, then back.

One of the unfortunate problems with Game Maker's strip system is that it makes it just that...a strip.  It does not make a grid shape, and if you have a fairly large image, the original image can go on and on and on...I don't have the tools to help me cut it into different sequences, so I'm just stuck with this.  @_@  I shall live though...

Anyway, hope you guys have enjoyed.  I'll try to post sooner, but judging by the way school is currently going, I will probably have a rough time doing so.

Saturday, September 15, 2012

Little to no news so far...

So, I've got school going, and I think I've got an idea for the things I want to change a bit...I need to add in the sound system for my game, since I completely overlooked that before...I didn't want to have to deal with sound yet, soooooo I'm SOL on that now, I need sound.  I'll have to make all the sound effects, music, and artwork for this game too.  -_-  So you'll be seeing more updates in the art department.

Speaking of which, I hope you enjoy the next pictture.  This is meant to be a sprite with the different item icons for pickaxes, and eventually what Harper will also use, once I can animate them.  @_@  


So yeah, I still need to work on some other stuff today, tomorrow, and for the rest of my life on this program...@_@

I had some small ideas for the game that I wrote down last night.  The sound was one of them...I need to add sound ID's to the parsers, in order for objects to make sounds, and also a sound effect to the worlds, so you can have some background music.  I also need to set up a system for when the player collides with an event of sorts.  Something that can be used as a hit-box, and moves the player over to the next scene or something of that nature.

I was also considering my resource manager...it only holds resources right now, i.e. textures, and fonts, but I could make it hold the parsers as well.  I think this would help condense things a bit more, but also reduce the coupling of objects, and the visibility of all the parsers, except the settings parser, that one I need to have direct access to.  So basically you would have indirect access to each of the parsers, with the resource manager being the inbetween.  Reduces coupling and visibility, but keeps the same abilities.

But then the question comes, is it worth the change?  I would probably have to change a lot of code for that to work, and would it really be all that much more useful?  I have no fucking clue...so instead of creating a bunch of crap that i may or may not be able to use better, I'm just going to leave it as a to-do later...post-school type edits.  @_@  Anyway, take care my very few readers...

Friday, September 7, 2012

So much to do, so little time...

Well, it looks like I've got my final coming up.  I'm glad I've gotten my program this far to be used for it, and hopefully by the end of the session I'll have a usable and displayable program to put on here.  So far, I've got my new character model, and that's about it.

The game's title is now Harper's Gate.  The name is a bit tentative but it works for now.  The idea still remains as a 2D variation of Monster Hunter with RPG elements...I'm going to be working on developing sprites over the next several weeks I'm sure, and I'll keep you guys (my very limited readers) up to date!

Also, here's Harper in all his pixelated glory...He currently has no arms, but those will be added in programmatically as separate sprites.  These are all of his progressions from a simple idea of a character with a red mask on his face.  o_O  There are two sections in there that are going to be his animation.  To be honest, they're rather meh, but I don't have to make something amazing in the graphical department.

This is the look I want him to have for his final coalesced look.  But the arms are basically going to be separate from his body so I can animate them separately.