I was recently approached to develop a children's educational computer game version of a real (wood etc.) game (looks like a pretty good game). I said I would only be interested if I could do the first implementation in Smalltalk (Squeak or Pharo). But if I develop this game in Smalltalk what am I dealing with in terms of releasing this product to a customer (over the Internet). 1) I know I have to build a suitable executable but I have never done this. I have only written Smalltalk code that I then use. So how do I build such an image and how big is it (assume code for game is small (say 3000 lines of code)). 2) How do I get the virtual image on the customer's machine. Keep in mind the customer is someone somewhere on the Internet who probably knows little about how to install Smalltalk or anything else. I am assuming here that installing the game and installing the VM are two different tasks. Is there a way to make this a single task? 3) So far I am assuming the target machine is Linux/Windows/Mac on a Desktop/Laptop. But can Smalltalk be run on any of the IPad/Notebook/etc out there? These machines represent a larger game market I believe. 4) Assuming I can arrange for my computer game (if I write it) to be installed are there memory/cpu usage issues that I need to worry about (the game itself will use a minimal of memory/cpu except for graphics which also is pretty reasonable). I am thinking here of IPads etc. For Desktops/Laptops there should be no problem. Download time and subsequent storage space is also a concern; remember the device is probably used for lots of other things so the amount of space allocated for games may be small compared to the space on the machine? 5) Sorry for the redundancy if these questions have been asked before (which I am sure they have). Thanks for any feedback; I am sure others are interested in this question too. Ralph Boland
I am no Pharo expert but will try to answer with what I know 1) Pharo download is 16 mb compressed and 58 mb uncompressed. 2) Pharo is a standalone and as such it does not need installation. Everything you need is in a single folder contained in a single zip with a single download. I dont think you can get any easier than that. So its a single task. 3) There are people who run Pharo on iOS like DrGeo. But Pharo does not support those platforms and most likely you will experience few problems with it. So its some extra work but its doable. They do represent a larger market and a very important one I agree. 4) Again I dont know the issues on those platforms but bare in mid, Pharo is a dynamic language and dynamic language are definetly not a first choice for those platforms for game because they are slower than official supported languages. Those are in iOS ObjectiveC and on Android Java. All that assuming your game has some demanding graphics. For simple graphics with not much animation and such you should be ok. Personally I think its not a good idea, because Pharo does not support those platforms well. I think that in that scenario there is a better alternative , that of Javascript + Pharo. Its possible to use JS as front end and Pharo as backend. If you dont want to code in Js there is Amber. Web apps are quite performant so you will be able to do some really impressive graphics with this recipe. You will be using also technologies that are well documented and well tested. Also there are like a ton of game libraries for JS out there. Which will lift the amount of work you will need to do for your game.
Hi Kilon, Hi Ralph, I wish I could answer with concrete information. But that's not what I spend my time doing. However, I need to correct the impression the following answers give. I think they're discouraging to say the least. On Sat, May 10, 2014 at 2:03 PM, kilon alios <kilon.alios@gmail.com> wrote:
I am no Pharo expert but will try to answer with what I know
1) Pharo download is 16 mb compressed and 58 mb uncompressed.
and can be stripped. It is easy to get a development environment into 16Mb (e.g. Newspeak). Applications can easily fit in 16Mb. Applications don't need to be deployed with sources or changes files.
2) Pharo is a standalone and as such it does not need installation. Everything you need is in a single folder contained in a single zip with a single download. I dont think you can get any easier than that. So its a single task.
But there are scripts to create platform-compatible installers on Mac OS and Win32 if that's what you want.
3) There are people who run Pharo on iOS like DrGeo. But Pharo does not support those platforms and most likely you will experience few problems with it. So its some extra work but its doable. They do represent a larger market and a very important one I agree.
What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone??
4) Again I dont know the issues on those platforms but bare in mid, Pharo is a dynamic language and dynamic language are definetly not a first choice for those platforms for game because they are slower than official supported languages. Those are in iOS ObjectiveC and on Android Java. All that assuming your game has some demanding graphics. For simple graphics with not much animation and such you should be ok.
I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else.
Personally I think its not a good idea, because Pharo does not support those platforms well. I think that in that scenario there is a better alternative , that of Javascript + Pharo. Its possible to use JS as front end and Pharo as backend. If you dont want to code in Js there is Amber. Web apps are quite performant so you will be able to do some really impressive graphics with this recipe. You will be using also technologies that are well documented and well tested.
IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/
Also there are like a ton of game libraries for JS out there. Which will lift the amount of work you will need to do for your game.
Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better. -- best, Eliot
"What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone?? " I think you replied what support means. Support means that there is group of people out there to support you with your problems on that platform. Pharo does not officially release for those platforms and there are only a couple of applications that I know that run on iOS both from the same developer. So pretty much you are on your own. "I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else." It should not be a problem for an educational game anyway , I was talking about games that are very demanding graphics wise. In those games most of the code is most demanding anyway and so they use dynamic languages only for scripting game logic . "IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/" Well let me put it this way. Its been 12 hours since the OP has asked the question and the only two people who answered the question are clueless about these platforms. I think the situation verifies exactly the situation I was describing in my reply. "Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better." I don't take it personally when people disagree with me, I find it refreshing because I may learn something new. No he cant interpet it like "Pharo can't do deployment" because I already mentioned in my first reply that there are pharo apps distributed on iOS and especially DrGeo is a really nice app that I have used. if he interprets my post "you're better off programming in JavaScript" then yes he would be exactly right. Because that was my intention. I also mentioned Amber that is Smalltalk that compiles to Javascript so I think I did not force him to consider only JS as an option. By the way I would love to be proven wrong because I also would love to develop for those platforms with Pharo but right now I dont feel confident about it. As you said it there is not even documentation about the process. I remember someone once posted instructions on how to compile Pharo on iOS but people did not show much interest and it just disappeared. Please prove me wrong !!! On Sun, May 11, 2014 at 12:23 AM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
Hi Kilon, Hi Ralph,
I wish I could answer with concrete information. But that's not what I spend my time doing. However, I need to correct the impression the following answers give. I think they're discouraging to say the least.
On Sat, May 10, 2014 at 2:03 PM, kilon alios <kilon.alios@gmail.com>wrote:
I am no Pharo expert but will try to answer with what I know
1) Pharo download is 16 mb compressed and 58 mb uncompressed.
and can be stripped. It is easy to get a development environment into 16Mb (e.g. Newspeak). Applications can easily fit in 16Mb. Applications don't need to be deployed with sources or changes files.
2) Pharo is a standalone and as such it does not need installation. Everything you need is in a single folder contained in a single zip with a single download. I dont think you can get any easier than that. So its a single task.
But there are scripts to create platform-compatible installers on Mac OS and Win32 if that's what you want.
3) There are people who run Pharo on iOS like DrGeo. But Pharo does not support those platforms and most likely you will experience few problems with it. So its some extra work but its doable. They do represent a larger market and a very important one I agree.
What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone??
4) Again I dont know the issues on those platforms but bare in mid, Pharo is a dynamic language and dynamic language are definetly not a first choice for those platforms for game because they are slower than official supported languages. Those are in iOS ObjectiveC and on Android Java. All that assuming your game has some demanding graphics. For simple graphics with not much animation and such you should be ok.
I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else.
Personally I think its not a good idea, because Pharo does not support those platforms well. I think that in that scenario there is a better alternative , that of Javascript + Pharo. Its possible to use JS as front end and Pharo as backend. If you dont want to code in Js there is Amber. Web apps are quite performant so you will be able to do some really impressive graphics with this recipe. You will be using also technologies that are well documented and well tested.
IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/
Also there are like a ton of game libraries for JS out there. Which will lift the amount of work you will need to do for your game.
Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better.
-- best, Eliot
in my discharge, I have to say that the only reason why the pharovm is not released for iOS is because Iâve been really busy to properly configure the jenkins slave. But you should be able to produce an iPharo vm (is stack, no support for JIT yet) as easy as compiling any other vm. And I know Jean-Baptiste is in his way to revive the Android platform. In general about gaming, I think nothing prevent us to have something like pygame working right now (technically we have all the elements), just that as a community, we usually are more focused in other directions. But Ronnie is finishing his SDL2 work and soon we will have a version of OSWindow that we can actually use (that will lead to another vm-plugin cleanup. but thatâs another story). SDL2 even has bindings for audio, so we could have audio access without the ALSA/Pulse pain we are having this days. With OpenGL/OpenCL support (which is also being made by Ronnie, he) we could even have very fast graphics support without going out the image (well, just to call those libraries). In other order of things (some-kind related) a couple of months ago Eliot told me that he can be in his way to give us an âexecuteOnProcessâ primitive, that would solve most of our parallelisation problems (and Eliot will be probably hating me at this moment, I know he dislike announcements before they are at least started⦠Iâm sorry). So well⦠I think the answer should be: 1) it is possible, 2) but things are poor documented and we need to improve there 3) as being a pioneer in the gaming for mobile area (with pharo), you will need some work. And of course community (and me in particular) is willing to help as much as we can. 4) ⦠and of course since thatâs a non frequent area for us as a community, they will be probably things to overcome⦠but again, they will all be solvable and we are willing to help. cheers, Esteban On 11 May 2014, at 09:39, kilon alios <kilon.alios@gmail.com> wrote:
"What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone?? "
I think you replied what support means. Support means that there is group of people out there to support you with your problems on that platform. Pharo does not officially release for those platforms and there are only a couple of applications that I know that run on iOS both from the same developer. So pretty much you are on your own.
"I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else."
It should not be a problem for an educational game anyway , I was talking about games that are very demanding graphics wise. In those games most of the code is most demanding anyway and so they use dynamic languages only for scripting game logic .
"IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/"
Well let me put it this way. Its been 12 hours since the OP has asked the question and the only two people who answered the question are clueless about these platforms. I think the situation verifies exactly the situation I was describing in my reply.
"Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better."
I don't take it personally when people disagree with me, I find it refreshing because I may learn something new.
No he cant interpet it like "Pharo can't do deployment" because I already mentioned in my first reply that there are pharo apps distributed on iOS and especially DrGeo is a really nice app that I have used. if he interprets my post "you're better off programming in JavaScript" then yes he would be exactly right. Because that was my intention. I also mentioned Amber that is Smalltalk that compiles to Javascript so I think I did not force him to consider only JS as an option.
By the way I would love to be proven wrong because I also would love to develop for those platforms with Pharo but right now I dont feel confident about it. As you said it there is not even documentation about the process. I remember someone once posted instructions on how to compile Pharo on iOS but people did not show much interest and it just disappeared.
Please prove me wrong !!!
On Sun, May 11, 2014 at 12:23 AM, Eliot Miranda <eliot.miranda@gmail.com> wrote: Hi Kilon, Hi Ralph,
I wish I could answer with concrete information. But that's not what I spend my time doing. However, I need to correct the impression the following answers give. I think they're discouraging to say the least.
On Sat, May 10, 2014 at 2:03 PM, kilon alios <kilon.alios@gmail.com> wrote: I am no Pharo expert but will try to answer with what I know
1) Pharo download is 16 mb compressed and 58 mb uncompressed.
and can be stripped. It is easy to get a development environment into 16Mb (e.g. Newspeak). Applications can easily fit in 16Mb. Applications don't need to be deployed with sources or changes files.
2) Pharo is a standalone and as such it does not need installation. Everything you need is in a single folder contained in a single zip with a single download. I dont think you can get any easier than that. So its a single task.
But there are scripts to create platform-compatible installers on Mac OS and Win32 if that's what you want.
3) There are people who run Pharo on iOS like DrGeo. But Pharo does not support those platforms and most likely you will experience few problems with it. So its some extra work but its doable. They do represent a larger market and a very important one I agree.
What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone??
4) Again I dont know the issues on those platforms but bare in mid, Pharo is a dynamic language and dynamic language are definetly not a first choice for those platforms for game because they are slower than official supported languages. Those are in iOS ObjectiveC and on Android Java. All that assuming your game has some demanding graphics. For simple graphics with not much animation and such you should be ok.
I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else.
Personally I think its not a good idea, because Pharo does not support those platforms well. I think that in that scenario there is a better alternative , that of Javascript + Pharo. Its possible to use JS as front end and Pharo as backend. If you dont want to code in Js there is Amber. Web apps are quite performant so you will be able to do some really impressive graphics with this recipe. You will be using also technologies that are well documented and well tested.
IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/
Also there are like a ton of game libraries for JS out there. Which will lift the amount of work you will need to do for your game.
Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better.
-- best, Eliot
On 11/5/14 09:39, kilon alios wrote:
"What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone?? "
I think you replied what support means. Support means that there is group of people out there to support you with your problems on that platform. Pharo does not officially release for those platforms and there are only a couple of applications that I know that run on iOS both from the same developer. So pretty much you are on your own.
Well this is not true because Esteban helped a lot hilaire and there is also Jeff
"I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else."
It should not be a problem for an educational game anyway , I was talking about games that are very demanding graphics wise. In those games most of the code is most demanding anyway and so they use dynamic languages only for scripting game logic .
how can you discuss when the requirements are so under specified.
"IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/"
Well let me put it this way. Its been 12 hours since the OP has asked the question and the only two people who answered the question are clueless about these platforms. I think the situation verifies exactly the situation I was describing in my reply. Come on. When you do not have experience just think twice about what you think you know and the advice you want to give.
"Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better."
I don't take it personally when people disagree with me, I find it refreshing because I may learn something new.
No he cant interpet it like "Pharo can't do deployment" because I already mentioned in my first reply that there are pharo apps distributed on iOS and especially DrGeo is a really nice app that I have used. if he interprets my post "you're better off programming in JavaScript" then yes he would be exactly right. Because that was my intention. I also mentioned Amber that is Smalltalk that compiles to Javascript so I think I did not force him to consider only JS as an option.
By the way I would love to be proven wrong because I also would love to develop for those platforms with Pharo but right now I dont feel confident about it. As you said it there is not even documentation about the process. I remember someone once posted instructions on how to compile Pharo on iOS but people did not show much interest and it just disappeared.
Please prove me wrong !!!
But this is not by saying that people should not do it then. Stef
On Sun, May 11, 2014 at 12:23 AM, Eliot Miranda <eliot.miranda@gmail.com <mailto:eliot.miranda@gmail.com>> wrote:
Hi Kilon, Hi Ralph,
I wish I could answer with concrete information. But that's not what I spend my time doing. However, I need to correct the impression the following answers give. I think they're discouraging to say the least.
On Sat, May 10, 2014 at 2:03 PM, kilon alios <kilon.alios@gmail.com <mailto:kilon.alios@gmail.com>> wrote:
I am no Pharo expert but will try to answer with what I know
1) Pharo download is 16 mb compressed and 58 mb uncompressed.
and can be stripped. It is easy to get a development environment into 16Mb (e.g. Newspeak). Applications can easily fit in 16Mb. Applications don't need to be deployed with sources or changes files.
2) Pharo is a standalone and as such it does not need installation. Everything you need is in a single folder contained in a single zip with a single download. I dont think you can get any easier than that. So its a single task.
But there are scripts to create platform-compatible installers on Mac OS and Win32 if that's what you want.
3) There are people who run Pharo on iOS like DrGeo. But Pharo does not support those platforms and most likely you will experience few problems with it. So its some extra work but its doable. They do represent a larger market and a very important one I agree.
What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone??
4) Again I dont know the issues on those platforms but bare in mid, Pharo is a dynamic language and dynamic language are definetly not a first choice for those platforms for game because they are slower than official supported languages. Those are in iOS ObjectiveC and on Android Java. All that assuming your game has some demanding graphics. For simple graphics with not much animation and such you should be ok.
I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else.
Personally I think its not a good idea, because Pharo does not support those platforms well. I think that in that scenario there is a better alternative , that of Javascript + Pharo. Its possible to use JS as front end and Pharo as backend. If you dont want to code in Js there is Amber. Web apps are quite performant so you will be able to do some really impressive graphics with this recipe. You will be using also technologies that are well documented and well tested.
IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/
Also there are like a ton of game libraries for JS out there. Which will lift the amount of work you will need to do for your game.
Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better.
-- best, Eliot
Hello, I am working in OSWindow, an API for making/controlling native operating system windows from the image side. It uses SDL2 as a cross platform backend, but I have tested it mostly in Linux, but I could make it run in a hacky way in Windows some week ago. For games, yesterday I could make it work along with NBOpenGL, this one was quite tricky, but in the process I also noticed something interesting about performance. Because SDL2 default renderer for Linux was based in OpenGL, I was having multiples OpenGL contexts in the same image. And they were interfering between them, because they were being called from different Pharo processes! The solution I made was creating a Pharo process, the OSWindowRenderThread, that receives rendering operations, with the objective of serialize rendering operations that require to keep a same OpenGL/Drawing API context. When testing this I made a simple animated example, that required periodic updates. But I didn't knew too much about the Pharo process priorities, so it had a priority too high, so it was blocking Morphic. It was wrong, but the simple animation was very smooth. When I reduced the RenderThread priority, morphic was not blocked anymore, but the animation was not so smooth. So, for video game performance, we should have a look in the Pharo scheduler. I am busy with UFFI/OSWindow/OpenCL and my studies, so is not my priority. For audio, having audio output using SDL2 it is very easy to do, but it relies on callbacks. It also does not support 3D audio. For 3D audio, I would use OpenAL. OpenAL API is not so big, and it does not have a need for callbacks, so his support can be done completely in image side. Greetings, Ronie 2014-05-11 4:15 GMT-04:00 stepharo <stepharo@free.fr>:
On 11/5/14 09:39, kilon alios wrote:
"What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone?? "
I think you replied what support means. Support means that there is group of people out there to support you with your problems on that platform. Pharo does not officially release for those platforms and there are only a couple of applications that I know that run on iOS both from the same developer. So pretty much you are on your own.
Well this is not true because Esteban helped a lot hilaire and there is also Jeff
"I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else."
It should not be a problem for an educational game anyway , I was talking about games that are very demanding graphics wise. In those games most of the code is most demanding anyway and so they use dynamic languages only for scripting game logic .
how can you discuss when the requirements are so under specified.
"IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/"
Well let me put it this way. Its been 12 hours since the OP has asked the question and the only two people who answered the question are clueless about these platforms. I think the situation verifies exactly the situation I was describing in my reply.
Come on. When you do not have experience just think twice about what you think you know and the advice you want to give.
"Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better."
I don't take it personally when people disagree with me, I find it refreshing because I may learn something new.
No he cant interpet it like "Pharo can't do deployment" because I already mentioned in my first reply that there are pharo apps distributed on iOS and especially DrGeo is a really nice app that I have used. if he interprets my post "you're better off programming in JavaScript" then yes he would be exactly right. Because that was my intention. I also mentioned Amber that is Smalltalk that compiles to Javascript so I think I did not force him to consider only JS as an option.
By the way I would love to be proven wrong because I also would love to develop for those platforms with Pharo but right now I dont feel confident about it. As you said it there is not even documentation about the process. I remember someone once posted instructions on how to compile Pharo on iOS but people did not show much interest and it just disappeared.
Please prove me wrong !!!
But this is not by saying that people should not do it then.
Stef
On Sun, May 11, 2014 at 12:23 AM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
Hi Kilon, Hi Ralph,
I wish I could answer with concrete information. But that's not what I spend my time doing. However, I need to correct the impression the following answers give. I think they're discouraging to say the least.
On Sat, May 10, 2014 at 2:03 PM, kilon alios <kilon.alios@gmail.com>wrote:
I am no Pharo expert but will try to answer with what I know
1) Pharo download is 16 mb compressed and 58 mb uncompressed.
and can be stripped. It is easy to get a development environment into 16Mb (e.g. Newspeak). Applications can easily fit in 16Mb. Applications don't need to be deployed with sources or changes files.
2) Pharo is a standalone and as such it does not need installation. Everything you need is in a single folder contained in a single zip with a single download. I dont think you can get any easier than that. So its a single task.
But there are scripts to create platform-compatible installers on Mac OS and Win32 if that's what you want.
3) There are people who run Pharo on iOS like DrGeo. But Pharo does not support those platforms and most likely you will experience few problems with it. So its some extra work but its doable. They do represent a larger market and a very important one I agree.
What does "not support" mean? People have successfully deployed apps on both iPhone and Android. Pharo can not (easily) be developed on iPhone but can be deployed there-on. One can't develop iPhone apps on iPhone. you need a Mac for that. Does that mean Apple don't support iPhone??
4) Again I dont know the issues on those platforms but bare in mid, Pharo is a dynamic language and dynamic language are definetly not a first choice for those platforms for game because they are slower than official supported languages. Those are in iOS ObjectiveC and on Android Java. All that assuming your game has some demanding graphics. For simple graphics with not much animation and such you should be ok.
I disagree with 4. If graphics are done by external libraries (and note that even BitBlt in Pharo/Squeak is not implemented in Squeak, but in C) graphics can be as fast in Pharo as in anything else.
Personally I think its not a good idea, because Pharo does not support those platforms well. I think that in that scenario there is a better alternative , that of Javascript + Pharo. Its possible to use JS as front end and Pharo as backend. If you dont want to code in Js there is Amber. Web apps are quite performant so you will be able to do some really impressive graphics with this recipe. You will be using also technologies that are well documented and well tested.
IMO this is a /really bad/ answer. There are Pharo and Squeak apps deployed on Android and iPhone. The answer shouldn't be "this is a bad idea", it should be "you can deploy natively like this..., or you can deploy with a native UI and Smalltalk logic like this...". But the answer should never be "this is a bad idea". Alas I don't spend my time deploying apps so I don't know how to do it, only that people have (I have DrGeo on my iPhone). So can those that know please write an FAQ that answers ralph's question? I wish I could :-/
Also there are like a ton of game libraries for JS out there. Which will lift the amount of work you will need to do for your game.
Kilon, please don't take this personally but someone could easily interpret your answer as "you're better off programming in JavaScript. Pharo can't do deployment. " That's both a terrible and an incorrect answer. I hope we can do much better.
-- best, Eliot
On 10/5/14 23:03, kilon alios wrote:
I am no Pharo expert but will try to answer with what I know
1) Pharo download is 16 mb compressed and 58 mb uncompressed.
2) Pharo is a standalone and as such it does not need installation. Everything you need is in a single folder contained in a single zip with a single download. I dont think you can get any easier than that. So its a single task.
3) There are people who run Pharo on iOS like DrGeo. But Pharo does not support those platforms and most likely you will experience few problems with it. So its some extra work but its doable. They do represent a larger market and a very important one I agree. ???
Esteban is maintained the iOS VM since years!!!
4) Again I dont know the issues on those platforms but bare in mid, Pharo is a dynamic language and dynamic language are definetly not a first choice for those platforms for game because they are slower than official supported languages. Those are in iOS ObjectiveC and on Android Java. All that assuming your game has some demanding graphics. For simple graphics with not much animation and such you should be ok.
I know people that developed games with squeak 8 years ago using OpenGL for digital TV with animations so ...
Personally I think its not a good idea, because Pharo does not support those platforms well. I think that in that scenario there is a better alternative , that of Javascript + Pharo.
Jeff Rick is doing iPad Application. So it really depends which kind of games (if this is God of War 3 forget Pharo) but if this is a traditional game like angry birds or so I do not see why this would be a problem.
Its possible to use JS as front end and Pharo as backend. If you dont want to code in Js there is Amber. Web apps are quite performant so you will be able to do some really impressive graphics with this recipe. You will be using also technologies that are well documented and well tested.
Also there are like a ton of game libraries for JS out there. Which will lift the amount of work you will need to do for your game.
Hello, 2014-05-10 22:42 GMT+02:00 Ralph Boland <rpboland@gmail.com>:
I was recently approached to develop a children's educational computer game version of a real (wood etc.) game (looks like a pretty good game). I said I would only be interested if I could do the first implementation in Smalltalk (Squeak or Pharo). But if I develop this game in Smalltalk what am I dealing with in terms of releasing this product to a customer (over the Internet).
1) I know I have to build a suitable executable but I have never done this. I have only written Smalltalk code that I then use. So how do I build such an image and how big is it (assume code for game is small (say 3000 lines of code)).
Here's a doc that explains how to build a suitable deployment image and executable for windows and Mac: https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccess... You can also build a Linux executable but there are no documentation about it. If you want documentation about it complain everyday on this mailing list for missing documentation, by the end of the month people will have written it to have you stop complaining :-). The image should be around 15Mb.
2) How do I get the virtual image on the customer's machine. Keep in mind the customer is someone somewhere on the Internet who probably knows little about how to install Smalltalk or anything else. I am assuming here that installing the game and installing the VM are two different tasks. Is there a way to make this a single task?
The executable you can generate from the doc I pointed to you on question 1 makes installing the VM and the image a single task. Ask the users to download the windows, Mac or Linux executable. Else, as you can see for DrGeo, propose the application as an Android app / iPhone app on Google play / the Apple store. Note that you may prefer to deploy on the web to avoid needing to port the application to all platforms.
3) So far I am assuming the target machine is Linux/Windows/Mac on a Desktop/Laptop. But can Smalltalk be run on any of the IPad/Notebook/etc out there? These machines represent a larger game market I believe.
As far as I know, There are deployed Pharo applications on Mac OS X, Linux, Windows, iOS, Android, RISC OS. In theory, if you need an additional specific platform, the guys on the vm-dev mailing list could help you compiling the VM for your additional platform. However this may take a few weeks of work depending on the target platform and your skills.
4) Assuming I can arrange for my computer game (if I write it) to be installed are there memory/cpu usage issues that I need to worry about (the game itself will use a minimal of memory/cpu except for graphics which also is pretty reasonable). I am thinking here of IPads etc. For Desktops/Laptops there should be no problem. Download time and subsequent storage space is also a concern; remember the device is probably used for lots of other things so the amount of space allocated for games may be small compared to the space on the machine?
Nothing to worry about. Usually a Pharo application have at runtime a memory footprint of less than 30Mb. And now even small embedded devices have at least 256Mb of RAM. Cpu usage is also OK. Now note that on ARM devices (typically, Android, iOS and RISC OS), the VM is 2-10x slower. Therefore you may need to profile and optimize a bit your application before deploying on ARM devices. We have a profiler in Pharo that you can easily use to do that. For the download part, you can shrink your Pharo executable by removing unused important packages in the image and the source file.
5) Sorry for the redundancy if these questions have been asked before (which I am sure they have).
Yeah well this mailing list is Pharo-dev it is usually a bit more oriented towards the development of Pharo itself. If you want to make professional application you may (or may not) want to discuss it on Pharo-business mailing list.
Thanks for any feedback; I am sure others are interested in this question too.
Definitely. What framework are you using for your graphics ? Because if plan to use Athens (our vector graphics framework), graphics will for sure go faster, but you should know that it relies on Cairo, and Cairo is not stable on every OS (for example it is not stable at all on iOS, so no iPad/iPhone and bye bye cross platform application). Else the graphics are bit based and these may be a bit slow if you're doing heavy graphics computation. Btw, you may want to discuss with J.F. Rick, he has already implemented and deployed educational computer game (desktop app) with Pharo and touch screens. You may also want to try to ask question to the guy that deployed DrGeo (I think he's named Hilaire Fernandez), it's an app to teach geometry to kids AFAIK, it has quite some graphics, and it's deployed on Apple store/Google play. I guess he's the guy to ask on how to deploy on iPhone/Android.
Ralph Boland
Clement hilaire told me that he has friends developing in C++ simple educational game and this is a hell to deploy on differetn platforms While with Pharo this IS simple. Stef On 11/5/14 09:51, Clément Bera wrote:
Else, as you can see for DrGeo, propose the application as an Android app / iPhone app on Google play / the Apple store.
Note that you may prefer to deploy on the web to avoid needing to port the application to all platforms.
On 10/5/14 22:42, Ralph Boland wrote:
I was recently approached to develop a children's educational computer game version of a real (wood etc.) game (looks like a pretty good game). I said I would only be interested if I could do the first implementation in Smalltalk (Squeak or Pharo). But if I develop this game in Smalltalk what am I dealing with in terms of releasing this product to a customer (over the Internet).
Plop was a squeak game sold. My kids played with it without me doing anything.
1) I know I have to build a suitable executable but I have never done this. I have only written Smalltalk code that I then use. So how do I build such an image and how big is it (assume code for game is small (say 3000 lines of code)).
I think that you can get easily under 10 mb removing the tools. And we can help for that.
2) How do I get the virtual image on the customer's machine. Keep in mind the customer is someone somewhere on the Internet who probably knows little about how to install Smalltalk or anything else. I am assuming here that installing the game and installing the VM are two different tasks. Is there a way to make this a single task?
You can have the one click which is doing a cross platform launcher. Plop and sophie were deployed like that. Moose and Seaside during years too.
3) So far I am assuming the target machine is Linux/Windows/Mac on a Desktop/Laptop. But can Smalltalk be run on any of the IPad/Notebook/etc out there? These machines represent a larger game market I believe. Any is not a simple word. If you want to deploy on android or iOS I imagine that you know that there are different constraints.
4) Assuming I can arrange for my computer game (if I write it) to be installed are there memory/cpu usage issues that I need to worry about (the game itself will use a minimal of memory/cpu except for graphics which also is pretty reasonable). I am thinking here of IPads etc.
for iPad JochenRick deployed squeak and Pharo solutions. Now people are working on a ARMJIT and we will have soon and ARMASM so it will go faster.
For Desktops/Laptops there should be no problem. Download time and subsequent storage space is also a concern; remember the device is probably used for lots of other things so the amount of space allocated for games may be small compared to the space on the machine? Do you know the average size of an application one the different devices? Because any goodies on Mac is much much more than the complete Pharo release with full sources (which can be removed)
5) Sorry for the redundancy if these questions have been asked before (which I am sure they have).
Thanks for any feedback; I am sure others are interested in this question too.
What you should consider is that as a community we are interested in making you succeed now it also depends on you :)
Ralph Boland
The LaserGame might be a good example of an app that can be easily deployed to multiple platforms. /Garth -- View this message in context: http://forum.world.st/developing-games-in-Pharo-tp4758592p4758699.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Morning! As several people mentioned it, I may have a few tips to share regarding developing educative applications with Pharo (you can read Squeak as well, but you may have a better support with Pharo if you want to target touch devices as well, I don't want to write the Squeakers are helpless -- not at all -- but it seems to me there are more experiences to bring Pharo applications on touch devices from A to Z -- from the developer to the consumer I mean). You are a Smalltalker so you definitely know the related benefits to develop with Pharo, so no need to spend words on that. You also know your application will be portable to the three workstation operating systems, very easily as the VM are routinely compiled for these hosts. To get an idea about how could look your end user application, I suggest you take a look at Dr.Geo - http://drgeo.eu for workstation and touch devices ; then also iStoa for Linux - https://launchpad.net/istoa/+download. These are packaged for end user. For Windows the installer could be improved with installed entry in the system menu.
1) I know I have to build a suitable executable but I have never done this. I have only written Smalltalk code that I then use. So how do I build such an image and how big is it (assume code for game is small (say 3000 lines of code)).
To build the end user application, you will have to do it in two steps: 1. Prepare your image: install your source code and related source code package, set the state of the image, shrink your image and save it. You will use Metacello. I use smalltalk script for that. 2. Build your application package: you will use a pre set application hierarchy with the VM, icons, execution script if needed, etc and install your image, the necessary media and translation if any. I use bash script to do so. For inspiration you can have a look at Dr. Geo subversion repo[1] or iStoa launchpad repo[2]. The later one may be easier to follow as I gain some experience from Dr. Geo work. Once you setup this, building your application is easy. It is just a matter to update your ConfigurationOf. and executing your bash script.
2) How do I get the virtual image on the customer's machine. Keep in mind the customer is someone somewhere on the Internet who probably knows little about how to install Smalltalk or anything else. I am assuming here that installing the game and installing the VM are two different tasks. Is there a way to make this a single task?
No installing the game and VM will be done at the same time. You ship your application in a zip archive or auto-installable executable with VM, image, and related media, documentation and translation files.
3) So far I am assuming the target machine is Linux/Windows/Mac on a Desktop/Laptop. But can Smalltalk be run on any of the IPad/Notebook/etc out there? These machines represent a larger game market I believe.
Yes it is possible. Look at DrGeo on AppStore[3] and GooglePlay[4]. Sadly we do not have JIT support for these devices. Is it just a mater to support the ARM instruction set or much more complicated? I would be please to know. Any way for touch devices, you still have the two aspects of Smalltalk to consider: 1. The VM: it will be the interpreted VM, or COG without JIT support. Esteban and Dmitry were really helpful and collaboration was great to let me concentrate on the image level considerations below. 2. Your image. For point 2, you will have extra work, better to take it into account since the beginning of your project if you target touch device: a) no support for multiple touch, at least as far as I know. I read there and there people talking or doing things, but no real stuff. Anyway it is definitely not a show stopper: you can be ok with tap and dragging. But you need to consider it. b) support for the virtual keyboard, Esteban and Dmitry added hook to show or hide the touch device keyboard (see drgeo code with showVirtualkeyboard). In your GUI design, you need to be careful your text zone is not hidden by the virtual keyboard. Again it is resolvable. c) the numerous screen resolutions of the touch devices. For DrGeo and iStoa I took very different directions. Probably the most interesting for you will be the one I took for iStoa. The application window is a full screen morph with scaled bitmap. My bitmap are scaled for a Nexus5 screen resolution (~2500x1600), then graphics and font are downscaled according to the used screen device. I suggest you take a look at the Linux iStoa application and resize the window to see what is happening. Using Athens is definitely not an option now for 2 reasons: it is not supported yet by touch devices; as long as it is not used in Pharo itself, if you put in perspective delivering to end user you have to consider it as unstable. d) native look and feel: it was really a big concern -- the bigger in fact -- for DrGeo. For iStoa it is nearly irrelevant, but there are still some widgets around. Again games does use native widget, so it may be ok. For DrGeo I need to subclass a Pharo theme to remove window decorations, force dialog to be positioned on the top and centered and other details I forgot about. It looks pretty ok for me, but not for touch device users. I tried to share the experience and work on this point but without success[5].
4) Assuming I can arrange for my computer game (if I write it) to be installed are there memory/cpu usage issues that I need to worry about (the game itself will use a minimal of memory/cpu except for graphics which also is pretty reasonable). I am thinking here of IPads etc. For Desktops/Laptops there should be no problem. Download time and subsequent storage space is also a concern; remember the device is probably used for lots of other things so the amount of space allocated for games may be small compared to the space on the machine?
If your code and medias game are small, the image size will be a problem, not something that will prevent your application to work perfectly, but more a feeling of wasted resources. With Pharo1.4, I can shrink DrGeo image below 10MB, including DrGeo code. With Pharo3, I can't get below 16MB with (smaller) istoa code. It is really a deception, the new developer tools were not developed as loadable code. I guess it was too difficult to be done, although it was a promise (informal?) of the Pharo project when it start up. Again it is not a show stopper. Good work on your project, I will be happy to read about its progresses. Hilaire
5) Sorry for the redundancy if these questions have been asked before (which I am sure they have).
Thanks for any feedback; I am sure others are interested in this question too.
Ralph Boland
[1] https://gforge.inria.fr/scm/?group_id=1308 [2] http://bazaar.launchpad.net/~hilaire-fernandes/istoa/trunk/files/head:/build... [3] https://itunes.apple.com/us/app/dr.-geometry/id559858173?mt=8 [4] https://play.google.com/store/search?q=drgeo [5] http://forum.world.st/iOS-polymorph-theme-anyone-tt3557696.html -- Dr. Geo http://drgeo.eu
thanks hilaire! We will continue pushing Pharo to help you. Stef On 11/5/14 12:09, Hilaire Fernandes wrote:
Morning!
As several people mentioned it, I may have a few tips to share regarding developing educative applications with Pharo (you can read Squeak as well, but you may have a better support with Pharo if you want to target touch devices as well, I don't want to write the Squeakers are helpless -- not at all -- but it seems to me there are more experiences to bring Pharo applications on touch devices from A to Z -- from the developer to the consumer I mean).
You are a Smalltalker so you definitely know the related benefits to develop with Pharo, so no need to spend words on that. You also know your application will be portable to the three workstation operating systems, very easily as the VM are routinely compiled for these hosts.
To get an idea about how could look your end user application, I suggest you take a look at Dr.Geo - http://drgeo.eu for workstation and touch devices ; then also iStoa for Linux - https://launchpad.net/istoa/+download. These are packaged for end user. For Windows the installer could be improved with installed entry in the system menu.
1) I know I have to build a suitable executable but I have never done this. I have only written Smalltalk code that I then use. So how do I build such an image and how big is it (assume code for game is small (say 3000 lines of code)). To build the end user application, you will have to do it in two steps:
1. Prepare your image: install your source code and related source code package, set the state of the image, shrink your image and save it. You will use Metacello. I use smalltalk script for that.
2. Build your application package: you will use a pre set application hierarchy with the VM, icons, execution script if needed, etc and install your image, the necessary media and translation if any. I use bash script to do so.
For inspiration you can have a look at Dr. Geo subversion repo[1] or iStoa launchpad repo[2]. The later one may be easier to follow as I gain some experience from Dr. Geo work.
Once you setup this, building your application is easy. It is just a matter to update your ConfigurationOf. and executing your bash script.
2) How do I get the virtual image on the customer's machine. Keep in mind the customer is someone somewhere on the Internet who probably knows little about how to install Smalltalk or anything else. I am assuming here that installing the game and installing the VM are two different tasks. Is there a way to make this a single task? No installing the game and VM will be done at the same time. You ship your application in a zip archive or auto-installable executable with VM, image, and related media, documentation and translation files.
3) So far I am assuming the target machine is Linux/Windows/Mac on a Desktop/Laptop. But can Smalltalk be run on any of the IPad/Notebook/etc out there? These machines represent a larger game market I believe. Yes it is possible. Look at DrGeo on AppStore[3] and GooglePlay[4].
Sadly we do not have JIT support for these devices. Is it just a mater to support the ARM instruction set or much more complicated? I would be please to know.
Any way for touch devices, you still have the two aspects of Smalltalk to consider: 1. The VM: it will be the interpreted VM, or COG without JIT support. Esteban and Dmitry were really helpful and collaboration was great to let me concentrate on the image level considerations below. 2. Your image.
For point 2, you will have extra work, better to take it into account since the beginning of your project if you target touch device:
a) no support for multiple touch, at least as far as I know. I read there and there people talking or doing things, but no real stuff. Anyway it is definitely not a show stopper: you can be ok with tap and dragging. But you need to consider it.
b) support for the virtual keyboard, Esteban and Dmitry added hook to show or hide the touch device keyboard (see drgeo code with showVirtualkeyboard). In your GUI design, you need to be careful your text zone is not hidden by the virtual keyboard. Again it is resolvable.
c) the numerous screen resolutions of the touch devices. For DrGeo and iStoa I took very different directions. Probably the most interesting for you will be the one I took for iStoa. The application window is a full screen morph with scaled bitmap. My bitmap are scaled for a Nexus5 screen resolution (~2500x1600), then graphics and font are downscaled according to the used screen device. I suggest you take a look at the Linux iStoa application and resize the window to see what is happening.
Using Athens is definitely not an option now for 2 reasons: it is not supported yet by touch devices; as long as it is not used in Pharo itself, if you put in perspective delivering to end user you have to consider it as unstable.
d) native look and feel: it was really a big concern -- the bigger in fact -- for DrGeo. For iStoa it is nearly irrelevant, but there are still some widgets around. Again games does use native widget, so it may be ok. For DrGeo I need to subclass a Pharo theme to remove window decorations, force dialog to be positioned on the top and centered and other details I forgot about. It looks pretty ok for me, but not for touch device users. I tried to share the experience and work on this point but without success[5].
4) Assuming I can arrange for my computer game (if I write it) to be installed are there memory/cpu usage issues that I need to worry about (the game itself will use a minimal of memory/cpu except for graphics which also is pretty reasonable). I am thinking here of IPads etc. For Desktops/Laptops there should be no problem. Download time and subsequent storage space is also a concern; remember the device is probably used for lots of other things so the amount of space allocated for games may be small compared to the space on the machine? If your code and medias game are small, the image size will be a problem, not something that will prevent your application to work perfectly, but more a feeling of wasted resources.
With Pharo1.4, I can shrink DrGeo image below 10MB, including DrGeo code. With Pharo3, I can't get below 16MB with (smaller) istoa code. It is really a deception, the new developer tools were not developed as loadable code. I guess it was too difficult to be done, although it was a promise (informal?) of the Pharo project when it start up. Again it is not a show stopper.
Good work on your project, I will be happy to read about its progresses.
Hilaire
5) Sorry for the redundancy if these questions have been asked before (which I am sure they have).
Thanks for any feedback; I am sure others are interested in this question too.
Ralph Boland
[1] https://gforge.inria.fr/scm/?group_id=1308 [2] http://bazaar.launchpad.net/~hilaire-fernandes/istoa/trunk/files/head:/build... [3] https://itunes.apple.com/us/app/dr.-geometry/id559858173?mt=8 [4] https://play.google.com/store/search?q=drgeo [5] http://forum.world.st/iOS-polymorph-theme-anyone-tt3557696.html
Hi Hilaire, mornin'. Thanks for such a helpful, in-depth answer! You ask about support for ARM... answer below. On May 11, 2014, at 3:09 AM, Hilaire Fernandes <hilaire.fernandes@gmail.com> wrote:
Morning!
As several people mentioned it, I may have a few tips to share regarding developing educative applications with Pharo (you can read Squeak as well, but you may have a better support with Pharo if you want to target touch devices as well, I don't want to write the Squeakers are helpless -- not at all -- but it seems to me there are more experiences to bring Pharo applications on touch devices from A to Z -- from the developer to the consumer I mean).
You are a Smalltalker so you definitely know the related benefits to develop with Pharo, so no need to spend words on that. You also know your application will be portable to the three workstation operating systems, very easily as the VM are routinely compiled for these hosts.
To get an idea about how could look your end user application, I suggest you take a look at Dr.Geo - http://drgeo.eu for workstation and touch devices ; then also iStoa for Linux - https://launchpad.net/istoa/+download. These are packaged for end user. For Windows the installer could be improved with installed entry in the system menu.
1) I know I have to build a suitable executable but I have never done this. I have only written Smalltalk code that I then use. So how do I build such an image and how big is it (assume code for game is small (say 3000 lines of code)).
To build the end user application, you will have to do it in two steps:
1. Prepare your image: install your source code and related source code package, set the state of the image, shrink your image and save it. You will use Metacello. I use smalltalk script for that.
2. Build your application package: you will use a pre set application hierarchy with the VM, icons, execution script if needed, etc and install your image, the necessary media and translation if any. I use bash script to do so.
For inspiration you can have a look at Dr. Geo subversion repo[1] or iStoa launchpad repo[2]. The later one may be easier to follow as I gain some experience from Dr. Geo work.
Once you setup this, building your application is easy. It is just a matter to update your ConfigurationOf. and executing your bash script.
2) How do I get the virtual image on the customer's machine. Keep in mind the customer is someone somewhere on the Internet who probably knows little about how to install Smalltalk or anything else. I am assuming here that installing the game and installing the VM are two different tasks. Is there a way to make this a single task?
No installing the game and VM will be done at the same time. You ship your application in a zip archive or auto-installable executable with VM, image, and related media, documentation and translation files.
3) So far I am assuming the target machine is Linux/Windows/Mac on a Desktop/Laptop. But can Smalltalk be run on any of the IPad/Notebook/etc out there? These machines represent a larger game market I believe.
Yes it is possible. Look at DrGeo on AppStore[3] and GooglePlay[4].
Sadly we do not have JIT support for these devices. Is it just a mater to support the ARM instruction set or much more complicated? I would be please to know.
On iPhone Apple expressly forbid JITs other than their own so until that changes the fastest VM on iPhone will be the Stack VM. On Android JITs are allowed. Tim Rowledge is currently working on the Cog ARM back end which was started by Lars Wassermann, and is making good progress, working in the VM simulator. He is targeting the Raspberry Pi. I don't know whether he'll have time to port to Android, but I'm sure someone can. I don't want to talk for Tim but I expect he'll easily be finished this year. On a related tack, Doug McPherson has recently implemented the ARM support for Cog's FFI module, so there is now FFI support! And the Pharo team have taken on a person to work on AsmJIT for ARM. So at least on Android the Squeak/Pharo support will be good (although I expect more work is needed to provide good touch support). Hilaire, perhaps you can tell me whether touch support is OK or whether work needs to be done in the VM?
Any way for touch devices, you still have the two aspects of Smalltalk to consider: 1. The VM: it will be the interpreted VM, or COG without JIT support.
Cog without JIT support is called the Stack VM, (since it optimizes message sending by mapping contexts to stack frames). Soon (some time this year) we should have a Spur Stack VM which may be -35% to -40% faster.
Esteban and Dmitry were really helpful and collaboration was great to let me concentrate on the image level considerations below. 2. Your image.
For point 2, you will have extra work, better to take it into account since the beginning of your project if you target touch device:
a) no support for multiple touch, at least as far as I know. I read there and there people talking or doing things, but no real stuff. Anyway it is definitely not a show stopper: you can be ok with tap and dragging. But you need to consider it.
b) support for the virtual keyboard, Esteban and Dmitry added hook to show or hide the touch device keyboard (see drgeo code with showVirtualkeyboard). In your GUI design, you need to be careful your text zone is not hidden by the virtual keyboard. Again it is resolvable.
c) the numerous screen resolutions of the touch devices. For DrGeo and iStoa I took very different directions. Probably the most interesting for you will be the one I took for iStoa. The application window is a full screen morph with scaled bitmap. My bitmap are scaled for a Nexus5 screen resolution (~2500x1600), then graphics and font are downscaled according to the used screen device. I suggest you take a look at the Linux iStoa application and resize the window to see what is happening.
Using Athens is definitely not an option now for 2 reasons: it is not supported yet by touch devices; as long as it is not used in Pharo itself, if you put in perspective delivering to end user you have to consider it as unstable.
d) native look and feel: it was really a big concern -- the bigger in fact -- for DrGeo. For iStoa it is nearly irrelevant, but there are still some widgets around. Again games does use native widget, so it may be ok. For DrGeo I need to subclass a Pharo theme to remove window decorations, force dialog to be positioned on the top and centered and other details I forgot about. It looks pretty ok for me, but not for touch device users. I tried to share the experience and work on this point but without success[5].
4) Assuming I can arrange for my computer game (if I write it) to be installed are there memory/cpu usage issues that I need to worry about (the game itself will use a minimal of memory/cpu except for graphics which also is pretty reasonable). I am thinking here of IPads etc. For Desktops/Laptops there should be no problem. Download time and subsequent storage space is also a concern; remember the device is probably used for lots of other things so the amount of space allocated for games may be small compared to the space on the machine?
If your code and medias game are small, the image size will be a problem, not something that will prevent your application to work perfectly, but more a feeling of wasted resources.
With Pharo1.4, I can shrink DrGeo image below 10MB, including DrGeo code. With Pharo3, I can't get below 16MB with (smaller) istoa code. It is really a deception, the new developer tools were not developed as loadable code. I guess it was too difficult to be done, although it was a promise (informal?) of the Pharo project when it start up. Again it is not a show stopper.
Good work on your project, I will be happy to read about its progresses.
Hilaire
5) Sorry for the redundancy if these questions have been asked before (which I am sure they have).
Thanks for any feedback; I am sure others are interested in this question too.
Ralph Boland
[1] https://gforge.inria.fr/scm/?group_id=1308 [2] http://bazaar.launchpad.net/~hilaire-fernandes/istoa/trunk/files/head:/build... [3] https://itunes.apple.com/us/app/dr.-geometry/id559858173?mt=8 [4] https://play.google.com/store/search?q=drgeo [5] http://forum.world.st/iOS-polymorph-theme-anyone-tt3557696.html
-- Dr. Geo http://drgeo.eu
Best regards, Eliot (phone)
Le 11 mai 2014 17:22, "Eliot Miranda" <eliot.miranda@gmail.com> a écrit :
Hi Hilaire,
mornin'. Thanks for such a helpful, in-depth answer! You ask about
support for ARM... answer below.
On May 11, 2014, at 3:09 AM, Hilaire Fernandes <
hilaire.fernandes@gmail.com> wrote:
Morning!
As several people mentioned it, I may have a few tips to share regarding developing educative applications with Pharo (you can read Squeak as well, but you may have a better support with Pharo if you want to target touch devices as well, I don't want to write the Squeakers are helpless -- not at all -- but it seems to me there are more experiences to bring Pharo applications on touch devices from A to Z -- from the developer to the consumer I mean).
You are a Smalltalker so you definitely know the related benefits to develop with Pharo, so no need to spend words on that. You also know your application will be portable to the three workstation operating systems, very easily as the VM are routinely compiled for these hosts.
To get an idea about how could look your end user application, I suggest you take a look at Dr.Geo - http://drgeo.eu for workstation and touch devices ; then also iStoa for Linux - https://launchpad.net/istoa/+download. These are packaged for end user. For Windows the installer could be improved with installed entry in the system menu.
1) I know I have to build a suitable executable but I have never done this. I have only written Smalltalk code that I then use. So how do I build such an image and how big is it (assume code for game is small (say 3000 lines of code)).
To build the end user application, you will have to do it in two steps:
1. Prepare your image: install your source code and related source code package, set the state of the image, shrink your image and save it. You will use Metacello. I use smalltalk script for that.
2. Build your application package: you will use a pre set application hierarchy with the VM, icons, execution script if needed, etc and install your image, the necessary media and translation if any. I use bash script to do so.
For inspiration you can have a look at Dr. Geo subversion repo[1] or iStoa launchpad repo[2]. The later one may be easier to follow as I gain some experience from Dr. Geo work.
Once you setup this, building your application is easy. It is just a matter to update your ConfigurationOf. and executing your bash script.
2) How do I get the virtual image on the customer's machine. Keep in mind the customer is someone somewhere on the Internet who probably knows little about how to install Smalltalk or anything else. I am assuming here that installing the game and installing the VM are two different tasks. Is there a way to make this a single task?
No installing the game and VM will be done at the same time. You ship your application in a zip archive or auto-installable executable with VM, image, and related media, documentation and translation files.
3) So far I am assuming the target machine is Linux/Windows/Mac on a Desktop/Laptop. But can Smalltalk be run on any of the IPad/Notebook/etc out
there?
These machines represent a larger game market I believe.
Yes it is possible. Look at DrGeo on AppStore[3] and GooglePlay[4].
Sadly we do not have JIT support for these devices. Is it just a mater to support the ARM instruction set or much more complicated? I would be please to know.
On iPhone Apple expressly forbid JITs other than their own so until that changes the fastest VM on iPhone will be the Stack VM.
On Android JITs are allowed. Tim Rowledge is currently working on the Cog ARM back end which was started by Lars Wassermann, and is making good progress, working in the VM simulator. He is targeting the Raspberry Pi. I don't know whether he'll have time to port to Android, but I'm sure someone can. I don't want to talk for Tim but I expect he'll easily be finished this year.
On a related tack, Doug McPherson has recently implemented the ARM support for Cog's FFI module, so there is now FFI support! And the Pharo team have taken on a person to work on AsmJIT for ARM. So at least on Android the Squeak/Pharo support will be good (although I expect more work is needed to provide good touch support).
Hilaire, perhaps you can tell me whether touch support is OK or whether work needs to be done in the VM?
Any way for touch devices, you still have the two aspects of Smalltalk to consider: 1. The VM: it will be the interpreted VM, or COG without JIT support.
Cog without JIT support is called the Stack VM, (since it optimizes message sending by mapping contexts to stack frames). Soon (some time this year) we should have a Spur Stack VM which may be -35% to -40% faster.
Esteban and Dmitry were really helpful and collaboration was great to let me concentrate on the image level considerations below. 2. Your image.
For point 2, you will have extra work, better to take it into account since the beginning of your project if you target touch device:
a) no support for multiple touch, at least as far as I know. I read there and there people talking or doing things, but no real stuff. Anyway it is definitely not a show stopper: you can be ok with tap and dragging. But you need to consider it.
b) support for the virtual keyboard, Esteban and Dmitry added hook to show or hide the touch device keyboard (see drgeo code with showVirtualkeyboard). In your GUI design, you need to be careful your text zone is not hidden by the virtual keyboard. Again it is resolvable.
c) the numerous screen resolutions of the touch devices. For DrGeo and iStoa I took very different directions. Probably the most interesting for you will be the one I took for iStoa. The application window is a full screen morph with scaled bitmap. My bitmap are scaled for a Nexus5 screen resolution (~2500x1600), then graphics and font are downscaled according to the used screen device. I suggest you take a look at the Linux iStoa application and resize the window to see what is happening.
Using Athens is definitely not an option now for 2 reasons: it is not supported yet by touch devices; as long as it is not used in Pharo itself, if you put in perspective delivering to end user you have to consider it as unstable.
d) native look and feel: it was really a big concern -- the bigger in fact -- for DrGeo. For iStoa it is nearly irrelevant, but there are still some widgets around. Again games does use native widget, so it may be ok. For DrGeo I need to subclass a Pharo theme to remove window decorations, force dialog to be positioned on the top and centered and other details I forgot about. It looks pretty ok for me, but not for touch device users. I tried to share the experience and work on this point but without success[5].
4) Assuming I can arrange for my computer game (if I write it) to be installed are there memory/cpu usage issues that I need to worry about (the game itself will use a minimal of memory/cpu except for graphics which also is pretty reasonable). I am thinking here of IPads etc. For Desktops/Laptops there should be no problem. Download time and subsequent storage space is also a concern; remember the device is probably used for lots of other things so the amount of space allocated for games may be small compared to the space on the machine?
If your code and medias game are small, the image size will be a problem, not something that will prevent your application to work perfectly, but more a feeling of wasted resources.
With Pharo1.4, I can shrink DrGeo image below 10MB, including DrGeo code. With Pharo3, I can't get below 16MB with (smaller) istoa code. It is really a deception, the new developer tools were not developed as loadable code. I guess it was too difficult to be done, although it was a promise (informal?) of the Pharo project when it start up. Again it is not a show stopper.
Good work on your project, I will be happy to read about its progresses.
Hilaire
5) Sorry for the redundancy if these questions have been asked before (which I am sure they have).
Thanks for any feedback; I am sure others are interested in this question too.
Ralph Boland
http://bazaar.launchpad.net/~hilaire-fernandes/istoa/trunk/files/head:/build...
[3] https://itunes.apple.com/us/app/dr.-geometry/id559858173?mt=8 [4] https://play.google.com/store/search?q=drgeo [5] http://forum.world.st/iOS-polymorph-theme-anyone-tt3557696.html
-- Dr. Geo http://drgeo.eu
Best regards, Eliot (phone)
I've had Pharo running on the iPad. Once the VM and the app- wrapping works, a key benefit is that the image is just a file to drop in the resources folder. And being able to develop on the desktop and use the image as-is on the mobile device is really a great time saver. You will have to test for the morph stepping on order to have a nice feel. Graphics and sound do work fine on iOS. I am surprised that the tools in the new Pharo are not unloadable. That's bad for image size. People look at app size and anything large has a risk of being avoided for casual apps. AAA games are gigabytes in size but that is the exception to the rule. Phil
Good evening, Le 11/05/2014 17:21, Eliot Miranda a écrit :
Hilaire, perhaps you can tell me whether touch support is OK or whether work needs to be done in the VM?
I don't really know regarding the VM. I remember Bert did some experiment with multitouch on Etoys, but I can't tell if it was a temporary VM hack for iOS or something more structured for different multitouch devices. For sure works is needed at the image level to accommodate the widget to multitouch. Hilaire -- Dr. Geo http://drgeo.eu
Le 11/05/2014 17:21, Eliot Miranda a écrit :
On iPhone Apple expressly forbid JITs other than their own so until that changes the fastest VM on iPhone will be the Stack VM.
When the iPad came out, I remember about anxiety in the community deploying Smalltalk application will be rejected by Apple... Hilaire -- Dr. Geo http://drgeo.eu
Probably x86 windows tablets don't have the larges market share, but developing and running Pharo on them is equally easy than doing the same on a desktop computer. You can run the same x86 VM with JIT support and it runs fast. I tried PharoDroid before on an Android tablet but it was lot slower. Proper touch support is missing, but developing on a tablet with an external keyboard + mouse is possible. -- View this message in context: http://forum.world.st/developing-games-in-Pharo-tp4758592p4758725.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (11)
-
Attila Magyar -
Clément Bera -
Eliot Miranda -
Esteban Lorenzano -
Garth Holland -
Hilaire Fernandes -
kilon alios -
phil@highoctane.be -
Ralph Boland -
Ronie Salgado -
stepharo