Andrei Bârsan's BlogRamblings ranging from low-level reverse engineering to game development.
http://siegedog.com//
Tue, 10 Nov 2015 12:22:16 +0000Tue, 10 Nov 2015 12:22:16 +0000Jekyll v2.4.0Maven dependecies in Eclipse<p>Not having worked with Java on a large-scale project before, I had also
never touched Maven. (In this case, by large-scale project, I mean a project
with lots of dependencies and a more involved build process - I did write <a
title="Try eeet!" href="http://github.com/andreibarsan/Yeti">a rather
complex 3D renderer</a>, but it only had a handful of dependencies that
never changed and it was a traditional "hit f11 to run" application).</p>
<p><a title="Making your stack more streamlined since 2001"
href="https://maven.apache.org/">Apache Maven</a> is a tool used for, well,
a lot of things. It works with Java, C# and a bunch of other languages and
automagically manages your dependencies and build process. It's essentially
<a href="https://ant.apache.org">Ant's</a> bigger brother.</p>
<p>When looking to add an existing library as a dependency to a project, it's
very often to see it offered as a <b>maven artifact</b>. It would look
something like this:</p>
<pre>&lt;dependency&gt;
&lt;groupId&gt;com.ning&lt;/groupId&gt;
&lt;artifactId&gt;async-http-client&lt;/artifactId&gt;
&lt;version&gt;1.7.22&lt;/version&gt;
&lt;/dependency&gt;</pre>
<p>This can be a tad frustrating if you're in a hurry and you just want to
download a jar to add to your build path. You just want to keep working and
not have to deal with Maven. But worry not, Eclipse and I are here to help!
It's very easy to sort this out in only a few minutes!</p>
<p><!--more--></p>
<h1>Step 1: Converting your project to a Maven project</h1>
<p>This is a one-click deal in Eclipse. It's not even limited to Java projects!
I'm using the Kepler Scala IDE and it's working perfectly. <strong>Note: this
does NOT change your main project type. If it's a Java project, it STAYS
a Java project. If it's a Scala project, it STAYS a Scala
project. </strong>All this does is add another feature to the project. The
"Convert to..." phrasing in Eclipse is a bit confusing.</p>
<p><a href="attachments/step01.jpg"><img alt="Right click on menu -&gt;
Configure -&gt; Convert to Maven project" src="/attachments/step01.jpg"
/></a>
</p>
<p>
You will get a dialog asking you for some configuration settings, but you can
use the default ones for the time being. They can be edited at any time anyway.
Click <strong>Finished</strong>. A little "M" icon should have now popped up
next to your project icon. That's it! You can now start managing your
dependencies with Maven! Pretty cool, huh? Moreover, your old referenced
libraries (the traditional stuff on your build path) are still there! You can
keep them there, or add them as Maven dependencies so that everything is nice
and consistent. It's going to be very clear how to do that after you've read
this little tutorial. It might be a bit of extra work, but it will make things
much easier in the long run.</p>
<p>(Note that in obscure cases where you're using a custom run configuration to
run Scala apps - e.g. when using Akka - special care needs to be taken and
the Scala Library and Scala Compiler need to be manually added to the
Bootstrap entries in the classpath, within the run configuration management
window. You get weird errors otherwise. But again, this is just a corner-case
I've stumbled upon while working with Maven and Scala.)</p>
<h1>Step 2: Adding your dependency</h1>
<p>Notice that converting your project to a Maven project has generated a file
called <em>pom.xml</em>. This is the so-called <strong><a title="It's NOT
porn, it's pom. Jeez."
href="https://maven.apache.org/guides/introduction/introduction-to-the-pom.html"
target="_blank">Project Object Model</a> </strong>and contains all the
info required for Maven to build your project. We're just using Maven's
dependency management system at this point, so we don't need to configure the
build process. We're still using Eclipse's build system.</p>
<p>Double-click the pom file to bring up Eclipse's fancy Maven overview. Which
we don't need. Go to the tabs below and select 'pom.xml' to view the raw
file.</p>
<p><a
href="/attachments/step02.jpg"><img
alt="Adding your dependency."
src="/attachments/step02.jpg" /></a></p>
<p>Just paste as many "dependency" tags as you want inside the "dependencies"
tag and Maven will automatically fetch them for you (Yes, automatically. You
don't even need to click anything. It will happen as soon as pom.xml gets
saved!) and add them to the Maven Dependencies. You will now be able to
reference the dependency in your code and use it like any library that's on
the build path.</p>
<p>Congratulations, you're now using Maven for dependency management! Do note
that Maven can do much, much more than this! Just take a look over <a
title="Each more productive than the last!"
href="https://maven.apache.org/maven-features.html" target="_blank">the
list of Maven's features</a>.</p>
Thu, 12 Dec 2013 19:13:06 +0000http://siegedog.com//2013/12/12/maven-dependencies-in-eclipse/
http://siegedog.com//2013/12/12/maven-dependencies-in-eclipse/antapacheapache mavendependenciesdependencyEclipsehowtoJavaMavenprogrammingtutorialtutorialsjavaprogrammingscalatutorialsHidden Gems of Online Learning: x86<p>Every now and then, you stumble across amazing learning resources on the
web. Some great, extensive tutorials which lie on websites that somehow look
deserted. You take a look - it's not spam, the tutorials are there, for free,
ready to enlighten you. The only ominous thing about them is the fact that it
seems that nobody is using that site. There might be a comment section
inhabited by only a couple of lonely comments. The site itself might look
like it's ancient, but a closer look reveals posts are all very rich, just
sitting there, waiting for someone to learn what they have to teach.</p>
<p>I got this feeling when I stumbled upon <a href="http://opensecuritytraining.info/">Open Security Training</a>.</p>
<p>The site is extremely simple but filled with amazing content at the same
time. I was amazed when I found the wealth of information on that website.
Everything is free, licensed under Creative-Commons Share Alike license. And
I don't mean quick 5 minute how-tos or 15 minute screencasts. These
are <strong>multiple hour-long, in depth courses, with slides, code samples
and additional resources.</strong> Grab the slides and click the video
links. You find yourself at the beginning of a 10 hour-long playlist on, say,
<a title="Give it a try! Money-back guarantee! (iz funny because iz free)"
href="http://opensecuritytraining.info/IntroX86.html"
target="_blank">x86</a>. This is <em>just the introduction</em>. You can
continue with the <a title="More than movs, pushes 'n' pops"
href="http://opensecuritytraining.info/IntermediateX86.html"
target="_blank">intermediate x86 course</a>, <a title="Raspberry Pi,
anyone?" href="http://opensecuritytraining.info/IntroARM.html"
target="_blank">an introduction to ARM</a> or an <a
href="http://opensecuritytraining.info/Exploits1.html"
target="_blank">introduction to software exploits</a>. All of them - 6-10
hours long.</p>
<p><span style="line-height: 1.714285714; font-size: 1rem;">There are some
other great, well-known sites such as Coursera, Udacity and Khan Academy
which are also amazing resources. They are also quite popular, so I won't
be talking about them in much detail here, since they don't need the extra
advertisement. They are gems, that's for sure, just not hidden
ones.</span></p> <p>I found myself addicted to Xeno's lectures, and now I'm
already cruising through the intermediate x86 course, frantically taking
notes, looking at slides and writing x86 assembly code.</p> <p>The only thing
that I believed was a bit of a problem was the absence of homework
assignments in the form of programming challenges. I did go through all of
the examples, re-wrote them, altered them (e.g. managed to successfully
overflow my buffers and hijack my own program, which was a lot of fun), but
some more concrete assignments would have been nice.</p> <p>This was only
a problem while going through the main body of the course (the introductory
one), since at the very end, the students (myself included) were presented
with Carnegie Mellon's <a title="Open to everyone. All that's needed is the
will to learn." href="http://csapp.cs.cmu.edu/public/labs.html"
target="_blank">binary bomb</a>. And this more than compensated for
everything else! I will probably be talking about the bomb (and its numerous
variations) in another article, but what this "bomb" basically is, is an
executable that's provided with no source (and only a handful of debug
symbols) which expects some sort of text input. You give it the right input,
and it's defused. Feed it the wrong one and it blows up. And the only way to
figure out what input it wants, is to run it with a debugger attached and
simply step trough the assembly code, tearing it apart and, essentially,
reverse-engineering it. This has been, by far, the best programming challenge
I've ever done when it comes to ASM. I've had one A-HA moment after the
other, constantly digging through the instructions and figuring out what
makes the bomb tick. It was very, very fun. From now on, this will be the
number one thing I will recommend to absolutely anyone wishing to really
learn x86.</p> <p><a title="Go, go, go, go!"
href="http://opensecuritytraining.info/" target="_blank">The material is
there, up for grabs! What are you waiting for?</a></p>
Sun, 10 Nov 2013 21:25:07 +0000http://siegedog.com//2013/11/10/hidden-gems-of-online-learning-x86/
http://siegedog.com//2013/11/10/hidden-gems-of-online-learning-x86/architectureassemblyintellow-levelprogrammingresourcestutorialtutorialsx86hidden gemsprogrammingresourcestutorialsx86I don't need no back-end!<p>So <a href="http://www.windowsazure.com/en-us/" target="_blank">Windows
Azure</a> has recently launched something called <a title="It's free to
try, woo!"
href="http://www.windowsazure.com/en-us/pricing/details/mobile-services/"
target="_blank">Mobile Services</a>, which is what they call
<strong>Backend-as-a-Service</strong> (BaaS). This is, in essence, one level
of abstraction <em>above</em> PaaS (Platform as a Service) and two levels
above IaaS, which is Infrastructure as a Service. BaaS is pretty cool. Like,
really,<strong> really</strong> cool. And this article will consist of me
explaining exactly why BaaS is such a cool thing.</p>
<p>But in order to fully explain that, we need to go back and think about what
advantages PaaS offers when compared to its "lower-level" sibling, IaaS.</p>
<p>So, first off, given this context, what do <strong>infrastructure</strong>
and <strong>platform </strong>actually <em>mean</em>?</p>
<!--more-->
<h1>Infrastructure as a service (IaaS)</h1>
<p>Well, before acronyms like PaaS and buzzwords like <em>scalable </em>and
<em>the cloud</em> were a thing, people would just buy virtual machines from
service providers who owned server farms (or just shared hosting for tiny
websites; and since shared hosting isn't really appropriate for any decent
consumer-oriented website (e.g. a web-app with over 1000 users or so), I'll
skip it in this article). It was as simple as:</p>
<p>"So, I want to host this website on the internet, so I need a computer for
it to run on so that people can access it."</p>
<p>"No problem - here's a (virtual) machine, this is its IP, this is its domain
name, here are the login data, give me like 20$ a month and you can do
whatever you want with it."</p>
<p>So the user would buy this, <a title="Or telnet if you're into that sort of
kinky stuff" href="http://en.wikipedia.org/wiki/Secure_Shell"
target="_blank">SSH</a> into the thing and set everything up (such as
a database and a PHP runtime, a Ruby and Rails stack, or something like
that). Then he would <a title="well, we've all been at that point where
'deploy' essentially just mean copying over everything over FTP and hoping
nothing would break, haven't we?"
href="https://github.com/capistrano/capistrano/wiki">deploy</a> the website
and it would work. Well, that sounds simple enough, right? <a title="uhm..
EVERYTHING?" href="http://en.wikipedia.org/wiki/Everything"
target="_blank">What could possibly go wrong?</a></p>
<p>The real answer isn't that far, really. You had to make sure that not only
your own app is running well and is secure, but that the environment it's
running in is also patched up and well configured. And for lots of companies
and web developers with limited time and resources, that's a huge thing.
Hours and hours can get wasted figuring out why your app is not working and
trying to pinpoint why the OS, for instance, keeps killing your MySQL daemon.
This prevents developers from actively working on their product - which is,
you know, <em>what they're actually supposed to be doing, anyway</em>, and
they're being kept busy trying to figure out why the hosting environment
hates them.</p>
<p>Yes, this is Infrastructure as a Service (IaaS). You pay a monthly fee, you
get a machine, you do what you want with it. You don't even have to host
a website if you don't want to. You can use it for backups (even though it's
quite a silly, expensive alternative to most of the available backup
services), a remote emergency <a href="http://nethack.org/">nethack</a> box,
a Minecraft server, a Bitcoin farm (well, again, this is not quite ideal but
it's just an example), a personal e-mail server, a VPN host and pretty much
anything else you can think of.</p>
<p>Of course, you can do fancier web-related stuff with it, you <strong>can
</strong>scale, you <strong>can</strong> customize everything to run blazingly
fast, create your own dedicated database machines, do load balancing etc. But
it's a bit tricky to get up and running, especially for smaller companies. And
in the past, when you never expected more than a few hundred simultaneous
users, this sufficed. But nowadays, if you end up being successful enough,
things can get really complicated really fast.</p>
<h1>Platform as a service (PaaS)</h1>
<p>Platform as a service (PaaS), on the other hand, abstracts from all of that.
You no longer buy machines with particular specs that you need to configure
on your own. You buy <em>platform features.</em> Let's take a look at how <a
href="https://www.heroku.com/">Heroku</a>, a well known PaaS provider, does
it...</p>
<p>First off, you never buy individual (virtual) machines. They sell individual
compute units called "Dynos". "But wait!", you might ask, "Aren't those just
differently marketed VMs, just like in IaaS? Aren't they just being clever
and re-packaging their product only to sell the same thing at a higher
price?".</p>
<p>Yes and no. Overall, using something like Heroku or Windows Azure might end
up costing a little bit more per month (I'm talking about small-medium
companies here, though larger ones are also supported by the "heavyweight"
plans; individual users who like to experiment and try things out will be
happy to know that both of these providers also have free plans), but in the
end, it usually pays off. <a href="http://www.codinghorror.com/blog/">Jeff
Atwood</a> said it better than I could have ever said it myself - <a
href="http://www.codinghorror.com/blog/2008/12/hardware-is-cheap-programmers-are-expensive.html">"Hardware
is cheap, programmers are expensive".</a></p>
<p>But going back to Dynos (or compute units, or whatever you like to call
them) - the main idea is that they work transparently. You just deploy your
app, and tell it how many dynos to run on and you're set. Yes, lots of PaaS
providers have their own API, but once you get past that initial port of your
storage code (if you're not just writing the app directly for that platform,
of course), you're all set. Oh and by the way, notice I said "deploy"
(*cough* actual deployment, not manually copying stuff over FTP). You
<em>deploy</em> using Git, for instance, by using the platform's API. You use
a tiny app on your machine to tell it what to do, but you never have to
actually SSH into the remote machine and kick things off from there (it's not
even possible, anyway). You code, commit, deploy and it's there. Maybe set up
some scripts to make sure the app's settings are right and perhaps update
your DB schema when needed, but that's pretty much it. No need to manually
patch your OS and runtime(s), and manage versions and configuration files
that break things. It's not your problem any more. You are now free to
actually focus on your app.</p>
<p>You code and code and commit and code, and when you're done and want to
deploy, you do it fast and simple, and your dynos take the load off your
shoulders.</p>
<p>Again, it is up to the company itself to decide, based on their own needs,
what actually suits them better - IaaS or PaaS. Or, maybe, BaaS, since that's
pretty cool. Oh, right. I was about to explain why it was cool.</p>
<p>So now that we've re-capped what's what, and how PaaS differs from IaaS,
let's take a look at the new kid on the block: BaaS.</p>
<h1>Backend as a service (BaaS)</h1>
<p>In <strong>Backend as a Service</strong>, you buy (or register for) the
whole back-end. It manages all the <a title="Aw, CRUD!"
href="http://en.wikipedia.org/wiki/CRUD">CRUD</a> operations, is able to do
things like authentication automagically and watches over the integrity of
your data. You can obviously customize this behavior with your own code, but
it's surprising how little custom code is actually needed for "traditional"
CRUD apps. By traditional, I generally mean data-centric applications
- blogs, datastores for mobile apps (hence Azure's "Mobile Services" name for
its BaaS), CMS-y stuff and so on. Obviously if you want to write a real-time
browser-based game this isn't your first pick (though there's still potential
there, I've yet to investigate this side of BaaS).</p>
<p>Just for simplicity's sake, for the rest of this article, I will be talking
about Windows Azure's BaaS provider (<a
href="http://www.windowsazure.com/en-us/pricing/details/mobile-services/">Azure
Mobile Services</a>) in particular, since that's the one I'm currently most
acquainted with. This article isn't meant to be a comparison of multiple
services or a "Top 5 BaaS providers of 2013" thing. It's the principle that
counts.</p>
<p>In a nutshell, BaaS transparently takes care of your backend, and only lends
you a few hooks around the CRUD operations so that you can perform additional
checks, queries and validation. It supports lightweight cron jobs, push
notifications and both fixed and dynamic schemas (though it's still a SQL
server at this point!) and authentication via OAuth. Microsoft's solution
runs in a Node.js environment so everything is JavaScript. You can deploy
everything using git very neatly.</p>
<p>Just to be clear about this - this is a platform for delivering
a <strong>web service</strong>. You cannot serve websites from here. A good
alternative is to host your website on a cheap host, but the logic and actual
back-end on Azure, and communicate using asynchronous HTTP. After all,
Azure's solution is even called "Mobile Services" - it's designed to provide
services to self-standing, pre-existing applications, but web apps are also
a perfectly valid contender.</p>
<p>Like I mentioned before, it's great for apps that mostly just rely on CRUD
operations server-side, but not if you want a lot of complex logic over
there. I believe some examples would clear this up rather nicely:</p>
<p>If I were to collect telemetry data from a videogame, I'd use this and
perform the visualizations in a JavaScript app (Oh, so <em>this </em>spike
pit is killing of 95% of the players causing them to uninstall the game in
frustration). If I were to implement an online messaging system, I'd use
this. If I wanted to manage a simple in-game persistence system (such as
automatically saving the game "in the cloud"), I'd use this. A forum could be
implemented rather nicely using this as well. And there are tons of other
examples out there. Truth be told, for the most part, a lot of the back-end
is just boilerplate code providing highly similar CRUD operations for a bunch
of things - which BaaS now conveniently handles for you.</p>
<p>But, of course, there are also counter-examples; things not suited for pure
BaaS:</p>
<p>I wouldn't implement an auction site using this system, even though it would
be completely possible in theory. I would also avoid implementing
a persistent browser-game where most of the logic is taking place
server-side. I would avoid implementing Twitter because, well, you kind of do
have to build your own infrastructure from scratch if you want to serve
*that* many users. Also any service that might have a simple structure but
would need more than just CRUD - such as image processing and big data
manipulation wouldn't go well with the current BaaS philosophy.</p>
<p>"But Scalabilityyyyyy!" I might head you cry out desperately at this point
"You are using SQL, how is that thing scalable?" Well, it <strong>is</strong>
currently limited to SQL, but there is work being done to enable support for
NoSQL technologies as well. However, the Azure back-end currently does
a surprisingly good job managing everything - especially since your SQL
server is actually <strong>replicated three times by default</strong>. For
most small and medium app developers (which are also the main target audience
for this service) this is more than enough.</p>
<h1>In Action</h1>
<p>Getting it up and running, and learning how to use Mobile Services is
actually really fast. Microsoft provides a wonderful getting started guide
that helps you set up a free account, the mobile service itself, as well as
the app: <a
href="http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-html/">http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-html/</a>.</p>
<p>The great thing about this is that a ton of technologies are supported - you
can be running Windows, Linux or OSX, it doesn't matter. Win8, Android, iOS
and HTML web applications are all supported, and the tutorials cover all of
these combinations.</p>
<p>So if you're interested in checking this out and you're not a Windows person
- worry not! Your familiar stack, as long as it's pretty mainstream (sorry
Scala + Lift people!), is supported!</p>
<h1>Closing Thoughts</h1>
<p>Although it's not a silver bullet, and does limit an application's
flexibility quite a bit, BaaS is just perfect for applications that don't
need complex server-side operations. And here, the threshold for "complex"
server-side logic is actually pretty high. If you just need a basic CRUD
back-end for an app - it can be set up in minutes. And that's really, really
quick. But you can also add Facebook, Live and Twitter authentication
seamlessly. Need a mailer? Done! Push notifications - there they are. And so
on. All deployed using git.</p>
<p>This service enables developers to quickly put together a robust back-end
for their app with minimal effort, and allows them to actually focus on what
matters - the design of the application and the user experience.</p>
<p>We can now create a little app and then set up its back-end in half an hour.
We've come quite a distance from SSH-ing into a VM and grepping the logs to
see why our mysqld isn't working, haven't we?</p>
Tue, 10 Sep 2013 18:10:47 +0000http://siegedog.com//2013/09/10/i-dont-need-no-back-end/
http://siegedog.com//2013/09/10/i-dont-need-no-back-end/AzureBaaSBack-EndCloudIaaSPaaSWebWeb Developmentweb developmentBGMS Week #1: Slow start<p>Well, here's my first update, with still not much to show. However, I've
managed to add some rudimentary libgdx particle system support, as well as
adding dynamically spawned enemies. I've also done some internal refactoring
to speed up future development.</p>
<p>BGMS stands for Beasts Grant me Strength, by the way.</p>
<p>An actual demo is hopefully on the way.</p>
Mon, 02 Sep 2013 04:56:25 +0000http://siegedog.com//2013/09/02/bgms-week-1-slow-start/
http://siegedog.com//2013/09/02/bgms-week-1-slow-start/BGMSGame DevelopmentLudum Darebgmsgame developmentjavaludum dareprogrammingLudum Dare: A Started Project is Better than no Project<p>So I attempted to take part in the latest <a title="Game dev jams are
intense" href="http://www.ludumdare.com/compo/">Ludum Dare</a> which took
place this weekend. I had even written <a
href="http://blog.siegedog.com/2013/08/ludum-dare-27-approaching-and-blog-woes/">an
article about the contest and the preparations I was undergoing</a> (or, at
the very least, planning), just a week before. Friday evening eventually
came, and the theme that was picked was <strong>10 seconds</strong>. I
decided not to do any actual coding in the first evening and get a lot of
sleep - which ended up costing me a lot, considering that I ended up being
busy Saturday morning and afternoon. This is what killed this project as a LD
entry.</p>
<p>However, I'm quite content with the idea that I came up with, and I feel
that it would be pretty fun to play once I get to implement all the content
I currently have in mind.</p>
<p>The Ludum Dare team has come up with an additional challenge, called <a
href="http://www.ludumdare.com/compo/2012/09/27/announcing-october-challenge-2012/"><em>The October Challenge</em></a>.
In order to complete it, one must complete
a game, publish it and earn $1 from it. That's it. It's the idea of finishing
a project and putting it out there on the market.</p>
<p>I will take on this challenge, but I will limit myself to the first two
goals. To just publish my game (for free!) on the Android Market, by the end
of October. Progress will obviously be tracked on this blog every Sunday.</p>
<p>Like stated before, the theme of this competition was "10 seconds". My
approach was to build an infinite running hack'n'slash/shoot'em'up game where
the player's abilities (and, as a consequence thereof, the gameplay style)
would change every ten seconds. Each "state" is associated with an animal
whose abilities the human character you're playing as takes on. The
<em>bear</em> aspect enables melee slashes that deal a lot of damage. The
<em>raven</em> has a weak attack but causes dead enemies to explode and
damage other, potentially causing satisfying chain reactions. The
<em>peacock</em> can deflect enemy attacks, but doesn't attack itself. These
are the main three animals I will implement, with the goal being to add way
more of them for the player to unlock, as they progress. Randomly cycling
through these should be tuned so that it keeps the game fresh and doesn't
frustrate, confuse or bore the player.</p>
<p>The end goal is to have the game feel really good, exciting and rewarding.
This kind of game relies on replayability. Flying numbers, combos, screen
shaking, upgrades, light effects, and all that <a title="Juice is like the
best. I like grape juice."
href="http://www.youtube.com/watch?v=Fy0aCDmgnxg">juice</a>.</p>
<p>Right now, I just handle the basic game states
- load/menu/startup/playing/dead/restart/quit. Some sort of progress tracking
and crude level generation is also in place, but that's pretty much it. This
is the current menu screen that greets the player upon startup.</p>
<p><a href="/attachments/bgms.jpg">
<img class="size-medium wp-image-27"
alt="A... humble beginning. Like, really humble."
src="attachments/bgms.jpg" /></a>
<!--No background or tiles yet.--></p>
<p>So, stay tuned for updates!</p>
Mon, 26 Aug 2013 05:48:06 +0000http://siegedog.com//2013/08/26/ludum-dare-a-started-project-is-better-than-no-project/
http://siegedog.com//2013/08/26/ludum-dare-a-started-project-is-better-than-no-project/BGMSGame DevelopmentLudum DareOctober Challengegame developmentludum dareLudum Dare 27 approaching and blog woes<h1>Ludum Dare</h1>
<p>Well, <a title="woo, game jams!"
href="http://www.ludumdare.com/compo/">Ludum Dare 27</a> is less than one
week away, but my preparations are still far from done. But that's OK - it's
part of the challenge after all.</p>
<p>If you haven't head of it, <a title="woo, game jams!"
href="http://www.ludumdare.com/compo/">Ludum Dare</a> is
a <strong>rapid-prototyping game development</strong> challenge, where the
participants (usually around 1000; Ludum Dare 26, which took place this
April, has over 2000 participants!) have <strong>48 hours</strong> at their
disposal to develop a game from scratch, based on a given theme. Well, "from
scratch", in this case refers to the content itself. You're not allowed to
use any pre-existing content, be it a public domain image or sound sample.
It's just against the rules. However, as far as frameworks, engines and
libraries are concerned, there are basically <em>no restrictions</em>, and
people use everything from their little C++ frameworks and Flash, to <a
title="go on, try it, it's easy to set up and won't bite!"
href="http://libgdx.badlogicgames.com/">libgdx</a> (which is what I use),
<a title="whoa" href="http://unity3d.com/">Unity 3D</a>, Construct, XNA and
other large frameworks and tool sets. And by the way, the name is pronounced
Loo-Doom Dah-Reh, since it comes from Latin and essentially means "To give
a game". Some people just pronounce it Loo-Doom Dare (dare, as in challenge),
which is also pretty cool.</p>
<p>You'd think it's a no-brainer to choose the
framework to use - just pick a really well-documented one a few weeks in
advance, mess around with it, and use it during Ludum Dare. Duh! But it's
just not that easy. It's sometimes easy to create a toy app in a framework
and immediately convince yourself that you know how to use it, only for Ludum
Dare to start and you to find yourself stuck trying to change some of the
framework's behavior to make some small detail in your game work. BAM!
- several valuable hours down the hatch.</p>
<!--more-->
<p>Some coders start from
scratch every time. <a href="http://notch.tumblr.com/">Notch</a>, the creator
of Minecraft, sometimes takes part in Ludum Dare, but every time he just
starts with the bare minimum - the Java standard library plus lwjgl
(LightWeight Java Game Library), which is only a thin OpenGL wrapper for
Java. He then proceed to write the sprite loading, physics, rendering logic
and <strong>everything from scratch</strong>. <a title="whoa^2"
href="http://www.youtube.com/watch?v=KcfFJ6pNEZk">In LD21 he even wrote
a simple <strong>raytracer</strong> from scratch with no references. Beat
that!</a></p>
<p>Like I mentioned before, I'm going to use <a title="go on, try it, it's easy
to set up and won't bite!"
href="http://libgdx.badlogicgames.com/">libgdx</a> and hopefully create
something at least half-decent. It's a really nice framework with a great,
healthy environment. It's amazing in that it allows coders to write the core
game logic in a platform-agnostic way, allowing libgdx's internals to take
care of the details. With only minor additional code (such as handling
different screen sizes, dpis, touch vs. mouse input etc.) your game can run
on almost any desktop OS (Linux, OSX, BSD, Windows work! - sorry <a title="I
couldn't get it to start in VirtualBox, even after hours of messing
around..." href="http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs">Plan
9</a> users), in-browser using Java Applets (*shudder*) or HTML5. Yep,
HTML5. Libgdx can compile Java int Javascript, using <a title="Witchcraft!
Atwood's law is true!" href="http://www.gwtproject.org/?csw=1">GWT</a>.</p>
<p>I've taken part in Ludum Dare several times before, and ended up posting the
resulting games 3 times, and scrapping my project twice (once while working
alone, and the other time by working with a friend and falling horribly
behind). My creations can be found <a title="S'not so bad"
href="http://www.ludumdare.com/compo/author/andreibarsan/">on my Ludum Dare
profile page</a>.</p>
<del>
<h1>Blog woes</h1>
<p>tl;dr: I spent 3-4 hours trying to get Octopress to work, leading to
frustration, a(n) (useless, failed) distro-upgrade and <a title="yeah."
href="https://rvm.io/">rvm</a> problems. I managed to set up Wordpress in
30 seconds.</p>
<p>Since my site (currently) runs on a shared host, I couldn't get Octopress to
install server-side. The obvious alternative (well, it's actually how you're
supposed to do it) is to install it on your own computer and just deploy the
updates using RSync over SSH. Apparently my dusty-old Bodhi Linux's
repositories were all out-of-date and it refused to install any dependencies.
All of the mirrors were 404-ing in a large chorus of "Fuck you, I'm Linux
I won't do what you tell me!". Apparently the Ubuntu version my Bodhi was
based on was no longer supported. Sigh. This is just like that time I was
running Ubuntu (or was it OpenSUSE) and the flash videos on Youtube all had
a weird blue tint. Four hours later, I was re-compiling my graphics drivers
and re-thinking all of my major life choices.</p>
<p>So, after all this, I decided that I really didn't care that much about the
technology behind it, accepted defeat and just installed Wordpress, thus
losing all the potential nerd-cred that I would have received from my peers,
after they would have noticed that my blog is "powered by Octopress". Maybe
some other day.</p>
</del>
<p>So that's it for my first post ever. Hello world and whatnot!</p>
<h2>Update (29 June 2015)</h2>
<p>I did it, after all. After getting fed up with
the constant security threats and overhead involved with running Wodpress, I
made the switch to Jekyll. I'm using a minimalistic theme, I'm editing my
posts in Vim and I love it.</p>
Mon, 19 Aug 2013 05:28:22 +0000http://siegedog.com//2013/08/19/ludum-dare-27-approaching-and-blog-woes/
http://siegedog.com//2013/08/19/ludum-dare-27-approaching-and-blog-woes/game developmentludum dare