Showing posts with label geekhood. Show all posts
Showing posts with label geekhood. Show all posts

Monday, April 2, 2012

Infiltrator Part 18 - Getting Around Path Finding Obstacles

Fixing a bug like this always makes a programmer feel invincible. Until the next one shows up anyway. Everybody get a Ginger Ale or something to celebrate successful integration of a path finding engine into the Infiltrator code.


This time I'm going to take the example of other people doing a gig similar to mine and try to break down the problem and what went into solving it for those of you who aren't programmers. This should still be entertaining for those of you who are programmers though. This will help make following this series more of an interesting set of problems and solutions and less of a screenshot log. Buckle up, this is going to be a kind of long but still awesome ride.


Wednesday, February 1, 2012

New Album officiated!

So, I'm officially announcing production of a new music album. I've got about 30 minutes of music lined up already, and about 10 tracks. I'm officially titling it "Coding After Midnight." The idea here is that it's the kind of music you would play while coding/hacking late at night. Themes in the songs (Yes, I do those now. I'm not just capable of instrumentals you know) centre around things like hacking, computers, night time, dreams, being a geek, etc.

I don't have anything but foggy ideas for cover art yet, but that doesn't really need to be done before the album.

I'm not really sure about the release time. I'm going to say that I think I'll be done within the next 3 months or so, but that's not a commitment.

Anyway, start biting your nails and celebrating that I'm still doing albums for now.

    --LazerBlade

Wednesday, January 4, 2012

Infiltrator Part 10

This was a rather fun session for a number of reasons. It was also a rather slow session for a number of reasons, including that one stupid bug(more on that later), my school teacher breaking into my house at night with a baseball bat to see why I wasn't at class, the group of people who appear on my couch during all the holidays, and my webshow fans not liking to be utterly forgotten for a week.

Whatever the case, there's more progress for everyone. This session is about the opposite of number 8, where the changes made were mostly internal, instead making mainly visual changes.


I loaded up my favourite desktop wallpaper to play on top of just for laughs.

As you can see, there's a brand new shiny heads up display. This includes a functional weapon selector/indicator, and shield meter, and an energy indicator. There are separate energy pools for each weapon except for the AIFSA, because it doesn't need energy.

I must admit that you can't really spend energy or lose shields. The only way to change energy/shield levels at the moment is with the debug keys that let you turn them up and down at will. Eventually energy use will be programmed in as well as the ability to take damage, but for now there are higher priorities. Besides, the system is intact, which will make it theoretically smooth to add those features.

Also of note are some new art assets I've thrown together. I'm not doing tiled levels, but it stand to reason that SOME level assets are going to be square-ish.


Now let's delve in and explain that bug that slowed me down, which I've only barely overcome. This should be interesting, but a bit technical. If this looks like greek to you, feel free to skip ahead.


Engage first person non-omniscient present-tense writer mode!

I need to setup the HUD to display weapons. I'll just make five base-HUD images, one for each weapon. I'll load them into RAM, and just set a different image to be drawn depending on which weapon is selected. I draw up the images, setup my program to load them up, and change which image is to be drawn when the player changes weapons.

I compile the program to test it out. It's a little difficult, since the frame-rate is CUT INTO LESS THAN HALF! This can't be a memory usage problem. This can't be a CPU usage problem. This problem doesn't make any sense.

I'm not even drawing the image, or really doing anything but loading it into RAM. Let's do a little math to see of a 1024x768 image, with 4 channel RGBA color should be taking up a big amount of RAM. Let's start by assuming that the developers of SFML are at least mildly intelligent, and use only as much RAM as they could ever possibly need. That means each pixel should take up 8 bits for each channel, meaning values from 0 to 255 for each color channel(standard). With 4 channels, that's 32 bits. We can easily calculate how much RAM this should take up by multiplying this by the number of pixels within the image. The number of pixels total is the width times the height, so RAM = 32 * Width * Height. Width is 1024, height is 768, so it should be taking up 26,148,864 bits max. Let's divide that by 1024 to calculate kilobytes, and then do it again to calculate megabytes. We end up with 24.937 MB.

This makes zero sense. If SFML isn't optimized at all, then each image should be taking up less than 25 MB of ram. It should be taking up a lot less if it is optimized. Then we note that I have 8 GB ripe for the picking, and see that there is no way these images should be bogging the system down by using a lot of system or video RAM. That means the RAM usage isn't the problem unless SFML is broken.

CPU usage isn't the problem, since I've narrowed the code down. I don't even call the variable more than once to load the image. Loading the image should't be causing a RAM or CPU usage problem. Yet, when I monitor the application, the CPU usage is at 100 percent. I double check vsync to make sure it's working.

Now I'm lost. As a last resort, I try moving the image variable into the level class(where it doesn't go.) TaDaa! Everything works! Now I'm twice as lost. But the bug is fixed(for now) I guess, so...yea.

