Jump to content
  • Advertisement
  • entries
  • comments
  • views

Okay, something to show off.

Sign in to follow this  


Oh, did I mention that sqlite.org has the latest binary downloads for Linux and Windows but not Mac, so if you want the Mac binary you have to compile it yourself, thus requiring you to download fifty jillion meg of development tools, navigate the unfamiliar XCode environment, and compile the damn thing yourself?

So step one was building SQLite for Mac. Got that working after a couple of false starts. And then it was a matter of writing a reasonable ActionScript wrapper around the command-line SQLite engine that looks like Windows one that talks to the DLL.

And I got something working. If anyone out there with a Mac wants to help me (especially PPC macs and/or OSX versions prior to 10.4), please do the following. . .

1. Download the test app at http://www.thecodezone.com/delme/mactest.zip. It has two pieces. One's the test app. The other is a database called "sample.db".

2. Run the test app and see what comes out. Easiest thing to do is to press the "connect" button, followed by the "runQuery", and finally the "getData" button. If you see some array results in the "result" field at the bottom, then everything's working.

Also, I have a little more handle on how things will work, answering the questions I posed from a couple of days ago.

I'm just gonna pack the SQLite engine into each game individually. While that's not really an issue for Bulldozer and Duck Tiles (as I sell them individually), it's gonna be a big size-hit for the Puzzle 6-pack. While I'd much rather put the database functions into a common library and let the games talk to it (as I do in Windows), it's not the "mac way of doing things" to have runtime components hanging around outside the app. So I ain't gonna fight that. The Puzzle Pack will be 3.5 meg larger for it, but now that 500 gig drives are the norm, I'm not gonna sweat it.

My SQLite engine is built as a "universal binary", which means that it's an Intel and a PPC binary duct-taped together. The game itself is gonna be a PPC binary, so hiding a universal binary inside is a bit of a space-waste (because the database is pretty far from the redline for performance). Again, though, I'm not gonna sweat the games being a few K larger than normal.

So I think everything's lined up now. They won't be quite as small and fast as they can possibly be for each "sub-platform" in the Mac universe, but I think performance should be okay and they won't smell of "port", which upsets the Mac folks. Also I won't have to worry about the support headache of maintaining multiple Mac versions (i.e. Intel Mac versus PPC Mac versus OSX >= 10.4). There'll just be "Windows version" and "Mac version" for sale. "Mac version" should work on any OSX Mac just as "Windows version" works on any Windows machine Windows 98 or later.

So the next step is to start getting games working. I'll keep you posted.

Oh, and the Belkin KVM switch is highly recommended. I'm using it for sharing the monitor/keyboard/mouse between the Main Development Box and the Mac Mini. I heard that some switches have trouble with things like power-hungry optical mice and such, but this thing works seamlessly.
Sign in to follow this  


Recommended Comments

I've meant to try out sqlite for some time, ever since Apple announced they were including it in OS X 10.4.

It seems very useful for large relational data and save/load.

PS: I don't have access to my old Powerbook right now (family has 'reserved' it) but your demo code runs fine in Rosetta mode. (10.4.7)

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!