Category Archives: Comments

SDL, SDL, SDL

Published by:

One of the things I' more excited about is SDL game programming.

Due to a college assignment, I'm creating a SDL-based game engine in C++ (here's the GitHub repo). That's for the Introduction to Game Development class, where at the end I should have two games and a game engine.

So, I'm browsing the games on the SDL official page, and found out some awesome examples on how to use the library. There's also several libraries based on SDL that does neat things, like network communicating and complete GUI functionalities.

It's awesome to program little games and find out the intricacies involved. I plan to improve the engine and then make several small games with it (like another snake clone, possibly a tetris and the basic pong/arkanoid clones).

Adventures with Verilog

Published by:

Due to a college assignment, I'm currently learning Verilog. I've never heard of it before and the more I dig up, the more I find it interesting.

Verilog is basically a "programming" language that describes hardware. Technically, it's called a hardware description language (HDL), because it doesn't make "programs" per se. It tells an electronic circuit how to behave.

That's a whole different paradigm. Programming languages (C, C++, Ruby), Markup languages (HTML, TeX) and now, Hardware description languages? If you're more interested on the varous different language types, check this out!.

Last semester I took a course on Digital Circuits, where the standard technique on designing circuits was:

  • Draw a state-machine block-like diagram.
  • Make the truth table, with state transitions for each flip-flop
  • Draw Karnaugh maps
  • Enjoy the optimized circuit
But for big projects this becomes too cumbersome. That's where Verilog shows it's worth.

We can command an electronic circuit on many different ways. The focus on Verilog are levels of abstraction.

On the Behavioral level, we kind of program algorithms that the circuit will do. Logical blocks are created, that do something (like adding two numbers) and we're not concerned on how the're physically implemented (what ports are used, etc).

Register-Transfer level of abstraction specifies communication between the registers. Data transferral on exact timing bounds; what will register x do when it receives data from y and such.

Finally, on the Gate Level we basically describe the logic circuit of the element (with AND/NOT/NOR/etc ports).

For more, do check this tutorial.

On the current course, I must implement some features on a MIPS-processor implementation (using Altera's DE2-70 FPGA for "simulation").

At the end of the semester, I'll have an Arkanoid-like game completely programmed using MIPS-Assembly and using Verilog-defined components (!). This blog'll be updated whenever I do something on it.

Look at this beauty!

nsnake on Debian/Ubuntu!

Published by:

Finally, nsnake’s on Debian (and, consequently, on Ubuntu)!

During the last few weeks I’ve been studying a lot on how to package programs for Debian (.deb). It’s incredibly difficult to start - the hardest part is to follow all the Debian Guidelines and clear lintian warnings. But as soon as you do your first packages, things start to fit in.

Here’s the nsnake page on Debian and the nsnake page on Ubuntu. Currently, you can only install it on Debian Unstable (Sid) and (on the upcoming) Ubuntu 13.10 (Saucy Salamander).

It’s simple as:

Besides packaging nsnake, I’ve adopted three packages that were already there, snake4, zatacka and xbomb. It kinda works like this - if someone finds any bug on Debian or the author releases a new version, it’s up to me fix everything up and repackage it.

They’re very interesting games, you should check 'em out!

My page on Debian is http://qa.debian.org/developer.php?login=alex.dantas92@gmail.com. It shows the packages I’ve worked on and their status.

Programming MIPS

Published by:

This semester I’m taking a class on college of Computer Organization and Architecture. So, besides learning the physical concepts behind computers in general, I have to program in Assembly.

This is the first time I’ve ever come into contact with this, and it’s very interesting! During my course, seniors would always scare freshmen with low-level concepts and the fear of Assembly programming.

I’m used to program in C, which is considered a "low-level language" by most people around me - who are used to Javascript/Python/etc. But nothing compares to Assembly. Man, we need to know the processor design and how instructions become binary!

I highly recommend to anyone interested in computing, getting to know at least the basics of any Assembly language. It sucks at the first days, but later it becomes very interesting.

Currently, I’m programing in Assembly of the MIPS architecture. I’m keeping all of my exercises on this little Git repository at GitHub. Check it out!

nSnake plans, web stuff and comments

Published by:

I must say I'm impressed! Just checked out the nSnake download statistics and there are roughly 30 downloads per week! Even now that it's been months since I've stopped commiting changes to it. I'll take that as a sign - I must keep working on it! There are some bugs to be fixed, features to be added and code to be improved.

I've been studying web-related stuff for a while (as stated on my previous post) but I've also been very confused. There are so many things I want to learn! For instance, a few days ago I started reading this awesome tutorial 'Advanced Bash Scripting Guide'. Suddenly these new script ideas just kept popping on my head and then I made some tests and stuff and when I realized, I lost the focus on my Javascript/jQuery courses... What do you do when there's too much stuff and little time for them?.

Of course, normally I wouldn't even have time for this. But unluckly my teachers are on strike! I'll enjoy this extra free time to work on my projects and learn stuff.
By the way, did you liked this new layout? I found the old blog appearance a bit cryptic and hard-to-read. I must've been out of my mind.

Lastly, if you have some time, do visit my wiki, Linkpedia! It's constantly refreshed with new links related to computer science and programming.

Javascript and Web Stuff Interest

Published by:

Hello there, it's been a while!
These weeks I've been busy as usual, but found something quite fun to do on my free time. Learn web stuff! Thanks to codecademy, I've learned some Javascript and advanced my skills on HTML/CSS. Also, there's some awesome PHP/AJAX/MySQL tutorials on tizag.com. With these (and c9's incredible online IDE) I've been playing with some pages and testing things on my domain.

Next month some of my classes will end, so I'm expecting a very productive break. Just a reminder, gotta improve nSnake, work on some web project (possibly joining several technologies such as Data Banks, Mobile and Facebook/Twitter API) and improve UNIX skills.

See you later!