Disable first person non omniscient present tense writer mode!

        --LazerBlade

Monday, October 10, 2011

Comic #6

It's starting to get annoying that there's no way to put these comics here big enough to be read without clicking.


I do this to people all the time.

Tuesday, September 20, 2011

Music: tastes, habits, and talents

I've kind of been letting my Youtube channel and blog separate themselves. I tend to discuss and post music on Youtube, and mostly have game, programming related or techno-geek content on this blog. I'm going to try breaking that up, starting now by discussing music here.

Just don't get lost in here, I still like programming better.

Let's start with my musical history. As a young kid, I heard all kinds of stuff. Nursery rhymes, hip-hop, punk, rock'n'roll, classical, country, folk, gospel, and more. I didn't really care much for composition, I just liked certain sounds of certain instruments. I happened to like electric guitars a LOT, giving me a sweet spot for punk, metal, and rock'n'roll.

As time went on, I kept acquiring new tastes. My love for instrumentation stayed, but composition started playing a bigger role in defining my taste. I took a liking to blues, jazz, and classical. I especially liked piano solos of these three. Eventually, I started some piano lessons. Here I learned about theory, composition, and a lot more. I still take lessons from the same teacher, and I'm sure there is still more to learn.


I eventually learned some improvisation. Although I'm still new to it, I can lay down some blues in a fashion I quite enjoy. I composed a few of my own pieces, mostly to play at yearly recitals. My new ability for composition, despite being quite simple, still ushered in a desire to make music myself.

I kept doing piano, but started experimenting with guitar and electronic music. I never really could play guitar much, but had a kind of perseverance for electronic music. I started on the only machine I owned at the time, which was only powerful enough to run DOS. I couldn't even afford that, so I went with FreeDOS. Although primitive, this operating system came with a program that would compile text files into MIDI which could then be played through the PC speaker. I contented myself playing around with this until I got a slightly less obsolete machine which I ran Slackware 10 on.

On this machine, I experimented with Audacity. I generated tones and whitenoise, then applied effects and pitch-bend. This didn't work so well, but it didn't last long either. I finally got a machine that was barely obsolete, allowing me to get some real music software. I didn't know where to go at first, but eventually ended up spending quite some time playing with BEAST. It was here that I finally gained some knowledge of electronic music, and picked up a lot of experience that traveled with me to the next stage.

As time continued to pass, I eventually got a modern machine. Determined to find some real software, I came across FL Studio. I messed around with that for a couple months, but pretty quickly discovered LMMS. LMMS was perfect for me. It was there that I built my musical home, and have used LMMS for almost a year now.


So, about four and a half years after my first piano lesson, here I stand-erm sit. In a chair. In front of a cutting edge machine. It wouldn't seem so weird if I didn't consider what I might think of my music five years from now. Music that I thought I had made awesome back then, seems really terrible now.

Anyway, now I've got a really weird set of tastes. To explain what I mean, I like really hardcore and grungy punk. I also like me some uber-happy drippy and stupid pop. Did I mention Gilbert and Sullivan make really awesome music? I love Hardstyle, Trance, House, and many other forms of electronic music. Opera, classical, and ragtime also sound pretty good. Actually, there are very few genre's I don't enjoy, and even fewer that I don't respect. There's just a few, but they're there.

So yeah, that's pretty much all there is to it. It's also why you'll hear one style on my album, and then a totally different one in the next track. I don't really like to listen to one sound for too long, I get board fast.

Rock On, opera fans!


        --LazerBlade

Monday, September 19, 2011

Where have you been?

So before I explain myself for almost a week of absence, here is this week's comic:


Okay, now for the explanation. My schedule went into chaos mode while I tried to deal with some personal things, still keeping up with school and other stuff. When Thursday came, I basically had one long crash until yesterday. I barely had time to post an announcement that Advanced LMMS would be delayed by a week. And yesterday I was lazy. ;)

So anyway, I'm back now and should hopefully be able to return this blog to it's regular posting schedule.


        --LazerBlade

Thursday, July 21, 2011

Videogame characters



Most of you are probably used to me rambling on about the interesting facets of game programming and philosophy. However, being a one man show encompasses a good deal more, and this time I'm going to talk a bit about story and characters in games.

Often times, games suffer from something not too different from programmer art. This something is what I call programmer story. I will be honest, someone who can specialize well enough in programming to make an entire game on their own, probably won't be as good at story writing as a specialist in that area. However, we aren't trying to do perfect stories, we just want good stories in a fairly reasonable amount of time. Coming up with a good story is a complex task, and a rather daunting one at that. I'm just sticking to characters for now.

Some say you should NEVER ever EVER reveal the main character's personality. That way the player can then connect with them better by coming up with their own. Then you have just as many people saying that you absolutely MUST give some background and expound a little on the protagonist's character. If you want my perspective on it, both of these positions are equally viable. You can do it either way and make not only a successful game, but a good game.

As a rule, you should pick your race, gender, age, birthplace, and everything else that isn't part of the personality, very carefully. It's a bad idea to say "We better make this character African so that people won't rap on us for being racist." But at the same time, it's a bad idea to say "What? Another protagonist? Just grab another one of those dudes with blonde spiky hair and a five o'clock shadow." One thing I hate about creating characters for your story is that any game designer will feel like they're only trying to line up with the reviewers ideas of what's fair and what's boring. In my opinion, you should ONLY pick these things because it helps you better express the character's personality. Granted, reviewers will probably eat you alive for not having the perfect white-black-man-woman ratio of characters in your game, but who cares anyway?

That said, I think it's best to work out the characters personality and then choose things like race to explain or express that personality. So first get your personality all fleshed out. Give every character some flaws, some places where they aren't sure what they think, that kind of thing. Once you have that down, you can start picking things like gender. Then you can move on to choosing experiences that shaped these characters in the past. If they don't trust anyone, throw in some betrayal or have them grow up on the street or something.

Now that you have a character that has personality, past experiences, and natural character flaws, don't go screwing it up by having them do or act in a way they wouldn't. Don't have somebody with a trust-no-one attitude decide to trust the protagonist. And don't EVEN THINK about making up some excuse like "You have no choice," or "I know you well enough," or "You're the protagonist so you're just the kind of person that everybody trusts." You shouldn't have to explain your characters personalities, they should be manifested in their actions. So have your characters stick to their personalities.

This article is starting to run a little long, so I'll try to finish up by saying that not every character in your game needs a personality. The random person who rides by in a skateboard doesn't need all that work. You must decide for yourself how deep you need to make each character. Some characters just need to show up and do their thing, others need to communicate with the player.


       --LazerBlade

Saturday, July 16, 2011

Advanced LMMS episode 3

Despite a rather chaotic week, I still managed to get this week's episode together in time. I'm covering a hardstyle screech:



This is actually the first recording, I didn't have time to re-shoot at all. You'll have to live with it and ignore the mistakes. This time. ;)

Enjoy!

Tuesday, July 12, 2011

What makes a hacker's paradise?

I must admit that I really enjoyed the last couple weeks or so. I started out working on Infiltrator(more on that in a later post.) I added in some basic enemy structure, and went about trying to implement spawn/die system. Everything went perfectly, before the evil monsters of pointers in C++ arose from the pits. I couldn't get the application to stop crashing on me. I worked late into the night drinking more and more coffee.

I was pretty much out of ideas. I needed a break, a new look at the code and problem would probably help. I decided to do a little 3d modelling for the movie I'm working on:






That got boring after awhile, so I did some kung-fu, and then some music. Then I played around a bit with my new Linux Mint system, and decided to burn down the house of the person who decided we didn't need ~/.bashrc anymore.

And you're asking, what makes a hacker's paradise? I'm telling you. It's a world full of fun and interesting little(and big) problems to play around with. Oh, that and coffee and pizza. That's why we techno-geeks came to planet Earth, we didn't have coffee and pizza on our home planet. There has been no shortage of fun stuff to do for me, and that's what made things well... fun.


          --LazerBlade

Wednesday, June 15, 2011

The art of the vacuum



"What is this obviously Gimped(like the image editor) picture doing on my screen?" "That's the memory mnemonic that helps you remember and helps me prove my point." "I don't like it." "Yes, but you will remember that you didn't like it, and that will help you remember the rest of the post." "Or it will help me remember me tying your arms in a square knot."


-- The Mcdursy brothers



