ImaginationOverflow

The knowings and experiences of a group of developers.

MonoGame for 2D

After a long break of developing on personal projects, due to laziness and a busy schedule (mostly laziness), I decided to take on a new project, I will recreate a game from my childhood! I don’t know the name of the game, I played it at coffee shops (on touch enabled arcades), but I do know how it is supposed to be played:

  • There is a single-player and a multi-player mode;
  • One wall of blocks will come from each player side and advance until it reaches the end, or the wall of the other player, at which point you lose;
  • You can remove blocks, by touching them, if they are adjacent to two or more blocks of the same color/type;
  • The game has no ending, the goal is to score as much points as you can.

With this basic premise for the game in mind I started developing the game. It wasn’t to long until I ran into the first bump in the road, but that was to be expected, the only games I managed to finish was a cheap version of the “The Hangman” and “Pacman” (in 3D!). So with no experience in developing games I started working on a little engine for my game, on top of MonoGame.

Read more of this post

Advertisements

Commencing ImagineCup, Baby-Steps

The ProgrammaticallySpeaking team is going for ImagineCup, we decided to finally start doing something that will enrich not only our CV but also our knowledge.

ImagineCup is a competition where we must help solve the millennium goals in different categories, which in our case will be Software Design. You can get more information here.

The project name is GiveGraph but I will not explain the idea as we intend to keep it a secret for a while, maybe until it is shown at the portuguese finals if we make it that far.

We already started deciding technologies and established what the project will really be about, and the work for the next week is to make a working login system and a front page. Which will lead to start working on database modelling, web app theme and if we manage to get a free hosting by Microsoft for our project to give it some publicity perhaps.

Hoping for the best and to have some fun :).

Self-Commented Code

“Self-Commented” code, that has to be the best expression I have ever heard regarding programmation.

I have to admit I’m not the best fan of comments, I kinda feel that when programming in java the javadoc infrastructure is useful and I try to do the best I can for my code but I don’t like to explain what a method does. Well today during class I smiled as I heard that expression and I love it now, to make code that one simply by reading knows exactly what it does, without further explanation, is just awesome.

Read more of this post

Anti Copy-Paste Movement

This post is directed at new programmers, something that I felt like sharing as I still see friends and colleagues doing this mistake, it hurts to watch.

I’ve started coding long ago, using my old friend HTML, and I used to get pretty excited by having many lines of code, huge and complex algorithms, that no one could understand, and by the speed of what I done all that. Back then copy-paste was my biggest, and only, friend as it would speed up my work alot, or so I thought, I had no idea what intellisense was back then, not sure it even existed.

But this as all changed, the last 2 years were a infinite loop of learning how copy-paste is my worst enemy. Maybe you’re also like I was and find copy-paste, maybe along with intellisense, a good tool to speed up your programming speed but let me explain how that is just wrong.

Every time I have to copy-paste I stop, take a deep breath, and I try to figure out why I should use the copy-paste. Most of the time, maybe all of it, is the need of using that pretty piece of code that you just made and is needed elsewhere, and for that there is an easy solution, if it’s more than 3 lines long, in my opinion it is worth of it’s own function. Yes, don’t be afraid of promoting that little code to a function. If it happens to have a bug and you copied it to 3 different places you will have to go to them all and correct it, and you may forgot that you copied to a 4th place. If it’s a function it is so easy to fix it, just correct that function and it all works well.

People used to tell me this before, like I’m telling you now, and I always thought they just were being dramatic, but now that I make bigger and more complex applications I often deal with bugs on functions that if were not made a function I would spend more time copying the correct code everywhere than to actually fix the bug.

No copy-paste, along with many tests, saves you from big headaches when trying to deploy your application.

%d bloggers like this: