Last three weeks

Here I am, the final three weeks until I graduate with my computer science degree. It’s been an interesting 3 and 1/2 years. Online learning was an obviously choice for me as I’m a full-time dad, husband, and IT professional. When I enrolled into my degree program it was an uncomfortable decision, it had been 15 years since I had been in school, and my first post-secondary experience. However, uncomfortable was the feeling I was after. I needed to make a change to pursue the work I wanted to do. Programming.

When I started my degree, I was a seasoned IT veteran of 15 years; I had seen many different industries, and worked many different problems ranging from programming, security, networking, and customer support. Yet, I had never attended college and had to wade through the IT-101 type classes which covered topics such as, what’s a hard drive? how does a CPU work? While this was painful at times, it allowed me to reflect upon my on the job training, and I had a better understanding of what I’ve accomplished in a non-traditional way. I attempted to look at each of these classes as an opportunity to share industry experience with my peers and reinforce any areas or gaps in my knowledge.

Some of the classes I dreaded taking, ended up being some of the most enjoyable for me. I’ve never been extremely strong with math, although Discrete Mathematics was one of my favorite courses, and it really challenged me. When I reflect upon why this math class resonated with me, I think it relates to how easy the formula’s and techniques can be mapped to computer science implementation.

Other areas of study helped round of my education, such as English, Psychology, and History. While I wasn’t thrilled about taking these, I understood their importance and haven seen a significant improvement in my writing and general aptitude towards their content. Again, I tried to find relatable learning experiences with my passion for game development. Studying psychology allowed me to better understand what drives behavioral decisions and how habits are formed. These are all relevant if you’re trying to build an immersive and replayable game I told myself.

In conclusion I’m a firm believer that the SNHU online degree program is a positive one. However, you get what you put into it. If you’re not reading the weekly material, have late assignments, or are not understanding the work. You must reach out for help; you need to be self-motivated and understand what your end goal is. You’re learning how to learn; the course content can is sometimes be irrelevant.

I feel there are huge gaps within the Computer Science degree program. The program has you jumping around between several different languages and wastes significant time learning about basic CS skills such as looping, iteration, and conditionals across all these languages. It should focus in on one language and take students to a much higher advanced aptitude. One area employers are looking for is knowledge of design patterns. This topic was never covered and it’s a shame. Design patterns are the building blocks of functional code, you’re learning from the mistakes that others have already performed and are given a recipe for how to implement it correctly.

Would I recommend this degree program? Well that depends, if you’re not just graduating high school, and have limited time. You have good time management, are self-motivated, and have a general interest in learning, then go get that degree.

If you’re just graduating high school and you don’t know what you want to do. Spend the extra money and go to a campus, you’ll form lifelong friendships. You’ll have improved social interactions, if you’re struggling you can go to the office hours of the professor, you can lean on your peers for support. These features and support systems are lacking within an online school, they try to compensate but its just not the same.

Happy Learning

Corey

 

LD45 – Fan The Flames – Rated Edition

So the game rating portion of Ludum Dare is over and Fan The Flames had 54 people rate it, with a total of 76 downloads. While it would of been nice to land in the Top 100. I knew from the feedback I was getting this wasn’t a reality. The scope of this project was rather large and ambitious for a solo developer to pull off within 48 hours. My game lacked a proper tutorial or at least teaching aspects, and the controls were convoluted. These are the two primary areas I’d improve on if I was starting LD45 today. The main game-play loop was accomplished rather quickly, but I spent too much time trying to perfect a day night cycle. I should have included more crafting recipes and controlled the snowfall better. Minor annoyances such as repetitive jumping sound, poor collision detection, and a non intuitive workbench left players frustrated. Overall, I’m happy with the direction of the art, I was able to produces those sprites rather quickly and using a cohesive color palette really added to the mood which is my second highest ranking result. The audio rating is pretty funny, as its all procedural generated sounds.

The other area of improvement I needed was a pixel perfect camera, some users reported seeing lines between the tile sprites, which I didn’t experience. However, I bet on a 16:9 screen this was a problem. Overall a solid entry and I’m looking forward to crushing these scores in April when LD46 comes around.

Cheers,

Corey

Kilburn – Roguelike – Update

One of my favorite game developer conference (GDC) talks is the Diablo postmortem by David Brevik. He details the nitty gritty of game design and development and show cases his original game design document (GDD) he was working on while in high school. I’ve always aspired to learn from the great developers that blazed the trails before me and I’ve been wracking my brain trying to come up with a name for the roguelike game I’ve been working on. David got the name Diablo from the mountain near his California home Mt. Diablo. So to google maps I went and I’ll be naming my future roguelike Kilburn, its a mountain that’s near my home.

Cheers David

Devlog Update

So feature development has been slow, I’ve spent the last two weeks rewriting my procedural map generation, redoing my artwork for my dungeon generator and integrating this work into the project. When I started this rewrite I wanted to do it outside of my active project so I was free of any other code that was running. I wanted to nail down the basics of procedural prefab room generation. I also wanted to publish this procedural generation so other developers could use it.

