Εμφάνιση αναρτήσεων με ετικέτα game developing. Εμφάνιση όλων των αναρτήσεων
Εμφάνιση αναρτήσεων με ετικέτα game developing. Εμφάνιση όλων των αναρτήσεων

Σάββατο 25 Δεκεμβρίου 2010

Merry Christmas!

It's Christmas! And even though I'm an atheist, I couldn't think of a better title.

So, Merry Christmas.

I just took a decision. I decided to start making a game. I had the idea for this game for a few months now, about a month ago I started working on it with flash and php only to find out that making a game in flash and php is way more difficult that developing a game in C++. Many weeks later, I still think the game - if ever completed - would be fun. Really fun! So today, 2 days since my holidays started I decided to start working on it again. This time I'll use C++ and SFML. Obviously I'm talking about a 2D game (I still don't feel very comfortable with using OpenGL and I'd hate using anything not cross-platform).

It's a strategy game. No, not a very complicated one (I hope!). It's nothing too ambitious, completing this project seems generally realistic :P. I'll propably do the development on windows, but I'll be testing it on my linux machine every now and then. Platform Independence is very important to me. So, for the next 2 weeks I'll be working on it full time (ok, almost full time).

In my first 2 hours of working on the project, I made a Logging class and generally designed the Object-Oriented code of the game. Basic classes, files etc. Now I have a pretty good idea of how the game and the code will look like. At them moment, the game starts, displays a black window, writes something to the logfile and quits. Not too bad.

Next topic of the day: It's Chrstmas. I told you, didn't I? I could cut & paste this to the beginning of the post, but who cares about organized speech? Organized code is all that matters. Ok almost. ANYWAY, as I said, it's Christmas and I got a really, really, really really really great present. An Iphone 4! Yep! I might even start developing apps for it, one day. The annoying thing is you need a Mac and Objective-C knowledge to write apps for the Iphone, unless you buy expensive 3rd party windows software or spend days trying to find a workaround. Of course I have MacOSX in a virtual machine and I don't need to bother, really :). I downloaded X-code it runs great, only problem is I don't know Objective-C. But one can code only one thing at time, right? So I will dedicate myself into my game.

And I should remind myself to write about my opinion on youtube and especially its comments and rating system. They suck. Wow I just expressed my opinion! I'll expand on it once I am less eager to start coding again.

A short 20 minute break and back to work again. Till next time!

Δευτέρα 5 Απριλίου 2010

Game developing, A* and a compiler error

Good day :)

Have I told you that I am still a student? Fortunatly, it's easter holidays now :) So I have time to do anything I want, and that's usually programing and starting (unfortunatly not finishing) ambitious projects. During the last weeks I spent my time trying to make simple 2D games, studying new data structures and algorithms and learning assembly. I am not making much progress with assembly, I am more fond of high-level programing. As for game developing, until now I have done a Tic-Tac-Toe and a Pacman game using SDL. I might upload them later so you can take a look. Now I am in the process of making a Real Time Strategy game. Yes! And it's way more complex than I thought, but it has a lot of AI and that keeps me motivated.

Yesterday while implementing the A* algorithm, it took me ~30 minutes to figure out why the following line of C++ code was not working (I don't remember the exact compiler error) :

std::list<*Node> OpenList;

Node is a class and OpenList should be a list of pointers to Node classes.
Have you noticed the mistake yet? DON'T GOOGLE IT, DON'T CHEAT! (you won't find anything anyway, I tried) Come on, it's 1 line of code!

Changing the line to

std::list<Node* > OpenList;

was enough :)
Of course I knew that the * should come after the type specifier, but why didn't I think of it the first time? Pah, who cares. I've fixed it now and I won't make the same mistake again.