Archive for November, 2012

Code Camp ‘12–Developers. Developers. Developers!

The Macedonian .NET User Group is run by .NET enthusiasts and professionals in Macedonia, and their main goal is to provide a common channel of communication where .NET developers can find out about local .NET events, news, job opportunities, learning opportunities etc. They annually organize.a Code Camp event where speakers from Macedonia and other countries hold 1 hour sessions about the latest Microsoft technologies.

Last year (2011), for the first time ever, I was very excited to attend a Code Camp event. I started convincing my friends and colleagues to get their free ticket and join the ‘IT event of the year’ the day the registrations opened. Our presence at Code Camp ‘11 began a huge chain reaction in my (and some of my friends’) life, but more on that in another post.

This year, there were a total of 29 speakers, on 25 sessions, divided into 5 tracks. I was lucky enough to be one of the speakers (yay!) and in this post I will talk about my experience at Code Camp ‘12, starting from how I applied, got accepted, prepared the pres *fast forward* , the way back to Struga.

Call for Speakers

It all started with the MS Vizija, a Microsoft Technology Conference in Macedonia. Me and my teammates that created Aqua Guard, applied as speakers for ‘Porting a Windows Phone XNA game to Windows 8’, but we were unfortunately not accepted and were put in the ‘backup’ basket in case an accepted speaker decides not to present. To be honest, I was quite disappointed, especially because there wasn’t a single game development related presentation at the conference. The video game industry is a multi-billion dollar industry now. Macedonia has the talent for this, but the developers lack the support from the business sector. I believe such events should try to promote game development in general.

Nearly 2 months later, the Macedonian .NET User Group announced the Call for Speakers for Code Camp ‘12. I was pretty excited at first, but then I found out that only 4 tracks are planned, and there won’t be a Student track (there was a student track on Code Camp ‘11). This meant that we would be competing with MVPs and other experienced professionals to be accepted.

Judging from last year’s event where there was one Game Development talk that had over 150 attendees, I believed that our topic would be attractive enough to be accepted and I started convincing Rahim Islamoski to be my co-speaker for “Game Development on Windows 8 Using MonoGame’. We sent our application one day before the deadline.

Before the final results (accepted presentations) were out, we found out that there was another game development related talk – a professional team working on a serious 3D game for over 2 years now called Excubitor (looks pretty good, check them out at Because, game development is not that popular in Macedonia, we thought only 1 game dev related presentation would be accepted and it would most likely be a team of professionals and not us. Fortunately, we were wrong. Both our and the presentation by Tesseract Games were accepted!

Purple Track is Born

As I mentioned before, initially, there were only 4 tracks. But, because many students applied, the organizers decided to allow one more track only if the students take care of the organization for that track (projector, microphones, speakers, amplifiers etc.) Some Microsoft Student Partners from Skopje accepted this challenge and Purple track was born.

Sadly, because we are also students, we also had to be in the purple track which was in a smaller venue. But, we were hoping that the MSPs will deliver and get the rest of the equipment. Unfortunately, this did not happen and we only had a projector and possibility to be on the live stream by recording voice through our laptop mic. Still, thanks to the volunteers that helped in creating a new track. It was much better than last year’s student track.

Preparing the Presentation

We are beginners. We (my team) only have 1 complete game that we published in the last year, and now we are working on our second game. Therefore, our presentation shouldn’t be something very complex. We expected our audience to have little or no experience with game development at all, so our presentation should show how easy it is to set up your environment and start developing. Also, XNA is a great framework for beginners, and MonoGame is an open source port of XNA mainly developed to port current XNA games to other platforms (iOS, Android, Windows 8 etc.), so in order to promote MonoGame to non-experienced audience, the best thing to do is show how easy the development is.

The first thing we did with Rahim was to talk about how should we divide our roles. After a small discussion, we decided that he takes the role of presenter (talk about XNA, MonoGame etc.) and I will write our demo sample from scratch. The presentation should not be more than 1  hour, so each of us had 25 minutes + 10 minutes for questions.

Before creating the presentation, I started thinking about the demo. Usually, in such introductory presentations, a bouncing ball demo is created. I did not want to do this because it is pretty boring and if I was in the audience I would be very disappointed. I have never worked on a side-scrolling platformer before so I started thinking if I could come up with some interesting demo. I first defined what I wanted the demo to include:

  • Drawing sprites
  • User input
  • Collision detection
  • Sprite sheet animation
  • Sound effects

I found an interesting Iron Man sprite sheet and I decided to use it for the ‘player’. Jumping is the simplest thing to implement so I started thinking about what should the player jump over. While browsing for ‘enemies’ I found this bull sprite sheet which seemed perfect to demonstrate animations. Add collision detection and sound effects to that and we have a simple game. Fun fact: The idea is not stolen from Real Steel. (great movie, check it out) Fun fact #2: I watched the movie right after I finished coding the demo with this expression on my face when I saw the first scenes.

After I finished creating the demo, we created our PowerPoint presentation for the session. You can check it out here. Later we decided to also show Sparrow, our WOWZAPP Hackathon game, at the end of the presentation (you can read about my WOWZAPP experience here).

I decided to measure the time it takes to write the full demo one day before the event. This was a terrible mistake. Just for the first part, drawing sprites and explaining the environment took over 15 minutes (it should’ take at most 6 minutes). I started panicking that I won’t be able to prepare everything on time. After I managed to shrink the time it took to create the full demo for each part, it still was over 25 minutes. To shrink it further, I decided to hide some repetitive things in #region tags. This included the lines for loading content, creating rectangles for simple collision detection and the declaration of the variables.

I went to bed around midnight and Rahim should’ve arrived at my house at 04:30am (the event is in Skopje, 180km away, remember?)

Code Camp ‘12

4 hours of sleep is clearly more than enough for such a big day… NOT!

We arrived 30 minutes before the start of the event and immediately grabbed our awesome speaker/organizer-only jackets and badges. After I changed, I went to check our venue out and set up my laptop for live streaming. Sofre Garevski, the volunteer for tech support, was pretty helpful and solved the problems that my Windows Phone emulator was causing when picking an IP address for the LAN network to make the live stream work.

We were second on the agenda, so we first decided to go to the other game dev session. They also had two presenters. Their presentation was good, sadly they did not show any source code, but it was interesting to see how they progressed during the last two years prototype –> alpha version.

The clock hit 10:45 and with Rahim we went to our venue. While I was setting up my computer, people started coming in. Within minutes all the seats were taken, and I was pretty surprised to see that more people were coming. The live stream had problems and there was no audio on the stream. I should have known better and set up a screen recorder locally. Here is a picture shortly after our presentation started:

Our presentation experience from our student tech club SITE really helped. I was feeling tired, but I was confident that everything would be fine. Rahim did a great job with the first part of the presentation. Then it was my turn with the demos.

Live coding is not as easy as it seems. It requires great multitasking skills because while you write code you need to explain what you are doing at the same time. Nevertheless, my live coding was much better when compared to my first time for a presentation for SITE. The only problem I had was during the second demo when an ‘Exception’ was hit, but it wasn’t something big, I managed to quickly fix it. The presentation ended with a few questions and we managed to get 4 applauses during the whole presentation which was pretty satisfying. Here are some more shots:

After Our Presentation

After our presentation, I went to three others. The event organization was great. There was free food, drinks and snacks for all participants. Huge number of sponsors that gave a lot of vouchers, t-shirts, and there even was a HTC 8X phone prize for a random participant that completed a survey by one of the sponsors. I would also want to thank the organizers for letting us leave early because we had to travel back to Struga, so we did not have to carry chairs and desks ;). Kudos to Rahim for a perfect drive home with just 3 hours of sleep in the last 24 hours.

Epic 48 Hours at WOWZAPP 2012 Macedonia

WOWZAPP 2012 was a worldwide hackathon where developers all around the world got together in specified places and developed Windows 8, Windows Phone 8 and Windows Azure apps. Thanks to Microsoft Macedonia, we also had the chance to participate in the first hackathon to ever be organized in Macedonia. Macedonia hosted one of the best WOWZAPP events with over 200 prizes for the participants. I would also like to thank the awesome sponsors like Domino’s Pizza, Neotel and Seavus Education and Development Center for not leaving us hungry or without internet connection. Domino’s Pizza for lunch and dinner for two days? Hell yeah!

My team created a 2D top-down shooter game that won ‘Awesome Windows Phone 8 Application’ and ‘Best Hackathon Application’. I also won the ‘Perpetum Coder’ prize for being crazy enough to spend the most time coding at the event. In this post, I will detail the epic journey where we started from zilch, and ended up going home with 2 Windows RT tablets.

Before the event

The hackathon was announced around the beginning of October so there was plenty of time to prepare the tools and experiment with them until the event started. From the start, I was sure that I wanted to create a game during the hackathon, but the main problem was finding a designer. Unfortunately, two of my teammates, including the designer, left the team to pursue other goals in life (get a job, concentrate on academic work etc.). Infinite Loop was now left with two programmers, me and Rahim Islamoski. Two weeks before the hackathon, Abdullah Alioski, agreed on joining the team and taking care of the sprite work that we would need for our game.

We decided that we will make a Windows 8 game with MonoGame. MonoGame is an open-source XNA port that works on many platforms, including Android and iOS. While Rahim worked on porting the Game State Management sample to MonoGame, I was working on a simple shooter prototype to refresh my XNA memory, because I hadn’t done any game development during the summer. I ended up with the prototype shown on the picture below within 4 hours, and Rahim managed to port the Game State Management within a day which solved a huge problem, menu transitions and tombstoning.

What does a black hole and my drawing skills have in common? They both suck.

After creating this prototype, we stopped working on the project until the hackathon. Where is the fun in attending a hackathon with a complete app or game?

Few days before the event I came across an interesting book – ‘Game Jam Survival Guide’ by Christer Kaitila. It was a fun read, and most of the things mentioned there happened to our team. If you plan to attend a 24 or 48 hour hackathon/gamejam/appathon, give it a read.

Two days before the hackathon, the organizers announced that two Windows RT tablets will be awarded at the event. This is where everything changed for us, the stakes were very high now. It wasn’t just fame, there was fortune as well. I created a Trello board and invited Rahim and Abdullah so we can finalize the features we planned to have in our playable demo for the event.Offtopic, Trello is a great, free web based tool for organizing your projects. Check it out at . Once we finalized the outline of the game, we were ready for the event. We really needed a tablet for our future game/app development.

Hours 0-12

We were so excited while on the road to Skopje that the three hour ride felt like 30 minutes. We reached our destination about 1 hour before kickoff. We set up our computer equipment and started counting down to the start.  15 minutes before kickoff the venue was almost full.

The event hadn’t started yet and we already were getting cool badges and stickers.


18:00 local time, the event kicked off with the first presentation by Dejan Dimitrovski, Microsoft Technical Evangelist. After putting the ground rules, all the teams got their first task, the marshmallow challenge. Out of 15 teams, only a few managed to build a tower from the provided materials. My team shared the, lowest tower height prize with several other teams, 0.00cm. After this challenge, everyone started wondering, ‘When are we going to start coding?’. That is when the first batch of Domino’s Pizzas arrived and the previous question was gone until we filled our stomachs with delicious pizza awesomeness.

After reducing our hunger level to zero, it was time to start doing the thing that people at a hackathon are supposed to do, develop apps and games. After seeing that the organizers brought a couple of Windows Phone 8 devices (the HTC 8X and 8S are gorgeous pieces of hardware), we immediately modified our plans. We decided to also create our game for Windows Phone. I started working on my first prototype while Rahim set up XNA and started working on the Game State Management for Windows Phone. During this time, Abdullah started working on the aircraft sprites and the background textures.