You might be wondering, what place does a vacuum cleaner have in the lair of a techno-geek? We don't spill food, and when we do we always have our minions lick it up off the titanium floor one crumb at a time. Yet why do we still find them in almost every lair? Why should the modern techno-geek of today consider having one?

The answer is simple, computers NEED vacuumed. Seriously, if you want to keep your machine around, you should vacuum it regularly. It will vary for different machines and different climates, but I find once a month is usually pretty safe. Vacuuming is something that can only be trusted to the highest minions, and sometimes can only be done by the geek itself.

You may not believe me, or you may think you haven't the time. I was once of a similar mindset, and have recently come to greatly appreciate my decision to vacuum regularly. Why this recent burst of pride and appreciation?

You guessed it, another tech support trap. Well, this time it wasn't really a trap, more of a likes to have friends and money(or money anyway,) so it was only a small step away.

A very small step.

So anyway, I get a call from one of my non-geek connections saying they have malware. Yea that figures, non-geek kinda goes with that. I accept the job, and have them drop off the computer. I didn't have time to look at it right away, so I just stuck it in my task stack near the top.

It ended up sitting in my lair for almost a week before I got to it. Yea, the thing was filled with malware, running slower than a snail carrying an anvil, and seemed to be lower on RAM than it should have been. So I do a little bit of malware hunting, which is really hard since the thing is apparently part of some kind of botnet based on how it prevents you from using it while still using up so many resources.

I decide to open it up and vacuum it out, knowing non-geeks don't do that very often. I also had to put the drive in a different machine and run anti-malware scans from an external system. So I pop the thing open. What I saw made me sorry I hadn't bought that digital camera I had my eye one. The thing was basically a huge roach nest. This was annoying on a number of levels. For example, that machine had just sat in my lair(which now has roaches) for almost a week.

Anyway, it took me two hours to get the mess cleaned up. They'll probably be finding stuff left over from that incident jammed into tiny little crevices I couldn't vacuum or didn't think to. Even after that, I found that there was a thick layer of dirt encrusted on top of the CPU's heatsink which was behind a permanently attached fan. If you turn the machine off and open it up, you can feel the heat by holding your hand a few inches away, and you will burn yourself if you touch. That didn't come off easy either.

Yet all of this could have been avoided if they had simply taken it upon themselves to vacuum their machine out every once in awhile. Even non-geeks, it's very simple. Just open the case and clean out any dust(or bugs) you see.

So if you haven't opened your case in awhile, you might consider checking for bug infestations and cleaning the dust out.

Oh, and for those of you who haven't witnessed me ranting previously, you just did.


        --LazerBlade

Monday, June 13, 2011

How do you take your coffee?


Foreward: If you get these jokes, good for you. If you don't get these jokes, good for you anyway because you're lucky. Note that you can only enjoy this article fully if you happen to be a trekkie.


Not Foreward:

Ask twenty people and you will probably get at least ten different answers. Well, twenty coffee drinkers anyway. Some only drink black coffee, others can only stand it with amounts of creamer that almost make me sick. Some take one lump of sugar, others two, some take only cream. Even after all that, you have espresso, cappuccino, latte, and all kinds of other variations which make coffee available to more people.

As a geek, I myself drink coffee at times. I'm highly irregular in every way however, and it's hard to put my finger on any habits. I've narrowed it down to mood and activities. Duh, staying up late working on a project equals drinking coffee. However, sometimes I drink it for the heck of it, sometimes I can't get enough of it, sometimes I just like the flavor at the moment, etc.

How I take my coffee is a can of worms in of itself. I've narrowed it down to mood. If I wish I had more time in my schedule, I often find myself diluting it with things like cream or milk, sometimes to extreme amounts. If I'm frustrated, I often find myself brewing a *very* strong pot and drinking it black. Then again I sometimes add extra sugar for the extra energy, or sometimes just mindlessly dump whatever is in front of me in the cup on the way back to my computer.

You may find it interesting that a person with my heredity would be influenced by things like frustration or wist-fullness. For those of you who don't know, I'm half Vulcan, about a quarter Klingon, and then another quarter Italian. It's hard to think such of a half-Vulcan, but remember what happens when you mix Vulcan and Klingon blood, let alone get Italian mixed in there.

Anyway, I tend to channel my feelings into things like how I take my coffee, so there's no need for worry about my 11 year mating cycle causing me to seek a warriors honorable revenge of my woman by putting the hit on you. Yea, mixing those together can create some interesting situations. ;)

I guess this is what happens when I try to write a whole article on coffee with too much of it in my system.

*SIP*

        --LazerBlade