Sunday, March 18, 2012

Episode 7 - Coordinates, New Project, PHP Setup

Revised Coordinate System

Ok, so it turned out my coordinate woos from Episode 4 were indeed "woos", it turned out the coordinate system I implemented before was totally impractical. Here is what I do now:
  • I simply provide the render system with a desired virtual resolution (800x480 in my case) for the view
  • The size of all sprites is interpreted relative to this resolution, i.e. a 80x48 bitmap sprite is 1/10th of the view
  • The render engine automatically applies letterboxing and pillarboxing on systems running a different aspect ratio, to prevent stretching
  • The upper left corner of the screen is at (0, 0), because this is the traditional approach I've been comfortable with since the days of the C64. There will be a flexible camera at a later stage, so this is not set in stone.

Letterboxing on an extra wide viewport

Kicked off a New Project.

I'm trying to get into the habit of starting and finishing short, smaller-scoped projects... so after a (fun!) little brainstorm session with Ye Balde Scribe I've set aside Seesaw Kiwi for the moment, and started a Brand New Shiny Project (tm).

The awesome part about this particular project is that it will be shippable at a very early stage, but still leaves room for massive amounts of improvement. Awesome!


Setting up PHP Development - NetBeans, XAMPP


The new project requires a server component. PHP seems the obvious choice for now, simply because it is the easiest/cheapest to setup... I've got more than a couple of Shared Hosting LAMP websites sitting around, doing mostly nothing.

After installing XAMPP, I hit a small hurdle getting Apache to run, because a running TeamViewer service (which I was pretty sure I'd never enabled) hijacked port 80. On a modern Windows 7 developer system it's quite hard to figure out which of the 70-odd running services is the culprit, especially because netstat -ano returned PID 4... which is the System process. Very helpful, netstat.



This being my first experience with XAMPP and the NetBeans IDE, I was a bit disappointed that I had to manually edit php.ini to get the debugger to work (why bundle it with XAMPP but not configure it?). And why do I have to manually edit httpd.conf to get the active NetBeans project running in Apache? Can I have my IDE a bit more Integrated, please? Good news: the debugging experience is really good thus far.

Rant: it's kinda unfunny how windows projects that originate as Cross Platform Open Source never seem to get UAC right. Same with XAMPP: You have to make sure you don´t install it inside Program Files (because it drops read/write config files inside it's install directory, which is a big no-no in Windows-land), and you need to explicitly launch the XAMPP control panel with elevated rights because it needs to manipulate windows services, and doesn't include a manifest of its own.

Oh well, enough complaining, it's free and it works. Hopefully the Mac/Linux users get a bit more love for their respective platform guidelines :-).


Misc

4 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. My research has my printed in a variety of business and publications magazines, and i also am on this page to offer you my assistance and experience to you personally!

    ReplyDelete
  3. I was able to conserve an overall of € 250! Completely amazing!https://vergelijk-gratis.nl

    ReplyDelete
  4. While working with web benefits, the PHP developers have alternative to utilize both XML and JSON. In any case, they can generally exploit the local PHP capacities like json_encode( ) and json_decode( ) to work with web benefits in a quicker and progressively effective way.Why use Laravel

    ReplyDelete