Showing posts with label video games. Show all posts
Showing posts with label video games. Show all posts

Wednesday, January 21, 2015

Main.as or Document Class (AS3) Part 1

Something that I've found to be vitally important in writing ActionScript 3 is accessing the Document Class from other classes and packages.  And the beauty is that once you make your Main.as you will need only a bit of time to adapt it for your other projects.

Keep in mind that my Main.as is constantly changing, mostly because I keep thinking of stuff to add that I know I'll always need.

Here's a bit of code to start us off:

public class Main extends Sprite 
{
 public static var instance:Object;
 public function Main() 
 {
  addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
 }
 public function init(e:Event = null) : void
 {
  removeEventListener(Event.ADDED_TO_STAGE, init);
   
  instance = this;
 }
}

So what does this mean and do?

My understanding is that this is called a Simpleton (after re-reading I realized it's Singleton, but I left that in because it's funny). But whether or not that's correct, what this does is allows us access to the Main.as at all times from anywhere in the program.  Of course with what we have written so far, this doesn't mean much, so let's add some important info that would need to be accessed in most, if not all, Classes:


 public const SW:int = 512;
 public const SH:int = 288;
  
 public const SWH:int = SW / 2;
 public const SHH:int = SH / 2;
  
 public var TS:int = 16;
 public var TSH:Number = TS / 2;


In this section we have the stage width (SW) stage height (SH) and half of both of those (SWH/SHH). These are the dimensions of the screen and it makes it a lot easier to access than typing in:

        stage.stageWidth

We also have in there the tile size (TS) and half of the tile size (TSH). Because TS is set to 16 and our stage dimensions are 512 x 288 we have a 16:9 screen ratio to work in.

Do you understand yet why this Main.as is important?  Here's an example:

I have a plumber who has to check collisions with the environment.  In order to do so I need to find out if he's going to collide with a Block or if he's just falling through air.  In order to find out if he's hitting said Block I need to know where the nearest Block is.  Since the map has already been laid out (in this example it has, we'll get to that for real later) we know that all tiles are lined up by the TS that we have established in our Main.as.  So from the plumber's Class we can access Main.instance.TS to find out if the plumber bashes his head on a Block or just goes through air.

If this makes sense to you, you might be wondering why you don't just put in "16" instead of calling out to Main.as.  If it's a simple program, you're right, there's probably not much reason to do this.  But let's say you wanted one level where everything was giant except the plumber.  You could then easily change Main.TS to 64.  You wouldn't have to go back in to the plumber Class or the enemy Class or whatever other class needs to know the tile size to change it all.  You have to type in one number on one Class to change the way the plumber will interact with the level.  That's pretty cool, right?

Well, that's it for now.  I hope you enjoyed this little insight into what I'm learning and doing.  Next time I'll talk some more about the Document Class and how setting up the keyboard controls in Main.as makes life much easier down the road.

Here's a picture to go along with all these boring words:

http://www.gigs4gags.com/funny-programming/

Friday, September 27, 2013

Welcome Back, Me!


Wow, it's been a long time since I've posted. But I'm a married man now and will probably have even less time to post than normal. But real quick I'm going to talk a little bit about a game I haven't played in a long time. It's called Commander Keen and it is amazing.


I used to play these games all the time when I was back in middle school, maybe even when I was in grade school.  It's hard to remember anything nowadays.

