02 June 2017

Not Giving a Shoe Compliment

I saw someone the other day who had the same pair of shoes I do -- a pair of Sketchers with bright orange shoelaces. I was going to comment on how he had nice shoes in a sort of mock-sounding tone, but I stopped myself when I realized I was currently wearing a different pair of shoes. I didn't want to actually sound condescending, but I hoped making such a comment would immediately lead to realizing we have the same pair of shoes.

I'd never noticed someone else wearing a pair of shoes I own. It felt like a missed opportunity. Maybe another time...

29 October 2016

Open World Woes

You know, I'm really not a fan of this whole open world thing. This by no means is as simple as "I hate this sub-genre just because," yet this following spiel is going to amount to largely an opinion piece.

Size vs. Interaction

If we compare the Ubisoft or GTA/GTA clone games with Bethesda open world games, there's a bit of a difference with the depth of the world we can explore and how we can interact with it.

Let's take Assassin's Creed or a GTA-like -- say Saints Row. Here, we have a large world that is purely aesthetic, with zero interaction outside of "points of interest" which are few and far between. Everything else is fluff. We can see an endless amount of NPCs roaming the areas, but generally speaking these are all nobody characters. Any important NPC to plot exists in an alternate reality until you're in an active plot section.

Bethesda games, the fluff is there but is different. A large amount of NPCs can be interacted with outside of quests and most every item is now likewise able to be picked up. Except most of the items are fluff. I feel as though this detracts from the importance of items that aren't quest items and makes it less appealing to explore new areas. Oh look, it's another random house I can enter -- right, it's just filled with paper, produce, and other miscellaneous items every other house has. I guess I'll wait to explore until a quest wants me to go there.

On both accounts, I feel as though I'm a slave to the maps in every open world game. I don't want to explore a world of fluff to find the content with actual substance. I want to find the points of interest and have the game tell me what it is I should be doing to have fun.

"Fluff"?

When I'm saying fluff, I'm referring to something that isn't enhancing the game in any way that's meaningful to gameplay. Yes, you can make a game where the distance between a quest's end to the next quest's beginning is a 20-hour trek through an empty wilderness, but you've just exceeded the definition of padding gameplay to an absurd degree. Even if the world is beautiful to explore, who exactly is this game supposed to be marketed to if there's very little to interact with in this world?

My interaction with an open world game always seems too shallow if I'm actually trying to explore. There may be 10,000 hidden collectibles in the world, but behind every back alley or rooftop with a collectible are countless more with nothing. And the collectathon portions usually amount to just getting an achievement or an item you get so late in the game that it's not even helpful for the actual plot of the game. It makes collectibles feel like a completionist's goal that otherwise has no purpose.

Looking Up

This isn't to say there's no hope of an open world game actually feeling immersive and not just full of "here's a lot of space between actual content." I also don't know that the feelings of others as a whole suggest my vision of a good open world game is what people want -- at least, I haven't seen this as a big talking point of disappointment for others. Ok, maybe that's rude. It's not that it's "not what people want," but developers don't have a reason to improve if the current norm has been seen as passable.

I do enjoy some of these games when I actually play them, but I feel as though I play them differently than intended because I don't enjoy the fluff. I rush between points of interest for the actual gameplay/minigames and plot progression. Everything else I ignore. This also makes me skeptical of games that haven't come out yet that are banking on "open world" being a point of interest.

My biggest skeptical upcoming game is the next Zelda. Boasting the world is huge has deterred my interest. I suspect a world of fluff filled with enemies.

I could keep talking about this for a while, but it's getting late. Maybe a topic to revisit in the future on ideas I'd have for actually improving the genre. For now, I'll just say I do want to be proven wrong. But only time will tell if I'll ever see a game that boasts having a huge world where this means "huge world that isn't just aesthetically huge for the sake of being huge."

13 July 2016

Data, Data, Data

Working on a D&D 5th Edition character creator-type thing in Javascript, and at least in the initial phase it's difficult to visualize progress from the webpage itself. As implied by the previous blog post, I'm not actually making the page live until more progress is made.

That said, my progress thus far has been on data collection. Lots and lots of data, and there's still more to collect.
Feats Sampler

Basic Bonuses

There's a common structure I'm working on here for everything, but that sample above shows the gist. If something gives a set-in-stone bonus, such as Alert giving a +5 to Initiative, then the Feats.Alert object will simply have a variable with the name of the thing getting the bonus, and a value equal to that bonus.

Player Choice Bonuses

More complicated things, such as Athlete, have a choice: You choose 1 Ability Score to give one bonus to, and there's a restriction for which Ability Score you can choose.

In this case, parsing Feats.Athlete has a variable AbilityScore1, which tells me the player will get to choose 1 Ability Score to increase. Feats.Athlete.AbilityScore1.Bonus tells me the selected score will be increased by 1, and Feats.Athlete.AbilityScore1.Restriction is an array containing the Ability Scores the player can choose to raise. If something does not have a Restriction variable (such as the Resilient feat), then I'll know the player can choose any score to increase.

Complicated Descriptions

More, um... complicated things, I'm just storing as an array in Anon, like pretty much all of the feats (Feats.Alert.Anon). This is stuff that I won't bother parsing for the moment, other than just to put in an additional information section on the character sheet.

