LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 May 17 2014

alex.daoud
Member

Hey all

Posted in the programming forum the other day but didn't really introduce myself.

I'm a British/Lebanese mathematics student based in London; I'm in Lebanon for long periods of time especially during the summer. I've been a pure Ruby developer for the past 8 years working mainly on socket interactions for multiplayer elements in RPG games. More recently I've got into Rails development working with startups here in London. Over the years I've been involved in multiple other projects as well such as the iDroid project which ported Android to the iPhone 2G,3G and iPod Touch first generation. I also do a lot of messing around with the Nintendo DS which is a fantastic piece of hardware for homebrew developers.

I've always been interested in the development scene in Lebanon but never really knew where to start out. It will be great to meet people passionate about development in general and maybe even collaborate on some cool projects.

Offline

#2 May 17 2014

Joe
Member

Re: Hey all

Hey Alex.
It's always nice when programmers join our forum. Any piece code you wrote we can check out?

Enjoy your time here :)

Offline

#3 May 17 2014

alex.daoud
Member

Re: Hey all

void display_map(char* name) {
	
	char directory[256],path1[256],path2[256];
        sprintf(directory,"nitro:/maps/%s", name);
        NF_SetRootFolder(directory);
        sprintf(path1,"%s/layer1.CSV", directory);
        sprintf(path2,"%s/layer2.CSV", directory);
	
        parse_csv(path1, layer1);
        parse_csv(path2, layer2);
	
        NF_Set2D(0, 0);
	
        NF_InitTiledBgBuffers();
        NF_InitTiledBgSys(0);		
        NF_LoadTiledBg("tiles", "tiles", 512, 512);
        NF_LoadTiledBg("tiles", "tiles2", 512, 512);
        NF_CreateTiledBg(0, 1, "tiles");
        NF_CreateSharedTiledBg(0, 0, "tiles2",1);
	
	int ii,jj;
	for(ii=0;ii<=64;ii++) {
		for(jj=0;jj<=64;jj++) {
                        NF_SetTileOfMap(0,1,ii,jj,layer1[ii][jj]);
                        NF_SetTileOfMap(0,0,ii,jj,layer2[ii][jj]);
		}
	}
        NF_UpdateVramMap(0,1);
        NF_UpdateVramMap(0,0);
	
        NF_SetRootFolder("NITROFS");

        NF_ScrollBg(0, 0, 0, 0);
        NF_ScrollBg(0, 1, 0, 0);
	
        update_map();
}

That's a snippet from a simple tileset map system I wrote for the Nintendo DS. Written using the NFLib wrapper for the libnds library. It reads array data from two CSVs, loads the tileset into the DS's dedicated tileset memory bank then just iterates through the arrays setting each tile one by one. I had to write my own CSV parser because the DS's memory is simply too small for a standard C library to be of any use. As a result it's very slow to load because the parser's code is messy and needs refactoring. In any case it's good practice since my experience in C is so little.

Offline

Board footer