{"id":2436,"date":"2012-03-25T19:25:17","date_gmt":"2012-03-25T09:25:17","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=2436"},"modified":"2012-03-25T19:25:35","modified_gmt":"2012-03-25T09:25:35","slug":"heres-something-different","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2012\/03\/25\/heres-something-different\/","title":{"rendered":"Here’s something different"},"content":{"rendered":"

\"\"<\/a>Today, a completely different view.\u00a0 What you’re seeing on the left is the VectorStorm testbed samples compiling (or more accurately, failing to compile) under Ubuntu Linux.<\/p>\n

It’s mostly working, actually.\u00a0 All of the rendering code is compiling successfully (which is a major relief!)\u00a0 The bit that’s failing right now is something that’s including headers through the Box2D library.\u00a0 The memory management functionality I use often conflicts a bit with Box2D and other libraries, since I’m trying to take over control of malloc, new, new[], free, delete, and delete[], replacing them with my own implementations.\u00a0 Which does sometimes cause problems.\u00a0 Not yet sure what’s causing this particular instance of the issue, but I’m sure I’ll figure it out eventually.<\/p>\n

My plan is for the next version of the VectorStorm library to work across four platforms:\u00a0 Mac, Windows, Linux, and iOS.\u00a0 It’s substantially cleaned up compared against what I’m using now in MMORPG Tycoon 2, and will generally make my day-to-day development a lot, lot simpler.\u00a0 But there’s still a little ways to go before it’s ready to go.\u00a0 Once it’s done, I’ll be splitting it off into a shiny new git repository which has never been polluted by big music files, so will be much, much smaller on disk.<\/p>\n

Big issues (apart from “make it compile”) that I still need to sort out:<\/p>\n

    \n
  1. Figure out the future of Box2D within VectorStorm.\u00a0 Do I continue to embed it within my source control repository, as I always have?\u00a0 Or do I switch to using it as an external library, the way that I do with SDL and GLEW?\u00a0 I’m leaning strongly toward turning Box2D into an external library.\u00a0 And maybe setting up some sort of system which allows it to be excluded entirely.\u00a0 Because honestly, most of my games don’t use it at all.\u00a0 Seems silly to have it as a dependency for games that don’t use physics.\u00a0 On the other hand, I worry about its API potentially changing, which would mean I’d have to pay more attention to it than I do now, potentially updating the bindings with each new Box2D release.\u00a0 Or maybe I should remove the Box2D bindings entirely, and let individual games deal with it themselves.<\/li>\n
  2. Figure out SDL\/Glew header #include conventions.\u00a0 On OS X, Glew is expected to be in <Glew\/Glew.h>.\u00a0 On Win32\/Linux, it’s expected to be in <GL\/Glew.h>.\u00a0 Similarly, on OS X, SDL_image is expected to be in <SDL_image\/SDL_image.h>, while on Win32\/Linux it’s expected to be in <SDL\/SDL_image.h>.\u00a0 Right now I’ve worked around this by having separate #include lines for different platforms.\u00a0 But this feels a bit absurd.\u00a0 I might simply switch to <Glew.h> and <SDL_image.h> (respectively), and handle the directory within CMake rules.\u00a0 But then the source code won’t match any platform.<\/li>\n
  3. Figure out how to handle SDL\/GLEW frameworks on OS X.\u00a0 I really don’t like checking binary builds of them into version control, but there’s no other good way for Mac users to get them;\u00a0 these projects don’t provide frameworks.\u00a0 I had to manually configure projects to build them against the right SDKs and for the correct architectures.<\/li>\n
  4. Implement semaphore support on Win32.\u00a0 Somehow I forgot to finish this in the initial implementation of threading for Win32.<\/li>\n
  5. Test threading support under Linux.\u00a0 (Theoretically, the OS X code I’ve written should work under Linux without modification.\u00a0 But it needs testing to verify.)<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"

    Today, a completely different view.\u00a0 What you’re seeing on the left is the VectorStorm testbed samples compiling (or more accurately, failing to compile) under Ubuntu Linux. It’s mostly working, actually.\u00a0 All of the rendering code is compiling successfully (which is a major relief!)\u00a0 The bit that’s failing right now is something that’s including headers through…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[4,3],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-Di","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/2436"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=2436"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/2436\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=2436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=2436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=2436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}