Races

The only other thing of note for data is info on races. It's actually pretty much the same, minus 1 little extra thing about sub-races.

Races["RaceName"] and Races["RaceName"].Sub["SubRace"]
I'm not really bothering with any flavor text here, either; just the bonuses are good enough. Partly because I don't want to use any of the actual names of places or whatnot if they happen to be there, since that's a copyright no-no, I think.

But things are actually coming along nicely. I have the stat bonuses for the Races. All the feat info is pulled (just from the core). Next I want to pull all the Background bonuses.

Honestly, the only super tough thing I'm suspecting to have difficulties with will be when I get to Classes. My thought process is to tackle each class one at a time, and the structure will probably be based on level bonuses. So a sample Class might look something like:

var Classes = {
    Barbarian: {
        1: {
             (Level 1 Player Choices/Bonuses Here)
        },
        2: {
            (Level 2 Player Choices/Bonuses Here)
        },
        (You get the idea)
    },

    (Other classes)

}

Onward and upward. Progress is slow, but it's still being made. Whee!

26 June 2016

Beginning Website Updates

I've had a personal website for a while now, but I haven't really done much with it -- mostly just placeholder pages for where I'd eventually put projects. But that's not much drive to get any actual content.

I think the main thing holding me back was just layout and design that I'd never been too happy with. I knew some tricks, but unless I was working with a design team on the job then I didn't feel capable of doing those sorts of things myself.

Important Side Note!

Trevor has a new job! (well, new as of three weeks ago. I don't want to make promises, but I should be updating this blog more recently) It's primarily front-end web development, and it's a very different atmosphere than I've been used to. It's also my first experience with Responsive web design, so styles changing as the browser window shrinks. They aren't using things like bootstrap, either -- it's just straight css @media queries.

Anyway, that was allowing me to pick up on new concepts really quickly and really boost my confidence with wanting to build up my personal website again.


Redesign

Hey, it's blog posts from here!
Since I don't really have images to put on my blog, I'm trying to keep with a 'simple is better' approach now. Just a few different styles for the text and only a few colors. Blue is probably overdone (Facebook, Twitter... probably others), but it's my favorite.

Also, instead of placeholder pages, I'm just showing the pages that are functional. In the future, this won't necessarily mean 'functionally complete,' but it means there will have to be more than 'this page will contain something in the future' to be visible.

Honestly really liking it so far, though I'll want to be updating the navigation soon -- it's the only thing I'm iffy about. Plus, it's not really scale-able.


Front-End Sample

Pretty tiny and clean
The homepage is laid out the same, except it's just a title and a few paragraph blocks. I just have a header file that I can inject into the page, so I don't need to duplicate any of the code appearing across multiple pages. The div 'blog-entries' is just a placeholder div for the javascript logic, so it has a place to add the blog entries pulled.


Back-End Sample

blog.js contents
And there we go. When the page initializes, this tiny function just makes an ajax request to a feed service. I'm just getting back some basic RSS data from my blog here -- it doesn't really even include sample text (though I'm sure this is possible if I tweak the RSS settings or something -- the properties are there in the return, but they just didn't have any data in them).

No big problem, though. I loop through the results and add a link to each blog post on the page -- including the title of the post and the published date. Since it's RSS, the results are in order from latest to earliest. At least for now, I'm also only pulling the latest 10 entries, which is just fine.


To the Future!

I have a few different ideas floating around for what I'd like to add to my website. The next project is a bit daunting, so it may take a bit of time before it appears live, but I'll be trying to tackle some blog posts as the process moves forward.

And so it begins...

17 May 2015

Quick Thoughts on RNG - Part I

My desktop has been out of commission (or at least making unusual noises that spawn distrust in its use), so I've wanted to tackle some smaller logical problems on my laptop while I await replacement parts. One of my serious side projects involves a portion with randomly-generated content. It's something I haven't actually gotten around to yet more out of RNG reluctance than lack of time.

The Thought on My Mind


"Does the default "Random" behavior of a language such as C# give enough random for use in a game engine?"

Honestly, this is more ingrained as a "problem" from looking into the concept of random, and how we can only simulate random. My first assessment is really just to see how "Random" the default C# RNG is.


Quick Sample


So I created a program to enter a max number (so 6 would give a random number between 1-6) and the number of times to roll a random number. If I just output the results, they don't always look that promising:

Max number: 10. Rolled 100 times.

Look at that cluster of 10s! If I were actually rolling a d10, that would seem pretty unusual.


On the Other Hand...


Now if I output both the Individual Results and Distribution of those results, it looks a bit different:

Much better when you can see Distribution.

Ignore the 6 milliseconds taken -- I was curious to see if it would take any time to generate more random numbers, but it seems the only reason it adds time is outputting the results.


In Closing


I suppose it's difficult to tell on a quick pass whether the default RNG is useful. Depending on what, specifically, you're using it for, then sure. The distribution in the long run is actually not terrible. It's just in a short window of time where it doesn't look so good.

For practical purposes, you'll probably be using a RNG with weighted results rather than a straight 1-to-1 distribution (if you're calculating loot in a game, for instance, then a "Common" drop would ideally count for 50%+ of the total possible random numbers rolled). That could have more of an impact on results, but that will also take more thoughts and testing than this quick run-through.

