10/09/2009

WTF Am I Doing? (Non-Technical)

Growing up as a kid I always loved T.V. shows like Pokemon, Digimon, Monster Rancher, Yu-Gi-Oh! and many others.

Although I was never into the card games, I dreamed of really being able to battle monsters.

So now that I'm all grown up, I haven't forgotten about my childhood dreams. I am now a computer software developer, and it seems that I finally have the chance to make my dreams come true.

With the rising of mobile computing devices it seems like the time is ripe.
So this is what I imagine. A digital world like Digimon, filled with 'monsters' that people can battle against each other at any place and any time.

I also envision a single (expandable) digital world, where everyone can interact with everyone else. Where monsters roam free, and can be truly unique. A self-sustaining world.

So, how do I achieve this? Well, I'll use the tools that are at my disposal.
I'm choosing google's Android platform to develop the actual game. For simplicity it's going to be 2D. I already have the prototype ready, and am now in the process of integrating it with all the other parts.

Of course I'm going to need a server side program, or God.
The God is being written in erlang, it controls the world. However, it really knows nothing about it. It simply takes data in and spits data out.
This is truly the brains of the program.

I'll also need a designing program or Architect. This is heavily inspired by programs like RPG Maker. I remember building my own custom battle system for RM2K back in the days. But I digress.

I've already finished the prototype for the Architect as well, but there is a lot of work yet to be done. Since this isn't particularly exciting I've only programmed it for what I need so far, but I need do add a lot more.

So, I've gotten some of the basics done. However, as some of you will know, developing a MMORPG type game is a lot of work.
So, in the hopes of gaining a bit of extra cash I've started this blog to detail my journey.

If anyone is interested in helping you can e-mail me at therevoltingx(@)gmail.com.
I plan on making the game open-source so it can continue living when I move on to other projects. (Robots!)

Don't worry, I will retro-blog all my progress so far going back to the beginning with setting up a solid 2D game engine with android.
However, I'm concentrating on the God program at the moment, so most likely any new blog posts will be about that.

Regards,
Miguel.

10/07/2009

RabbitMQ + Erlang Client = Yay!

UPDATE: Read the second part at:  http://developingthedream.blogspot.com/2010/08/setting-up-queue-consumer-with.html

Creating a new erlang project based on the rabbitmq erlang client.
Please take these instructions with a giant grain of salt as I am still an erlang noob.
This is how I got started on my CentOS 5 machine.
I installed erlang via yum.
Everything else is installed manually.

First, create a proper folder structure for the new project. This seems to be pretty standard in some of the erlang projects I've seen so far:

project/
project/db/
project/deps/
project/ebin/
project/include/
project/src/

Then install the latest version of rabbitmq and the rabbitmq erlang client like so:

cd deps
hg clone http://hg.rabbitmq.com/rabbitmq-server
hg clone http://hg.rabbitmq.com/rabbitmq-codegen
hg clone http://hg.rabbitmq.com/rabbitmq-erlang-client
cd rabbitmq-server && make && cd ..
cd rabbitmq-erlang-client && make && cd ..
ln -s /path/to/project/deps/rabbitmq-server/ /usr/lib/erlang/lib/rabbitmq_common
ln -s /path/to/project/deps/rabbitmq-server/ /usr/lib/erlang/lib/rabbitmq_erlang_client


This downloads and builds rabbitmq and the erlang client to the project's deps/ directory.
Then it links it to erlang's lib directory.

Now it's time to create a makefile to simplify building the code.

Makefile.am
.SUFFIXES: .erl .beam 
.erl.beam:  
erlc -W $< 

ERL = erl -pa ebin -boot start_sasl -s rabbit -mnesia dir 'db' 
ERLC = erlc -o ebin 
MODS = src/consumer.erl 
all:  
${ERLC} ${MODS} 
run:  
${ERL} 
clean:  
rm -rf ebin/*.beam erl_crash.dump 


Now we're ready to go and write a consumer using the erlang client, coming up next.