Few hours passed and at 23:30 we had our first prototype running on both Windows 8 and Windows Phone 8 with temporary sprites.

My code was a total mess that only I could understand. But, on events like these, the final product matters and not the code behind. Luckily, MonoGame and XNA use the same namespaces, class names and method names. Rahim did not have to spend too much time modifying or analyzing my code. I’m sure I would’ve spent the whole event explaining the code to him and end up with a crappy prototype if I had to explain how everything worked. The game logic was the same on both platforms, so Rahim started working on the input for the Windows Phone. We decided that using touch input would not be the best choice, so he started working on accelerometer input to navigate the player aircraft on the screen. During this time, I was tuning the Enemy superclass to make it easier for me to create various enemy types.


Around 5:20, zombie mode started kicking in. My concentration was slowly decreasing, but I decided to not drink any coffee or energy drinks. I hadn’t used coffee or energy drinks to stay awake until now, I wasn’t planning on changing that. Finally, after exactly 12 hours from kickoff we ended up with the following screenshot:

Hours 12-24

The organizers appeared in the morning with new prizes and breakfast. I unlocked my first Wowzapp achievement at 7:35.

After the quality breakfast, it was time to continue working on the game. Since we had not slept for over 24 hours now, our concentration was almost nonexistent. We spent this time to do simple things like animating the afterburners of the planes, fixing minor enemy aircraft bugs and the projectile placement on the player aircraft. I also wrote some randomization code for the background element to make the game more appealing. Moving the clouds and background elements immediately increased the quality of the game. With such minor changes, the game was much more exciting now. Abdullah started working on menu screens and buttons because he was extremely tired. We left the final power up animations for the last 12 hours, first we had to get some sleep.


In the afternoon, there was a fun ZAPP activity (the activities that did not involve developing apps were called ZAPP activities) where each team got in front of the others and created a short story based on a given image. After this activity, the organizers announced that there will be an app showcase around 19:00.

This is the part where I did a terrible mistake. I decided to work on implementing new weapons for the player. You shouldn’t do something like this when you are uber tired. The mistake was even bigger because I started thinking about writing more flexible code by using inheritance and what not so I can have some reusable code at my disposal. After the first hour spent on this, I removed everything I had and started over, forgetting everything about OOP principles, and spent another hour debugging the new weapon that I added. Even worse than this, Rahim was also having trouble tracking a bug in the menus and he also spent a lot of time until he finally fixed it. This was a huge warning sign –> “Get some damn sleep!”

At the end of the second 12 hours, we were ready to present our progress on our game to all the other teams.

After the presentation, many other participants congratulated us for doing a great job on the game. Many people liked what we showed on the projector. This boosted our morale that we needed for the upcoming 24 hours.

Hours 24-36

Now, it was definitely time to get some sleep. Abdullah’s hands started shaking, my brain was going nuts, and Rahim’s back was killing him. We had to miss some cool ZAPP activities like Pictionary and some Kinect action, but hey, 2 Windows RT tablets are at stake here. We went to Bojan Veljanovski’s apartment (kudos for the invitation mate) that was about 5 minutes from the hackathon venue. We decided to sleep for 6 hours and then carry on with development until the end of the event without more sleep. That did not turn out so well because I and Rahim ended up with 1 hour of sleep due to excitement. Luckily Abdullah slept about 3 hours, because he was the one that needed to drive us 180km back home after the event ended. I couldn’t help but keep thinking on how to complete the prototype in the next few hours before the final app showcase that was at 14:00 Sunday. We had 12 hours until then. Here is a list of what I needed to implement:

  1. Weapons for enemy aircraft
  2. Power up system
  3. Sounds and music
  4. Bonus: Make the enemies move sideways/diagonally on screen instead of disappearing at the bottom of the screen.