22 September 2014

GRamer Society Episode 2: Behind the Episode

This time around had a lot more programming involved. And I even made 2 games for it. Here's the video:



Light Switch


For the previous episode, I made my life easier by rushing with C# .NET. This time around, I chose Processing. It's a language wrapped around Java that makes it easy to do visual things. The only trick to this "game" was with the images -- I used Photoshop to create a 'switchOn_img' and 'switchOff_img.'

The meat of the game
With Processing, draw is a function reserved to be a loop. I specify 'noLoop' at the end of the draw function so I don't have to handle frame-rate or the fact that it would call draw whenever it can. I use the default mouseReleased function to trigger a change of game state and manually call 'loop' again, so it will trigger a redraw.

Deathsweeper


What can I say about Deathsweeper? It's a bit more complicated than its predecessor. I actually spent most of a Friday night and Saturday morning programming this one. There are 3 game states -- I called them TILE, REVEAL, and GAMEOVER. I treat the draw and mouseReleased functions differently based on which state it's in.

TILE draw function -- all of the squares!
Yes, yes -- absolute positioning and all. Bite me for bad practices.

TILE mouseReleased function - which tile did you click?
That's... awkward-looking, isn't it? Loop through the x-coordinates of the squares and compare with the mouseX position. If it's within range, do the same for the y-coordinates.

REVEAL draw function -- should be straightforward
revealedFile is the name of the text file that has the scenario's text (without the extension).
revealedText is the scenario's text (the content within the text file).
goodResult is my boolean for whether it was a good or bad result.

REVEAL mouseReleased function - state is success or fail

The REVEAL state's mouseReleased event only moves back to the TILE state or forward to GAMEOVER.

GAMEOVER mouseReleased - Exit or re-initialize the game!
The GAMEOVER draw function should be pretty self-explanatory -- just text and a rectangle. The mouseReleased checks if you click in the rectangle to exit, or it starts the game over.

Now, the tricky part of the game was loading the success/failure states.

Find all the files!
I find all the files within the failures/successes folders and pull their file names. Then, each tile will be either a success or failure. What a tile is gets loaded as part of the initialize step:

Randomize good/bad, and choose a random good/bad result in getRandomFile
When the state gets changed to REVEAL, that's when the content of a success/failure is loaded:

Pull the text from that file for the REVEAL draw function
That's... just about it. I'd also made my own Tile class to store whether a tile is a good/bad result, the file name of it's revealed scenario, and whether the tile has already been revealed.

My main regret here? That Processing doesn't do Enums. It felt cheap to use a String to store the current game state -- technically could have stored it as a number, but I'm not yet at a stage where performance is an issue.

The logic for making the scenarios dynamic was actually quite fun. All things considered, it's interesting to think that I created 16 scenarios for the game when the video showcased very little.

GRamer Society Episode 1: Behind the Episode

So I began a silly YouTube project. I'm making ridiculous/stupid games and pretending to submit them to a fictional society. Because my fictional persona wants to join the elite of the game designers. Here's the first episode:



I was able to whip out the code for "Live or Die?" in just a few minutes. It may be a little simplistic, but for this project it may be a good thing.

The meat of the program
Straightforward and simple. I'd enjoy getting into much more complex games, but for the sake of free time it's more difficult. And this way I can play advancement off as character development until these warm-up games help boost my confidence for more complex ideas.

07 August 2014

Flash Forward 10 years: A Dishonorable Opinion, But That's Just Fine

While trimming and washing up, I had one of those "shower thoughts" moments. You know when you weren't even a teenager yet, and on rare occasion you had to answer the age-old question: "Where do you see yourself in 10 years?" Well, I couldn't help but ponder the reverse.

It's silly to have to answer that question anyway, especially by those poor souls who dreamed of being President before taking a government class to know what that means. Even if they retained their dream of becoming President some day, it's a sad realization that they'd have to wait around 17 years after high school to accomplish their goal.

I never knew how to answer that sort of question -- especially when I wasn't even 10-years old yet. A lot happened that I can remember in my first 10 years, and I couldn't possibly have predicted where I'd be when I was 20. Even so, 10 years ago from now I at least had some ideas of intent.

I've always enjoyed video games since I first started playing them. When I was 16, I imagine I still had the dream of working for a big game company and working on the latest AAA titles. Also the dream of working on the side as an author and being a hit who makes it rich. Basically, doing my day job pro bono because I love it, but doing my hobby on the side to give me more than enough income to buy and do whatever I want.

What do I do now? I'm not a programmer or an author. Sure, in college I had a brief job as an SEO writer, but none of my published work has my name on it. I also had several jobs as a programmer -- and even went to college for programming! -- but none of those jobs were in the gaming field. I'd say as far as dreams go, my 16-year old self would be ashamed to look at a snapshot of who I am today.

But I think my 16-year old self would be wrong to judge so poorly.