So, I released a basic version of my code under the MIT license, you can get a copy of it here:

https://github.com/Diaonic/ProceduralMapGen

Here’s what a generated map looks like in Kilburn
Here is a first look at the wall and floor tile set.

That’s all for now, as I continue to work on AI, combat, and work towards a playable build. We’ll be posting more updates.

Cheers

Corey

Unity Procedural Level Generation

I was unhappy with the assets and approaches I was finding for Unity procedural level generation. I had read about some developers taking prefab rooms and generating maps, but I couldn’t find any examples. However, I didn’t want the Binding of Isaac or Zelda dungeon feel. I wanted to be able t customize rooms, then generate a dungeon based on thematic prefab rooms.

Here’s the result

So whats going on here?

We’ll step through some pseudo code.

SpawnStartingRoom()

Spawn a 4-connection point room at a random x, y coordinate on our map array.

  • Store those 4 connection transforms in a list.
    • I also stored the connection transforms as keys to a dictionary of gameObjects, this way when I pulled a random transform, I look it up in the dictionary, get the gameObject.
    • Set all four of these connection points as available for connection, I just used a bool value on the prefab object to keep track of this.

SpawnPrefab()

  • Grab a random key from our available connection list
    • Grab the associated gameobject using the transform as a key for our dictionary of gameObjects
    • Using overlap collider, I check if there is an object present at my random key
      • Iterate over the bool values and find a connection point
      • Instantiate our prefab at the destination transform and apply an offset, so it lines up nicely with the existing gameObject
      • Set some connection flags
      • Rinse -> Repeat

Once we reach the number of rooms we want to spawn. We then initiate a cleanup phase.

CapDeadEnds()

  • This method iterates over all the spawned hallways.
  • It evaluates if the hallway has an open connection.
  • If we find an open connection, we attempt to spawn a large 8×8 endcap, if that fails, we spawn a 4×4 endcap, if that fails, we use a 2×2 endcap.

I ran into some issues here with detecting overlap and it resulted in a better generator in my opinion. So, the prefabs were built on entirely the same layer. So, I added another layer just for the floor, now when I get weird overlapping issues, its cutting into wall space and creating some interesting room configurations.

  • The intersected wall objects are removed.

I know this post probably isn’t for everybody, but I wanted to show some of my work and my nontraditional way of tacking level generation. I could probably add some more cleanup to remove oddities such as low value tiles spread throughout the center of the map. This is a good base I believe.

Roguelike – [Insert Name here]

Its been awhile since I posted an update. I took some time off from personal projects and have been focused in on finishing my CS degree with 4 classes left. The past two weeks I’ve found time to get back into my passion ( game development) and I’ve started working on a roguelike that is lacking a proper name.

So when I set out to build this, I wanted to keep my eye on the prize and get a prototype up and running as quickly as possible. This way I had something playable and could then iterate over game features, tuning, and polish. So without further ado here is a short tech demo. Things I’ve got completed:

  • Procedural Map Generation
  • A* Pathfinding
  • Player Movement & AI movement
  • A combat system based on 1d100 roll under

More updates to come, but the project is coming along nicely.

Cheers,

Corey

Portfolio Projects

Inspired by this article, I’m going through some exercises to build out my coding portfolio. I started working on a simple FTP client that will connect, upload, and download files. I’m not sure yet if I’ll support SFTP, but we’ll see how it goes. I’m coding this project as a WPF application in C#. After that I might code my own webserver.

You can find all this work on my github link above!

Cheers,

Corey

 

Start of something new

This is the start of something new, something exciting, and something I want to document and share with all of you. I’m starting a blog challenge as of today. I’ll be writing one post per day about a variety of topics. The topics will include coding tutorials, books I’m reading, life hacks about professional development, job interviews, and the work I’m doing with IOT.

Start of something new

Wait… who the hell are you and why should I read this crap?

That’s a great question, My name is Corey Canfield and I’m an average joe, I’ve been in the IT industry since 2001 when I graduated high school. I’m primarily self taught and have been working as a System Admin / Network Admin. Two years ago I wanted a change and a big one, I wanted to start developing software as a career. I’ve consumed every book, video, tutorial series I found. Now I’m enrolled in a CS degree program that I’m doing nights and weekends. While my journey here on this blog is for my benefit; to continue advancement of my knowledge by sharing what I’m doing. I’m hoping it will benefit others who might be in a similar gray area of their career and need that extra motivation to just jump in and start. So lets do this together!

My first tutorial series will be aimed at the beginner to intermediate and we’ll cover C#. Starting with the very basic IDE installation, we’ll move through variables, data types, looping, methods, decisions and much more. The reason I want to start here is I’m really excited to do a Unity 2D game development course and having a solid foundation of C# will help us through that journey.

I hope you’ll join me on my daily journey here!