Command Keen is a tile based platformer which luckily allows you to save your progress (remember, I'm married now, so I have very little free time, thus saves make gaming easy).  I'm not sure if I love this game because I'm in a nostalgic high or if this is actually just a fun game.  I think it's fun.  I mean, in how many other games does the hero travel around on a pogo stick?

None.

Well, I'm sure there are more, but that's not the point.  Pogo sticks are cool!

So I just finished beating the first episode.  While playing it I started to remember the game bit by bit.  The wolf creature was always frightening when I was younger because it jumped at seemingly random heights.  So even if you were on a high ledge it could still jump and get you.  This time around, umpteen years older, I saw the beast and immediately ran away, as memories flooded back into my mind.  Then I remembered that young Billy (Commander Keen) has a raygun.  I turned and zapped.  Four times.  Wolf monster no more!

The first episode is short, providing a good couple hours if you try and get everything and are slow on the uptake like yours truly.  It's a great bit of platforming history as well as a solid game in general which holds up in play if not in looks after all these years.  I wouldn't say it's as hard as Super Mario Bros. on the NES but that might just be because there are saves in Commander Keen which makes life a lot easier.

If you like solid platforming then pick it up on Steam.  It's five bucks for the lot and if it goes on sale there's no reason not to pick it up.

Also, this game was made by ID Software.  You know, the guys who made DOOM and Rage and everything.

Thursday, May 2, 2013

Miracle: A Finished Game Review - Spec Ops: The Line

War.  War never changes.

So, I don't finish games.  Even short ones.
But I was feelings sick and my natural...chosen pick me up in the past has always been play video games.  So I fired up Spec Ops:  The Line again, deciding to see what was what.  Yeah I was pretty close to the end of the game.
At the end it tells you how much time you spent playing the game.  4 hrs 32.  Yeah that's about four hours less than I actually played it, because I die alot.  I almost switched to playing an easier difficulty (and the game asked me to many, many, many times) but I held strong and ended the way I started it.
I went back and played two missions because I had left some of the intel laying around.  I played them on FUBAR mode and didn't die once.  Crazy that I'm only bad when I'm trying to get through the game.
Anyhoo.  Man, this game rocks my socks off.  There are four endings to this game and I went through everyone of them, because they make it easy to do.  All four point to the utter horror that is war and this game shows just how ugly it is.  I talked a bit about that in my unfinished review.  I won't ruin it for anyone who hasn't beat it, but this game is very psychological.  As Captain Walker you get Post-Traumatic Stress and it doesn't go away, even by the happy ending.

So beautiful...Let's blow it up!
Which leads me to the main thing I want to talk about.  This game is more of a role-playing-game than any I have ever played.  It truly puts you in the role of Captain Walker and it doesn't let you go.  You HAVE to go through what he's going through.  Unless you just skip the cutscenes.  Then it's just a fun third person shooter.  But I was fully engaged even with all the start/stop I did along the way, and it's because Walker was so well written, and the story was laid out so well, that I couldn't help but remember all that had happened previously.  Much like Amnesia:  The Dark Descent (which I also haven't finished, although that's more due to me being too scared to finish it) this non-role-playing-game is one of the best role-playing-games ever.  While I loved Mass Effect (only the first one) I still felt like Shepard was just a puppet whose strings I was pulling, much like any of the Bioware/Obsidian/Black Isle games.  In Spec Ops:  The Line I truly felt I WAS Walker.  And that's hard to do, especially when I'm generally taken out of the immersive storytelling when I'm constantly being killed.

So bottom line, if this game is good enough for me to finish it, then it's good enough for you to go out and get it.

Actually that's not saying anything.  I hated Mass Effects 2 & 3 but I still beat them.

Regardless, play and beat this game.  Yager deserves your money.

Friday, March 8, 2013

RPG Maker VX Ace Plus My First Game


Many, many years ago I messed around with RPG Maker 95.  It was a way to create your own RPGs similar to old school Final Fantasy or Dragon Warrior (Dragon Quest).  Except it was in Japanese.  It was lovingly translated to English by a fan (I think), but it was just a terrible system to work with.  Especially since  I didn't really have the drive to make games back then that I possess now.  Needless to say I quit using it, having only made a couple of buggy small and pointless games for my own personal enjoyment.

But a couple of days ago I saw the new version RPG Maker VX Ace on sale for 50% off on the Steam Store.  I figured for 35 bucks it wouldn't hurt and maybe since I understand programming a bit and have an actual drive to make video games so I'd give it a shot.  Plus it's translated properly!

Well, it's certainly less buggy than the 95 version was, but it's certainly not "Simple Enough For A Child", as the Steam store states.  Unless that child is really awesome.  It's hard.  Or I am really bad.  I don't know.  But in two days i finished this quick little game...or visual novel.  I'm not really sure.  It's more just me messing around trying to figure things out, but I spent alot of time (more than I should have probably) playtesting it, trying to make it a super tight (if short) experience.

Anyhoo, enjoy my latest creation:  The Sword.


Thursday, February 7, 2013

Late to the Party: The Witcher


Okay, I wasn't actually late to the party in playing The Witcher.  I got it because I needed something to fill my time while I waited for Dragon Age:  Origins to come out.  I played it and I remember liking it but once DA:O hit, The Witcher was forgotten.

Forgotten at least until the recent Steam sale for The Witcher 2:  Assassin of Kings.  Now I didn't pick it up because I haven't beaten the first game.  I'm a little more responsible with my money nowadays.  But I decided to play the first one and get to the sequel and see why everyone was saying what an amazing game it is.

So I restarted The Witcher and the first thing I noticed was how clunky it is.  The cutscenes into gameplay are jarring and the scenario always starts before the fade in is even complete.  Animations are pretty poor, but that's to be expected, especially on the Aurora engine.  Also, animations shouldn't dictate the quality of a game.  But starting a fight should be as simple as pressing the attack button.  Instead Geralt waits for a few seconds and then as he's being attacked he'll lazily pull out his sword.  Then he'll get into a fighting stance.  Then, finally, he's ready to go.  This has caused me many deaths that could easily be avoided.  This is a big gameplay issue.  However, it's more a frustration than anything else.

The big thing with The Witcher is the atmosphere of the story.  I have no idea what's going on, and since Geralt has amnesia I guess this is intentional on the storytellers' parts (I hope it is).  But it's engrossing and I just want to know more about the world that I'm in.  I know it's based on a book series but since I haven't read those (yet) I am truly lost.  I can't wait to play this game and everytime I have to stop (for work, eating, bathroom breaks) it breaks my heart.

But one thing about this game is really bizarre.  If a female NPC has a name you can sleep with her.  At least so far.  I'm up to the beginning of Chapter II and the only woman that hasn't thrown herself at me is Shani, but if I remember right from the first time I played this game, that's pretty close to happening.  If I remember right, even a dryad wants what only Geralt can give her.  That's really weird and perhaps a little misogynistic.  So, if you're immature, this game is fantastic for that alone.  If you are very young, please stay away from this game until the site of boobies doesn't make you giggle or feel uncomfortable.  Or if you just know how to say "no."

Thursday, September 20, 2012

Floydian Theory Website is Up and Running!


My website is awesome, mostly because I did it all by myself.  I'm a big boy now!!!

Seriously, check it out.  I have lots of different stuff, such as pictures I drew, game design ideas, a couple of windows console games I wrote in C++, and other things too!

My crowning achievement right now is an adventure/interactive fiction game I wrote called Assassin's Quest:  So You Want to Kill a King.  It took a long time and I'm glad it's done.  However, I already have plans to improve it and once I learn more coding I plan to move it to a platform where I can have pictures instead of just text.  Gasp!  So modern!  What will they think of next?!



Thursday, August 23, 2012

Dishonored - A Game After My Own Heart


Dishonored is a game coming out in the next couple of months that resonates with me.  I love stealth games.  I love being able to sneak through the entire game, which usually adds many hours on the normal playtime.  

In fact it took me ten years to beat Thief and it'll take me another ten to beat Thief II, if at all.  It took me over a year to beat Deus Ex:  Human Revolution.  This is because I'm very methodical in how I play these games.  If a mission doesn't go right (ie, I accidentally kill someone, or I'm discovered sneaking around) I reload the game.  Is that cheating?  Sure.  Does this type of cheating reduce my enjoyment of the game?  Not at all.

There is nothing more satisfying than pulling off a job, be it a theft or an assassination, without being seen.  One of my favorite missions on any game was in the first Hitman for PC, called 'Kowloon Triads in Gang War'.  In it you have to assassinate one of the Triad's negotiators while leaving the other one alive.  So I pulled out my briefcase sniper rifle took an elevator up to the roof of a building, shot the dude from a long way off, dropped the rifle, took the elevator back down, and slowly walked back the way I came.  I didn't have to walk, but in my mind I was really doing the job so of course I'm going to act natural.  It was the perfect kill.  It still makes me smile after all these years.

Dishonored might be the next game like that.  I've tried to keep away from knowing too much about it as I don't want to hype it up to be the next Thief/Hitman and be let down horribly.  But this stealthy trailer was too exciting to pass up and I had to watch it.  I'm glad I did.  It gives me hope.

Wednesday, August 1, 2012

Zac Gorman and Magical Game Time


I think I discovered Zac Gorman on dork website Dorkly.  I love his style, which is reminiscent of Moebius, but a lot more cartoony.  Zac does little web comics on video games in a blog called Magical Game Time and does more personal stuff on his own website.

If you love good art and/or video games check him out.

Also, here's an awesome picture of the best Final Fantasy ever made:  III...or VI.  III if you're old school like me.


Tuesday, July 17, 2012

SketchBomb in San Francisco

Hey all!  If you're in the San Francisco Bay Area and love drawing, check out this sketch group I'm with called SketchBomb!  It's ran by a couple of cool dudes, Mike Henry and Ryan Hall, known as zatransis and frogbillgo on deviantART.  It's a group of dudes and dudettes that draw for three hours, typically three themes throughout the night, and then at the end of each hour we gather around and look at each other's work.  It's a good time, regardless of your drawing ability, and it's a very fun atmosphere.  Come check it out and I hope to see you at the next one on August 4th.

Intro to Me

Hi there!  My name is Ben Floyd and I am really quite awesome.  Since this is my first blog entry I figure I'll introduce myself and let you know a little bit about what you can look forward to in the coming days, week, and years.

First off the name of my blog is called Floydian Theory.  Why?  Because it sounds like Freudian Theory, but since my last name is Floyd...well, there you have it.  No deep seated sexual aggression manifesting, I just thought it was clever.

Who am I that you should read my blog?  I am a lover of many things, video games, movies, music, books, art, and animation.  I am an aspiring game designer, but I have so many interests that it's hard to focus on one thing for longer than...what was I talking about?  Which is the main focus of this blog.  I want to get everything that interests me out of my head and onto the web-o-sphere and maybe my brain won't be so cluttered that I can actually focus on making great games.

What will be on the most excellent of blogs known as Floydian Theory?  Whatever I think of putting on here.  I get in moods where I'll focus on gaming, writing reviews, bitching about how the game industry is a bunch of sellouts, you know...fun stuff.  Then I'll watch a movie and want to talk about it because it was so bad or because it was so awesome.  Then I'll show you awesome drawings that I found on the interweb.  Then I'll talk about the latest book I've read.  Maybe I'll even show you some of my own artwork.  Most of all I'll just be talking, waxing philosophical, and blubbering about whatever is on my mind at the moment I sit down at my keyboard.

This sounds too awesome to be true, I know.  You might be thinking that no one man can be so awesome as to talk about all these things and doubt that I even exist.  Well, let me prove there is a picture of a dude in a Batman shirt, which might prove that I exist.

Oh no!  My secret identity is revealed!