Learning C#

So I’ve been quiet the last few weeks, and that’s because I’ve been busy learning C#. I never got into it because I was always worried that it’d be archaic and obtuse to learn. That was compounded by the fact that I had tried C++ a few times, with Code::Blocks and I always got stuck with choosing a compiler or something. I really didn’t know what I was doing. Luckily, a friend of mine, sec_goat, convinced me to try out C#.

I’m really glad he did, because the whole language really isn’t as nasty as I was expecting. The compiler issue was taken care of by Visual Studio 2010 Pro, which I get for free from Microsoft DreamSpark, since I’m still in College. I’m actually still pretty fuzzy on the stuff that’s going on under the hood in C#, so I probably couldn’t compile my own project, but hey, it’s only been a few weeks.

Another reason I’m pretty stoked is that I’ve always wanted the be able to develop some games, and that just wasn’t easy in Python, because of how it runs. It’s super easy to get the design going, but unless you’d optimize the shit out of it, it’s going to run a bit slow. Now, not only can I develop games that’ll run at a decent pace, I can actually make games for the Xbox 360 too, with the XNA package.

It’s similar to PyGame as far as I can tell, but allows you to develop for the Xbox 360, and it’s integrated into Visual Studio quite nicely. It’s only a shame that I can’t use Visual Studio 2012 with it, without tweaking some files around; but that’s not a huge issue, since VS 2010 is pretty great anyways.

Relatedly, I’m using the VSvim plugin for Visual Studio, so a great majority of the vim controls are allowed. This greatly helps me learn vim. I have also set up gVim as an external tool, so whenever I hit F1, the code gets loaded into gVim for editing, should I ever need to do some extreme vimming.

Right now, we’re toying with the idea of making a Facebook pet raising game. Sec_goat is seeing what he can do as far as setting up a networked leaderboard, and I’m experimenting with making a tamigotchi clone. I’ve got a little console game going now that allows you to feed and do damage to your pet, along with an inventory system so you can store the food and a rudimentary status system where you can get buffs and debuffs such as happy or sick etc. I’m now trying to move the Console game to XNA, so I can make a graphical interface for it, along with having a true game loop, rather than just one prompt after another.

As far as tutorials go, that’s going to be put on the sidelines, if you can’t tell already. Like most people, I’m motivated by my own interests, so I just jump from project to project when it suits me. But if you’d like to get a simple tutorial on a Python feature, send me an email at tankorsmash@tankorsmash.com or on reddit under the username tankorsmash and maybe it’ll be the motivation I need to write another!

Thanks for reading, and as always,  I love hearing feedback. Ask me some questions or something!

Reddit API Tutorial Part 2: Getting all the submissions to any given subreddit

What’s up? Today we’re going to look at how to retrieve the stories (official term for submissions or selfposts) from any given subreddit. What we’re going to do is pretty simple, essentially just customizing a url with the proper subreddit and reading the JSON object returned. It’s going to be a pretty short one. I’m going to attach the login code I’ve written along with the code we’ve looked at today so that you can just copy and paste it into your IDE and start playing with it, right away. Just make sure you’ve got all the required module installed, mentioned here.  Hit the jump to get started!

Tinypaste Link for entire code

Continue reading Reddit API Tutorial Part 2: Getting all the submissions to any given subreddit

Music Player progress

Been working on the Media Player, from the wxPython widget, MediaCtrl. I am pretty sure I’ve written at least one post a few weeks ago about how much trouble I had to go through just to get the thing working… here But luckily, since then I haven’t run into much trouble, as far as wxPython goes.

Hit the jump for an update on some of the issues I’ve been dealing with.

Continue reading Music Player progress

How to find your Public-facing IP with Python, requests and BeautifulSoup

In this entry, we’re going to look up what our public facing IP address is, using the Python modules, re, requests and BeautifulSoup. It’s going to send a request to whatismyip.com with requests, then we’re going to parse the returned HTML in BeautifulSoup, so we can break it up, and navigate through it a lot easier, and then finally, use re to grab the IP address and print it to the screen.

Hit the jump for the tutorial!

Continue reading How to find your Public-facing IP with Python, requests and BeautifulSoup

A blog about gamedev and vim