iPhone support?
BlitzMax Forums/BlitzMax Programming/iPhone support?
| ||
Will it be possible to use Blitzmax to do iPhone application??? |
| ||
Alas, BlitzMax doesn't support the ARM processor, which the iPhone uses... So, no, is the answer. |
| ||
Doh, I was thinking about this the other day too, darn :) |
| ||
I was at the Casual Connect conference this past week in Seattle. IPhone development was a big topic there. Unity is offering a plug in to make your apps work on the iPhone. Is there any interest or drive here to figure out how we can get BlitzMax to work on the iPhone? Any ideas? |
| ||
Ideas? Yes. Raise Venture Capital and buy BlitzMax from BRL, then throw a larger team of developers at it and let them build all the features people are discussing here again and again and again. Unity: Unity already runs like crap on a Quad Core Xeon machine - I have yet to see at least ONE Unity demo that is not crawling like a slug, on any machine. So I wouldn't expect any miracles from it on the iPhone. |
| ||
I got to play with a Unity demo (from an independent developer) on an iPhone this week. Framerate was very good. I don't know anything about the Xeon comment, however I do know some people moving over from Torque to Unity and have nothing but good things to say about it. |
| ||
Plenty of interest and drive among the community, but the developer(s) has/have gone all quiet again after a few worklogs in the space of a few weeks. As for ideas on how we might affect the likelihood of it happening, I'll say this. The idea of BlitzMax on IPhone is logical, reasonably practical and (seemingly) commercially viable, all of which have traditionally been bad omens when it comes to things happening around here. Now if it was half-baked, random and commercially suicidal, I'd put good money on it, but I'm afraid this idea is far too sensible for me to get my hopes up. I'd love to be proved wrong though. |
| ||
Like I asked in another thread but was ignored, would it not be possible to write some kind of BlitzMax-to-C code converter (or to whatever the language for the iPhone in XCode is - ObjectiveC?), and then simply convert the Max code from BlitzMax into this other language and compile the whole thing from XCode to support the iPhone? Wouldn't that be simpler and quicker than writing a new compiler? That aside, what really would be involved in making a compiler that compiles for the iPhone? I presume the libraries and stuff which would be hosted on the iPhone are usually only available within the iPhone emulator running under osX and may not be available ON osX itself? That would be one problem I think. Another solution could be to write some kind of BlitzMax code compiler plugin type thingymajig for XCode so that it can natively compile BlitzMax code? Or how about someone write in Objective-C or whatever the iPoney needs, a `wrapper` for BlitzMax which uses it like an SDK library or like a script interpreter like BriskVM and so forth? Interpreted Max code might still be able to run at a decent speed as a script language? Are there any Blitz code script engines out there already perhaps which are written in C or something that could be easily adapted? Just some ideas. I think it's DEFINITELY a very good prospect for Indie developers in particular, who would be able to write relatively small low-art-asset type of games for the iPhone and churn them out pretty quickly without needing a huge budget. I would be very interested in supporting it if we could find a way to make it happen. I don't think we can expect Mark to do it right now since we have pressured him so much into getting Max3D done. So it'd have to be more or less a third party effort. |
| ||
Like I asked in another thread but was ignored, would it not be possible to write some kind of BlitzMax-to-C code converter (or to whatever the language for the iPhone in XCode is - ObjectiveC?), and then simply convert the Max code from BlitzMax into this other language and compile the whole thing from XCode to support the iPhone? This had crossed my mind but, to be honest, I ended up thinking it would be a bit pointless: One would need to become familiar with Objective-C to write the thing yet, once familiar with Objective-C, one wouldn't need it. Of course, if someone else had already written such a thing... :D I do find C a bit archaic and the Objective icing seems somewhat clunky (if I read the docs right there are technically no class variables but you can still fudge them; private stuff is defined by the differences in the implementation and interface files... what happened to encapsulation?!) so, sure, being able to prototype in Max and then click a button to have the equivalent Cocoa project spat out would be of value. And y'know, the iPhone utilises OpenGL ES, so porting functionality from GLMax2D might not be too much of a stretch. On reflection a converter seems like a logical endeavour for BRL, assuming it could be monetized. |
| ||
I've just read that the Unity folks have released a new major version which I have not seen yet - so my original comment is only about the old release. They had some downloadable demo games on their website, and those ran not very good on any of my machines - again, that statement is about the old version, not the current one. I hope they've made a bunch of performance improvements; in general, Unity looks like a great tool. I just was never sold on the speed. |
| ||
"This had crossed my mind but, to be honest, I ended up thinking it would be a bit pointless: One would need to become familiar with Objective-C to write the thing yet, once familiar with Objective-C, one wouldn't need it." That's true but if you could become familiar enough to write such a converter and then make it available to everyone else, even at a cost, then the many others who don't understand ObjectiveC would benefit greatly. And they'd all need your converted to develop for the iPhone. I for one would probably pay a reasonable amount to be able to bridge the gap to the iPhone. It's a good market and it's going to explode. |
| ||
It's a good market and it's going to explode. ![]() Totally agree! |
| ||
Oops! :-) |
| ||
Like I asked in another thread but was ignored, would it not be possible to write some kind of BlitzMax-to-C code converter (or to whatever the language for the iPhone in XCode is - ObjectiveC ... I for one would probably pay a reasonable amount to be able to bridge the gap to the iPhone. It's a good market and it's going to explode. <begin rant> or if you truly believe it's a great market, do the leg work and learn objective-c... I've never found a 'new language' as being a barrier to me wanting to develop on a specific platform. If the drive is there, then those who want it the most will take it upon themselves and get it first. Blitzmax is great (it works on 3 OS's!!!), but this isn't the first time I've seen someone wanting Blitzmax on <insert new platform here> because it's the only language they seem 'familiar' with instead of giving other languages for that platform a try. Guess what? By the time Blitzmax hits the iPhone (if at all), it will already be saturated by mediocre games and difficult for anyone to stand out. Those developers that will actually make a big splash on this new market aren't waiting for a Blitzmax-ish library to help them. </end rant> |
| ||
EDIT: Never mind, someone posted the same thing elsewhere. |
| ||
We're talking about getting Blitz to work on the iPhone, in such a way that it makes it available for others to use also, not going off and developing using the existing tools exclusively for yourself. |
| ||
Now I am working as an iPhone developer for a company. I have started my first project (a classic graphical adventure in the Lucas Arts style based on The Call of Cthulhu), and it's really easy to become familiar with the iPhone SDK, even Objective-C is really elegant when you get used to it. I make some small side projects apart from work to get used to it, and this is what I got in one day: ![]() A Gile[s] scene (without textures yet) imported and rendered on the iPhone. It's not done in BlitzMax, but close enough for me :) The 3D engine I have made uses a really simple set of functions, and the whole code for this demo has been coded without a single line of C/C++/Obj-C, just Lua scripts (implementing Lua on the iPhone is also really easy). You edit the Lua scripts on XCode, click "Build & Run", and that's all! |
| ||
Don't get me wrong, I'd love to see Blitzmax on the iPhone, And that rant wasn't directed at you IH. I just hate to see people that have good ideas not act on them because they'd be out of their 'comfort' zone in terms of technologies, and instead sit and let it pass them by. :) |
| ||
You edit the Lua scripts on XCode, click "Build & Run", and that's all! The underlying engine is Objective-C I assume. Being able to code in Lua having wrapped all the gfx stuff sounds like a reasonable way to RAD things up though -- that's very handy info (and reminds me that Lua is pretty much the only 'in' language that my local Waterstones doesn't have a book for. Grrrr!) This might sound like a daft question, but how easy is it to debug stuff in Lua compared to native code on iPhone? (I ask because I remember error messages getting dumped to the console when I used Lua with Allegro rather than the application window -- I'm wondering what happens when a script goes tits-up in, say, the iPhone emulator). |
| ||
Yeah, I'm a little bit anti-C when it comes to programming, partly because it's so mainstream and I tend to be a bit `different` than the crowd, but also I like the ease of something like BlitzMax. Looking at Objective-C code there are many aspects to the syntax that don't strike me as easy to read or understand, which means I have to adapt to the language rather than the language adapting to me. I'm sure it's very capable and sophisticated but it would just be so wonderful to be able to write in BlitzMax and have it run on the iPhone in a few clicks of the mouse. Question. How is it possible for Lua to compile within XCode? Is it because, like you suggest, the LUA engine is written in Objective-C and then you just run a script within the engine? What if we had like a BlitzMax interpreter which could run BlitzMax code like a run-time script? Maybe wouldn't be fast though. I like the idea of iPhone development and I understand what you're saying about not being afraid to dive into new technologies and such, but if it means ditching BlitzMax altogether that's not something I want to do right now. But I am interested in being able to get Blitz onto the iPhone, so how contradictory am I? |
| ||
how easy is it to debug stuff in Lua compared to native code on iPhone? Of course, you can't run a Lua script step by step using XCode, but what I do is simply forward any error messages to a dialog box which gives info about the script file and line in which the error occured, and when I need to collect and output debug info, I just store it into a string and then print the screen to the dialog box. Question. How is it possible for Lua to compile within XCode? Is it because, like you suggest, the LUA engine is written in Objective-C and then you just run a script within the engine? What if we had like a BlitzMax interpreter which could run BlitzMax code like a run-time script? Maybe wouldn't be fast though. Lua is written in ANSI-C code, so I only had to add all the Lua source files to my project and fix a bug with it trying to load scripts from the root directory instead of the application bundle.Then, an iPhone application, just like any Cocoa-basedc application, is event driven. When you launch the application, the "main" function (the standard entry point in C programmming) only creates an autorelease poll (it is an object which simply collects garbage in your code and then frees it after the current event has been processed), and enters de UIApplicationMain() function, passing the name of your main class to it. This function is responsible for all the event handling. It first initialises your main class, and calls its "applicationDidFinishLaunching" method (I am quoting from memory, not completely sure that's the exact name). Here you put your initialization code, which in my case is initializing the OpenGL context, initializing Lua (and calling it's "init" script function), and setting up a timer which ticks 25 times per second. Then the function returns control to the event handler, which will call a function every time my timer ticks. In that function, I want to call a "frame" function in my script, which will update all game logic, and then render another frame. In fact, it is really simple, and works well. If someone writes a BlitzMax-like scripting engine in C, it would work the same way. |
| ||
It sounds quite similar to the Mac screensavers which have an entry point and a timer and something that gets called every frame. How about this... Is it possible to write a bunch of libraries/modules in BlitzMax and create some kind of dll or library out of them, which can be included in XCode and triggered by tapping into them when the main/per-frame updates are triggered? So then almost all the code would be in BlitzMax and only C is used for keeping it compatible with XCode? |
| ||
The problem is that you can't get BlitzMax to compile ARM binaries, so any library you create with it won't load into the iPhone. |
| ||
Can the object files be used rather than going all the way to create a binary from Blitz itself? |
| ||
I'm just about to start my first iPhone app, and have read this thread with much interest. The LUA route sounds very intriguing. Any more info on this? URLs? Resources? Thanks |
| ||
Cause it'll be worth it! (I did not make a typing mistake above) I am really sorry for being a pest. I won't do things like this again. |
| ||
You raised this thread from the dead for that? |
| ||
with that kind of local knowledge, me thinks thehand is the return of some menace previously banned or sold out |