Κυριακή 18 Απριλίου 2010

Greek National Competiton in Informatics

Yep. I just came home yesterday very satisfied with the results. I'm 2nd/36 (if I remember correctly) and 1st in my age group. This was the last of the 3 competition phases :)

So now I have time to do whatever I want, and that is game and win32 application developing. I really have to show you some of the great games I've made. Yeah, playing as that yellow cheese-like guy and sneaking through 4 ghosts is so much fun :P

I'm making a 2D space shooter game right now (Right now I'm writing this but I think you got it) and I'm working on the combat system (I love calling simple snaps of code "systems", it makes them look much more complicated than "just a function"). I spent the day finding a way around of those linker errors I encoured today and I finally made it.


-End of Post-

Πέμπτη 8 Απριλίου 2010

RED ALERT stdio.h SUCKS, fstream FTW

Ah, I don't fee... I don't feel so well... I just found out that fstream is way faster than stdio.h! Ha? You knew? Good for you!

I did a test on my linux machine. I tested writing and opening/closing files, not reading, as I felt the urgent need to kill myself after the first 2 tests.

I should note that I used fprintf() and the << operator for writing and the fopen()/fclose() and ::open()/::close() functions for opening/closing the files.

I might give you the test results sometime.

Happy coding fstream-ers.

Δευτέρα 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.

First post!

(If you are scared of boredom don't read this one, it might get boring.)

I hope it's not the last one too. Well, hi there! I really hope there's someone reading this. Even if there isn't, I'll try to keep posting things regulary. If you've seen my profile, you already know who I am. If not, go and do so.

Soooo, what's this blog about?
It's about me. It says so. Look up there, it says chris's blog. Nono, I'm not going to bore you with how-much-I-love-my-dog and how-I-like-my-sandwich posts. (By the way, I don't have a dog and I like sandwiches with olives). In this blog, I'll be posting things about my programing experience, my projects, intresting things about computing, and maybe some other things too.

This post won't be well-structures when I finish it, but as I was writing about what this blog is about, I felt the need to write about my programing skills and experience.

Well, I started programing in Visual Basic a few years ago. I made a web-browser! Yes I did! (Don't get to impressed, writing a browser in Microsoft Visual Basic Express is 3 lines of code.) Then I moved on to C, got some intresting books and made my first serious programs. That's were the passion came in. (Now it starts getting boring, both writing it and reading it I guess, so I'm gonna speed up my life story a bit.) I just loved coding... (<3>sudo shutdown -P now