Out of my two dreams, I chose to go to college for game programming over writing; I didn't want to go to college to be told how to write. Maybe debt swayed my decision, or maybe it was the uncertainty of workplace stability, but I'd devolved my major halfway through to the broader topic of Software Engineering. There was nothing wrong with that, as I'd certainly found enjoyment out of programming in general.

After college, I worked a few programming jobs. Skimming over the details, they always seemed fun "in the beginning" but eventually devolved into a chore. It was too much of the same, and I felt as though I was sacrificing my sanity for my work stability. When you start to receive a task and are already saying in your head "oh yeah, I know exactly what function this problem occurs in" before you've heard/read all of that task, you've hit a wall where you have no desire to continue working on a product anymore -- it's just too boring, and you spend all your day-to-day energy fighting to get yourself to care.

As for writing? It's almost pathetic to pretend that I write at all. I have a lot of ideas and play scenarios in my head around the same characters, but how could I have thought I'd have time for writing so much with a full-time job? With friends? While trying to retain any sort of social life? Don't get me wrong -- I still love the idea! -- but most times I try to set aside time to write something are spent staring at a blank Word document and counting how many times the cursor flashes in a minute.

There are other issues with the types of jobs I wanted, but this conversation could go on and on. The bottom line: dreams change. Sometimes this is driven by new information, and other times it's a result of changes of heart, compromise, or realizing what really matters.

Someday, I do want to be an author. I'd also love to make my own games. But the dream has taken vastly different directions that are almost more unreasonable. Maybe striving for the impossible is fun.

Besides, 16-year old me didn't understand love. And I probably wouldn't have found my handsome without making all the decisions I've made.

There's still time. I'm enjoying what I'm doing now, and sometime there will be time for my true dreams. Maybe around the time I could hit the age requirement to become President.

26 January 2014

Adventures in Music Organization, Part I

Our story begins with a hard drive failure. This may have been a while ago, and most of my things were backed up. However, my ongoing grudge has been with my music collection.

I had an iPod with all my music intact, which you'd think would be a saving grace, but...

Thank you iPod naming conventions!
...it may have destroyed any semblance of logical structure to its folder and file naming scheme.

It's not even grouped with similar artists/albums together.
Now, if I pointed iTunes to my entire music collection, then it's all fine. In fact, I believe even Windows Media Player can open them just fine, and the song titles, albums, artists, date of conception, etc. are all intact. It's just the folders and file names that are borked.

You could just say "deal with it" since it no longer matters when music players can read all the tags and whatnot, and I did. Until the onset of games that use your music collection.

Although I have done a good job without organization. Beat Hazard, yeah!
Beat Hazard in particular uses the file names until you highlight a song. Then it starts to load it and updates the name to match the title. This is tedious. I enjoy tedious tasks sometimes, but not here.

Want to play a specific song? Good luck.
I'm sure there are music organizing programs already in existence, but I'm a programmer, and I want to be stubborn about this problem. After all, it's my problem and I want to solve it. It sounds conceptually simple, right?

If I want to do this quick, I'll start with C#, since I can just drag a couple buttons around. It only takes a few minutes to come up with this:

All music files are pulled, so... now what?
However, I've never tried to pull metadata from a file before. I was guessing there might be something in FileInfo to do it, but apparently there isn't. So how do I get this?

As my searching found out, music files have something called an ID3 Tag. Unless I chose to create a Windows 8 App, C# doesn't appear to have a built-in solution for reading these tags. I don't wish to go the Windows 8 route, so a solution to this problem is going to be more involved than I was expecting.

02 March 2013

Level Editor-ing

I had a bit of a falling out with the side project from work-related weirdness that gave me a temporary lack of motivation in all respects, but this has blown over. It does go to show that there are many reasons to lose motivation that go beyond simple procrastination. However, I have had a stronger desire to see this through, and I feel I have more determination and trust in my own abilities than, say, a year ago. I'd like to say that procrastination alone isn't really an issue at my current mental state.

Since the last post, I have made some substantial code cleanup changes, and I'm better accounting for multiple controller inputs. I seem to be moving forward with a brute force, "get this new mechanic to work" method and stopping after it works to do code cleanup. I have no reason to not continue with this method, as it gives an appearance of small spurts of quick advancement. The code cleanup is really for organization and making certain it's easier to manipulate what's there if I need to make changes -- also makes it more readable for the future if I need to step back into sections I haven't touched in a while...

I have a placeholder now for a Level Select screen, but I'm actually bypassing how a level is selected at this point -- I'm just jumping into gameplay logic for now. The first thing I need for gameplay is actual level content. The typical scenario for a sidescroller is some tile-based level editing, so here I've done some reinventing of the wheel with a level editor tool:

Click the tile from the tileset and just click in the level grid to add the tile
Pretty straightforward. My current focus is just on a 1280x720 screen resolution, and I'm not yet worrying about scroll capabilities. I haven't yet added the ability to save this, actually, but it will probably just be an XML file, since those can be thrown in the XNA game's content as something that will presumably be hidden in the final version of the game (though perhaps I should leave some options open for players to generate their own levels with this tool, too).

The only other thing to really save with tile placement in the level editor will be the behavior each specific tile will have for players and enemies:

- Can be stood upon
- Is in the foreground and players/enemies will walk behind this tile
- Is impassable
- Can be passed from beneath, but will not fall through from the top (floating platforms, essentially)
- Etc. (Just keep an open mind for different tile types as I need them)

I may just focus on getting the level content I have to be imported by my game before implementing the tile types, though. One step at a time.

04 February 2013

Fighting-Style Character Select

I had been in the dark about end of last week's news about XNA being discontinued until a coworker informed me of such things today. No matter, I say, as this doesn't affect my current progress -- just because Microsoft won't release new versions of XNA doesn't mean the current version will suddenly cease to function.

In any case, here's what I managed to get done today outside of the full-time job:

Just a simple fighter-style character select
Right after hitting Start, we come to this character selection screen. There's clearly lots of room here for more characters, and I think the fleshing out of all the character tiles will have to wait until more assets are made and I have a better grasp of just how many characters I'm going to have here. But for now, lots of empty space.

As it currently stands, pressing left/right on the controller will shift to the only other existing tile:

Who is this mysterious '?' Character?
I plan on using some form of '?' tile in the end to denote characters that have yet to be unlocked, but the 'C' tile will become a portrait image. I'm also storing character name (though mystery tiles just have a '?' in place of the name) and some information text, though they aren't displayed anywhere on the screen yet. The current plan is to perhaps reveal the unlock condition for mystery characters in the information text.

Pressing 'Y' on the 360 controller will also change the color of the selected character. I'm actually going to be drawing art assets as 2 separate images -- 1 which has a static color and 1 with select pieces that will be the color selected through this Character Select screen:

White, Red, Blue, Green, or Black (Dark Gray for the time being for obvious reasons)
I have some placeholder logic for accounting for multiple players, but currently the Player One controller is the only one responsive. My first test on this page was actually to place all 4 players on the same selection square to see how that would look, though since I saw it functioning I've since just left that code commented out. Here's how it looks with 2 players:

Multiple players will be able to choose the same character in the end
Color uniqueness is also not required
I think there's some code cleanup I want to do to all of this before I think about moving forward too much. I would like to get a better handle on positioning of those tiles, utilizing the character name and information text, and think of a clean way to read controller input from all 4 controllers. Before moving to the next Game State, I also need to determine what defines a character in the code, since the only thing being sent to the next Game State will be active players and what characters those players have selected.

02 February 2013

Overcomplicating the Simple Things II: Sub-Menus

I spent most of the day relaxing, but I figured I'd return at the end of the day to at least get the Sub-menus functioning. It's far from perfect from a visual standpoint while the game is running, perhaps, but functionally it's solid and looks really clean in the code. I added a few Sub-menus and a new option for the Main Menu since this morning -- 'Statistics'. The Sub-menu items at this point are really just placeholders until I get farther along in the project and figure out what I desire to add to the Statistics display and what items should be customizable with the game.

For just a snapshot of how making menus with Sub-menus in my code looks, here's a sample of the whole Statistics MenuItem class (I did also change the text of all the existing classes from 'MenuOption' to 'MenuItem' after I became painfully aware of that from my last post):


When the game is running, the Main Menu currently looks like this when the Statistics menu item has been selected:


When a sub-menu is closed by pressing B on the 360 controller, the Main Menu's state is still retained, so Stats is still highlighted and all that jazz. The sub-menu is its own animal to control.

I will revisit the Main Menu in the future for further refinement, but now my concern is how I wish to handle the 'Start' for entering the game. I realize some games have a sub-menu for game modes, but I'm also thinking of Dungeon Defenders, where starting a game only has character selection, and game modes are determined when levels are selected... I quite like that model, actually, and may nab it. So next time, look forward to a Character Selection update!

Overcomplicating the Simple Things I

I was going to continue writing some of the code from an earlier project the other day, but I realized I couldn't find that project anywhere on my computer. I do still have the DirectX and C++ project sitting on my desktop, but given how long it takes for me to accomplish anything in that project, I will continue to have it on hold for the foreseeable future. As I may or may not have stated in one of my previous posts (which I would be lying to say 'recent' when my latest post was the middle of last year), I wanted to focus my side-project endeavors on XNA for the sake of speed.

What I have now is 2 projects -- a 360 project and a Windows project. Both are currently identical, with the exception that one is debugged directly on my 360 and the other is debugged on my PC. After a quick search, I couldn't see any settings to determine if this could be done with a single project, but I'm supposing some minor differences between the two will be coming up soon in terms of a settings menu and whatnot, so no matter. I didn't see this as a big enough hurdle to warrant a search on the interwebs for an alternative.

The project I had been attempting to find was the result from my previous blog post, with implementing a GameState interface to handle my different game states. It was just a proof of concept project that I had completed, albeit with somewhat boring results of just changing the background color. Details, details... So this was what I had spent yesterday recreating to catch up to speed.

What I'm realizing now, after spending a morning fine-tuning just the Main Menu logic, is my tendency to expand, and perhaps complicate, what is very simple.



My Main Menu is currently split into 5 different files. This is really for cleanliness purposes, as the code does look highly readable. The MainMenu.cs file is also the largest of those files, sitting at 114 lines, with the others each at 13-24 lines.

