Spring Break Hackathon Day Three
Last night, I completed my 4 hours coding session after what seem like forever. There isn’t much to talk about either. Not even rbpong got updated. That day, I simply worked on my two main game projects, rubytet and space fighter ace. Both of which I incurred new challenges.
For Space Fighter Ace, I spent 3/4 of my time updating the game menu event code. There is still some unfinished business, mainly with the mouse. I’ll have to go back and look at the documentation again. As luck have it, the author of Rubygame was online. So I pestered him on all I needed to know about Ftor, including code example. I understood all and then begin work on the movement code, modifying it to add to the vector. I wrote methods for converting rect to vectors and then vice versa. However, the only problem was that it didn’t work. The magnitude doesn’t seem to have any effect on the game vector. Worst of all, I couldn’t solve the crashing problem when it complain about floating points even though I rounded them up. Jacius wasn’t here when I needed him, so I am stuck with the problem for now. I might have some luck by asking other users of Rubygame, but they don’t seem to be around these days.
As for RubyTet development, I mostly spent my time writing configuration files for all the shape of the game. It was tedious, but easy work. It was nothing compared to the great difficulty of problem solving that I have with programming challenges. At the end, I finally worked on the code again, writing a reader so that I can finally use the data to convert them into usable shapes.
Then, I just switched to work on network code. I finally figured out telnet and coded the client. The only problem was that I don’t know how to process the data. Tutorials are scarce for EventMachine, so I am left with scant information on how to use the library. I guess EventMachine is only meant for experts because others managed to code application with it. I still don’t get what “reactor pattern” mean. It is event driven so I guess it is similar to Rubygame::EventQueue. Even so, I managed to code a client and a server.
Given time, I’ll probably figured everything out and start to make complex networked game with EventMachine. Since EventMachine seem to be accessible in other languages, I can take this library and go into whatever language I am programming in and use it.
The client and server for RubyTet, I planned to port it into Space Fighter Ace as well. It is probably going to be a set of library that I developed alongside with KRPGE, rbgooey.
Day 3 already ended and I have yet to start development on the fourth day. Gottach go now!
Happy hacking
~Kiba

Leave a Reply