When we got back to the event venue, I was feeling really fresh, like I had slept for 8 hours. I started with the weapons for the enemies. I already had a shooting logic for the player so I used 90% of the same code. I had to add some randomization code to determine the time when an enemy fired. At this time, Abdullah kept giving me new sprites (power ups, UI icons, animated barrier etc.) so I kept going back and forth with the tasks just so he can see if it looks good in-game.

Next it was time for the power ups which was quite simple to implement. First we added static icons for them, but Abdullah decided it will be better if we animated them (scale up and down until player picks it up). When this was done, it was time to change the annoying ‘Fire’ sound I had used for the weapons. I feel lucky for not getting punched by some other participant during the test runs of the game because it was damn irritating. We did not have a sound engineer in the team, so I had to use some sound generator to quickly create some sounds. I used SFXR, a free 8-bit sound generator. Rahim was taking care of the music, and that is when we noticed that MonoGame still does not support the Song class, so we did not bother in putting music on the Windows 8 version of the game. When we entered the final 12 hours, we only had small tasks to complete and some overall polishing to do.

Hours 36-48

When I looked at the clock, it was already 9:00 and breakfast had arrived. I hadn’t moved from my chair for 5 straight hours. Time passes fast when you don’t encounter any major bugs or get stuck somewhere. I implemented the bonus feature mentioned above, but after Hajan Selmani, mentor at the event, play tested the game, he didn’t like it that much and suggested we change it back the way it was. We listened to the feedback and changed it back (apparently this move was rewarded by extra points for listening to user feedback when our app was judged).


Around 12:00, I was droopy again and I couldn’t look at code anymore. I decided to do some test runs, fix some minor animation drawing bugs on screen and around 13:00 we finished working on our game. We started counting down to the final app showcase that was going to take place in front of all the mentors (judges).

There were a total of 15 teams, which meant 15 apps. I was really surprised to see all the cool apps the other teams had developed. The judges definitely had hard choices to make when choosing the winner.

Our presentation went quite well. We had the final version installed on the Windows Phone devices, and that made us the only team with a fully working demo that was given to the judges to test. One of the best choices we did at the event was to develop for two platforms at the same time, Windows 8 and Windows Phone.

The presentations ended around 16:00 and now it was time to wait for the final results. The judges went to a different room to analyze all the apps and choose the winners. Many participants started congratulating us for winning the event, but I really liked what some of the other teams had made and I couldn’t say for sure that we won.

By the time the results came, I kept having frequent blackouts and I had almost no peripheral vision due to being awake for such a long time. The others where doing the usual gangnam style dance. They first started giving the minor prizes, and that is when I won the ‘Perpetum Coder’ prize for being the longest coder at the event. After getting the prize I realized I had coded for over 35 hours.

Next, it was time for the serious awards. The first one was ‘Awesome Windows Phone Application’ which we won. Things looked good, we had a chance to win the 1st prize. But right after this, another team won the “Best Hackathon Game’ award, and this is when I thought we will not be the winners of the event. The folks that created a point and click adventure game deserved to win the event as much as we did. The ‘Awesome Windows 8 Application’ was won by an app for journalists created by Bojan Veljanovski, Jasna Trengoska (former Infinite Loop designer) and  William Asiama Nyako. Finally, it was time to announce the 1st prize. One team would win 2 Windows RT tablets for their effort at the Wowzapp 2012 event. While announcing Dejan Dimitrovski kept looking back and forth to the teams that won the other major awards. While thinking about the game and whether we had messed something up, I kept thinking that we won’t be the winners. And then, I heard Dejan say “Sparrow!”

Hello world!

It is finally time to stop slacking and do something valuable with my free time. On this blog I plan to talk about my software development projects, the events that I attend, and well everything else that I find interesting. I plan to mostly write in English, but a post in Macedonian may sneak from time to time. Thanks for reading. You can read more about me on the About page.