I have the logic here revolving around the menu items, where each menu item is its own class inheriting from iMenuOption (though continuing to call them 'items' makes me want to change all of this 'MenuOption' talk to 'MenuItem'). MainMenu just keeps track of which menu item is selected, handles moving up and down the menu, and calls a Select function for the selected option when the player hits A. I also have some placeholder logic to account for sub-menus, though I don't have any of those actually created yet, and pressing B to go back a menu.

Maybe I'm a bit self-conscious of putting 'too much' effort into such a small part of this project, but in a way I find such 'tedious' tasks to be enjoyable. After I complete the sub-menu logic, maybe I'll actually get around to programming the actual game, though it is up for question of how complicated I'll be making that process.

I hope to be a bit more active on this blog now, as I actually strive to do side project work instead of just think about it. Hopefully more to come soon, though no promises shall be made.

07 July 2012

Younger Self Programmer Logic

I've decided for now that I don't have the necessary time to spend on creating a project from scratch in C++ and DirectX. It's not that it's too difficult, but it's a bit too tedious, and on top of a full-time job I need to be a bit more realistic to the boundary of time if I ever want to accomplish anything before I'm 55. And so, I turn again to XNA and put the C++ project in cold storage for pipe dream world.

The last time I made something serious in XNA (I'm not talking about that crappy puzzle game I made for the Windows Phone) was in college. That was a world where I knew that I should worry about how much memory I'm using, but I didn't do this at all in practice.

I knew I wanted to account for a main menu, the main game, and maybe some other edge case game states here and there that I'd figure out as I went, but how would I accomplish this? XNA already has a natural break for drawing vs. game logic, so what seemed most logical...

...To Younger Me


Let's make an Enum and store all our game states in there. When the drawing or logic functions get called, I'll use my Enum in a Switch statement to figure out what to do.

The Problem


Not only is this Switch statement going to get excessively long and frustrating to maintain if I don't break it out into multiple functions, but since I'm using the Enum as my only reference for the game's state, I'm sorta guaranteeing that every variable across game states will need to exist at the same time.

I'm sure there's an argument there for that statement not being true, but that would require extra logic that would have defeated my younger persona's purpose. For the record, I didn't split my Switch statement's logic into multiple functions, so it did become one giant blob of inline code. I still have that code somewhere, too, but I cringe at the thought of looking at it...

My Solution


In needing to revisit the problem of setting up my environment from scratch again, I'm going to apply a class structure for game states instead of just an Enum. Let each state store its own variables and implement their own Drawing/Logic functions. The main class will point to a GameState interface, and polymorphism will handle the rest.

I still have a problem here of how I'm going to change game states, but conceptually this sounds a lot more reasonable. It will probably be easier to solve that problem (if it becomes a problem at all) once I get there, so I'll wait until then.

I don't have a lot of free time now, but perhaps later on today or sometime tomorrow I'll have enough time to dig in.

19 June 2012

On Being a Fan

When it comes to being a fan of someone when I realize they have a public email, I tend to just make a spontaneous decision to email them at some point with the same generic email they probably receive by countless fans every day. And then I get all excited to check my inbox when a reply never arrives. Sorry Trevor, but too much praise just comes off as creepy. To be fair, I wouldn't know how to respond to a "OMG I love what you do, you inspire me, and I look forward to every breathe you take!" type of email, either (though for the record, mine have never been that bad).

So I shouldn't get that bent out of shape for never receiving a response from John Green ages ago.

It's the times that I make inquiries or have meaningful things to say that responses tend to occur. Take the time I asked WheezyWaiter what format he wanted his wink clips in. For those who don't know, WheezyWaiter features clips of his fans winking at the end of all of his videos. He doesn't mind what format they're in, and a couple months later my wink clip was in one of his videos.

Also the time I sent Terry Goodkind an inquiry through the mail, since he doesn't have a public email but has an address on his website. I got a rejected reply to my question, but the signed postcard made up for it.

Now, I've been a fan of CommunityChannel for a while, but I never had anything meaningful to say outside of the generic "ZOMG Nat, you're amazing!!!<3!!!" That was, until I started going through some of her earlier videos and had a ridiculous thought. And yes, I really did send this email:

18 June 2012

Current State of Affairs (Personal Project 2012)

I have every right to be disappointed by my own out-of-work work ethic. As far as personal projects go, I don't have much to show for them given the amount of time I could have spent working on them.

That being said, I'm still a bit surprised by just how much code went into making such a simple thing. I guess from here on, I can almost focus exclusively on the game if I wanted, since all the DirectX setup and deconstruction nonsense is complete (until I want to add in user graphical settings *shiver*).

The speech bubbles aren't 100% complete yet, but the only thing left is to determine placement and which of the 4 corners has the focal point (the pointed edge of the speech bubble). Also Events -- what happens after the bubble is closed.

I'm not planning on touching those again for a while, but Events are my next step. There are some parallels to how I set up the speech/choice bubbles and how I plan on setting up Events.

There's a very basic abstract class UIElement. Probably deserving of a more awesome name (mainly because I'll eventually want to use it for not just UI), but that was a placeholder name I haven't given a chance to grow up yet. UIElement just has a pointer to a sprite, an x- and y-coordinate, and two unimplemented functions to draw -- DrawText() and Draw(). Anything that gets drawn on the screen can inherit UIElement, and I only have to worry about the new logic to draw that object.

As of right now, the only class directly inheriting UIElement is SpeechBubble. ChoiceBubble inherits SpeechBubble, as they're basically the same, except that a ChoiceBubble needs to store a currently selected option and draws an additional arrow to tell the player which selection they're on.



I want the same abstract layer to account for Events, where all Events could be treated the same. My current thought is to have the base Event store a Trigger() that would handle the logic for the event getting called and a pointer to another Event that can get triggered when the current one completes.

So yes... This is the stage I'm currently at. There's lots of hesitation for moving forward too quickly for fear of backtracking, but I haven't needed to move as slow as I have been, either. It's not as though backtracking is really that terrible, since that's what a lot of bug fixing at my current full-time job seems to entail. Hopefully I can keep some updates on my progress going at a pessimistic yet realistic "once a month" quota. More frequent if I'm feeling adventurous.

02 September 2011

Out with the Old

Right before I put in my 2-week's notice at my previous, mind-numbing job that made me want to gouge my eyes out every night, I had a little bit of this Baader-Meinhof Phenomenon going on. Everyone was telling me that I needed to "look after myself, because no one else is going to." Yes. In pretty much those exact words. Friends of mine that didn't know each other except maybe by name were telling me this.

I admit that I was freaking out over the notion of actually putting in my 2-week's notice, but in the overall scheme of things it was a trivial event. I got this "we've been treating you so well, but you haven't been returning the favor" spiel right after, but since actually leaving I haven't looked back.

There is something to be said about being happy with your job that I was taking for granted. My original thought process was highly negative, where I believed it wasn't possible to be happy working anywhere because of the conceptual idea of being a programmer for a company -- I view myself as a tool to help others accomplish their dreams. I suppose I believed that happiness could only be attained by accomplishing my own dreams, so I was content being miserable at my old job for a long time.

You don't have to be striving for your own dreams to be happy, and once again making a major change in my life has resulted in happiness. Though, I must admit, I once again needed a push to make the change.

Pretty much everything at the new job is better. I'm learning a lot from just a week's work and a couple days of training. The people are great, the code is challenging, and I've been picking up a lot of SQL. That was something I used very little of in the previous job, and I really only had to do some basic queries outside of the LLBLGen. Technically the new job uses NHibernate, but that's just within the site directly. I've been doing a lot of work thus far directly in SQL Management Studio with some insane queries and stored procedures that are TSQL heavy.

With the previous job, I was also annoyed that my college experience had been solely application development, but the work experience was pushing me towards web development. The new job ensures that I've pretty much sealed my career with web development (or the first job does? I tried looking for a non-web job and my resume had those places practically laughing at me), but I can be fine with this. After all, my own dreams are non-web based, and I do feel as though I can program on my freetime without being burnt out. They are two different animals, even if ASP.NET means I'm practically programming in C# all day.

The same week I started work, I also got in a relationship. This probably also helps with my sudden boost of confidence. I can be alert while at work, but then I can dial it down and relax while socializing with this dude who's either on the same wavelength or doesn't judge on various topics. Being completely comfortable talking about anything is something I don't experience with many people. It's easy to have a physical attraction to someone, but having an emotional attraction is much more difficult.

I did start up a new collaborative YouTube channel with my friend Becky. She wanted me to make a programming tutorial, but I think that's going to be a very long side project. Still, I went ahead and made a first video. If you already know how to program, it will probably be very boring to watch.



18 July 2011

Taking the Physical Challenge

I'm really enjoying the more recent fad of PS2 games getting re-released on the PS3 with an HD makeover and trophies. All of the existing collections are for games I'd either never beaten or never played -- God of War, Tomb Raider, and Sly Cooper are the only existing collections I'm aware of. It's come to my attention recently that collections will also be coming out soon for Metal Gear Solid, Silent Hill, and Splinter Cell. Those three I'd want to pick up for the nostalgia of having played them before on top of having a reason to play them again for trophies.

I owned God of War before, but that was quite a while ago. I'd also never beaten it. Not really sure why I picked up the collection, but this is the only HD collection I currently own. It's not a style of game I usually take much enjoyment out of -- the Devil May Cry style that's 3rd person and could almost be classified as a pseudo fighting game, what with the combo lists required to pull off special moves. I did just get done beating the first game this weekend. For good. With the Platinum trophy, it's safe to say I'll probably never want to touch it again.

You can't go wrong with a storyline based on Greek mythology in my book, and most of the trophies weren't too bad. I would have said all of the trophies were relatively straightforward and easy. Until I tried to go for my last gold trophy, titled "I'll Take the Physical Challenge."

After you beat the game, you can do this little thing called "Challenge of the Gods." It's 10 different challenges that all need to be completed in one sitting to finish. If you enter this game mode from the menu, you'll always start at the first challenge. If you get to a higher challenge and fail, you can start over from that challenge, but returning to the main menu would mean having to start over from 1 again. A lot of the challenges focus on killing or destroying all things within a time limit. Others are just "destroy all things". This is fine for the most part, and with enough tries all of them are doable. The frustrating challenges were 8 and 10.

For challenge 8, falling under the "defeat all enemies with no time limit" category, the only enemies were normal skeleton soldiers (whatever they're actually called) and gorgons. Lots of gorgons. The problem with gorgons is their gaze attack, which you don't have to be facing them for it to work. I redid that challenge so many times from being turned to stone and immediately being shattered before I could break out. Rage.

The last challenge was maybe 2 to 3 minutes long from start to finish. That being said, it took me maybe 2 to 3 hours to finish. You were given a tiny platform to defeat enemies, and each enemy defeated would raise the platform. Your goal was to get high enough to reach another platform. The only enemies were mini Cerberus puppies and Satyr. The puppies always do this attack where they lunge forward, and hitting you acts as a mini explosion, knocking you back. All of the Satyr's attacks either knock you back or throw you around. Basically, you only have to get hit once or twice by any enemy to fall off the platform, which is mostly instant death. Right when I started, I was reading online about strategies, and everyone agreed on one strategy. It's the same strategy I kept using, and it really was the only effective way to have a chance of advancement. Just spamming the same move over and over until you eventually get to the platform to the top... My luck must have been bad.

I have a lot of footage to go through, but early on in the challenge I decided to start up some video capture. I plan on making a montage video of a lot of the cheap deaths. There's not many games that can frustrate me enough to have me yelling "wtf!?" and other such obscenities, but this was definitely one of them.

I still have God of War 2 to play through and platinum before I can shelve the collection as complete, but the internet tells me it's easier than the first. Here's hoping...

01 June 2011

Breaking Tension With Tension

We've become somewhat distant these days, blog. It's been well over a month since the previous update, and I have been working on a few things since then. But all progress on side projects has been lost as a result of the latest project: job hunting. Yes, I still have a job, but I'm only using it as a crutch these days to waste away countless boring hours getting paid while I spend more hours on the side looking for a different job. In some cases, these hours coincide, but this has only been true in the event that I need to interview. I've used some excuses that haven't been 100% lies thus far, but my latest interview includes a lie that is not yet true but I am seriously considering.

So I have this problem with crowds. Or new scenarios including one-on-ones, too. Just if "new" and inherently unknown (which equals uncomfortable) is concerned. The problem? A touch of social anxiety.

I'm really lacking in energy right now to continue my day without further sleep, but I must admit that I'm considering a therapist. A new friend in my life has commented on my anxiety, which affects a few important areas in my life, and it is something I've decided is my #1 social problem at present. Having no fear is a goal, and for some reason I am subconsciously afraid despite no longer wanting to be. I feel perfectly fine with the idea of being social, but I gain some nervous ticks and start sweating excessively in practice. Sometimes blushing is involved out of irrational embarrassment, too. Having interviews and not being able to prevent certain ticks when I'm convinced that I don't really feel nervous is annoying and probably doesn't make me look good. It's like my mind and my heart are of two different opinions on the matter...

A therapist isn't cheap, but I'm sick of taking a backseat to these emotions that take over without the decency of asking. I don't know... I'm probably still conflicted on this decision, but I want to do it. Seeing a therapist is one of my many dreams in life, though ideally that outcome would have been just for fun. The perfectionist inside of me might make such a trip difficult, as I fear lying about my true feelings as a means to appear normal to a complete stranger. Of course, such a thought could just be because I feel I lie to myself, too -- a thought that suggests that maybe I do need some outside assistance.

Maybe a different cause altogether, too. So tired these days, and no amount of sleep or caffeine seems to help. I used to frown down on others who complained about just wanting to sleep, but I fear I have become one of those hoodlums myself. Sleep is an escape, and all I want to do is hide from my current life with hopes that I will get handed some form of change on a silver platter for when I awaken. Not at all likely, is it? The period between change seems so difficult, though, as I'm stuck with the old life's priorities I no longer want on top of gaining a new life's priorities.

This conversation could lead into how I have a difficult time answering questions like "what is it you want out of life?" but I'm too tired. And I never have an answer.

19 February 2011

Woes of the Rating Model
















We've seen this sort of thing happen with too many of our favorite tv shows (you know the ones with which I speak, since we all loved them). These are the sorts of shows that we love every aspect of and use as a conversational piece via "did you see the new episode off Netflix/Hulu?"

Notice the conversational piece didn't mention the tv? That was on purpose. Rating a show's success or failure on the ratings of *when it aired* is a dinosaur model that needs to be banished. The alternative is to get all of the previous generations that still watch television into the shows that we love, but I really don't think they enjoy the same things we do based on what doesn't get cancelled.

Also notice that "we" describes my generation, which is also on purpose. We love "Fringe", don't we? I was just getting done reading about Joshua Jackson trying to garner support by getting the populous to watch it when it airs on Friday. It appears the ratings haven't been doing well lately. Fox doesn't have a good track record when it comes to keeping shows out of the goodness of its cold, black heart, but then it is a television station. I'm also looking at a different station (is it CBS?) with disdain for cancelling my previous favorite show "Legend of the Seeker", but the box art for season 2 says "and Last Season," so there isn't any hope of that one being revived...