On Mon, Sep 25, 2017 at 2:33 AM, J.F. Rick <s...@je77.com> wrote: > Hi Clement and and Stef, > > thanks for sharing. The video looks cool and it seems like a > high-performance approach. Unfortunately, it doesn't seem to be working in > Linux. I'm attaching the Pharo debug file, but it seems like the Handler > being OSNullWindowHandle indicates a problem. I'm also not sure that this > approach would allow me to do fullscreen apps. I noticed that your video > shows a title bar in MacOS. > > I've never made the demo work on linux, I am not surprised it doesn't work. This demo is based on the Pharo 4 OSWindow version, and more recent versions are working fine on linux.
About fullscreen as I said in the previous mail it is possible to enable it, I tried it worked, but I did not do it as I don't think it make sense with this game. I will consider in the future making it work on the latest Pharo version on multiple OS if it makes sense to show people how to do it. I'm busy with other concerns right now. Anyway, it's just one approach, you can use another one. > Cheers, > > Jeff > > > > > > On Sun, Sep 24, 2017 at 7:53 AM Clément Bera <bera.clem...@gmail.com> > wrote: > >> Hi, >> >> I describe in the next paragraphs what I do to build application with >> Pharo at 50 fps. Now I am using a SDL2 window with OSWindow and not the >> default Pharo window for rendering. There is a fullscreen option with >> OSWindow, I don't use it but I've just tried it works fine. >> >> To use Athens/Cairo I start the VM headless and I open from the code a >> window using the SDL2 binding (OSWindow), then I extract the window surface >> as a cairo surface to draw on it using Athens and I use SDL2 to manage >> events (mouse, keyboard). That way I don't even start morphic/WorldMorph >> which wastes cpu ressources. >> >> I built this video game that way: >> https://clementbera.wordpress.com/2016/08/29/sdl2-cairo- >> headless-for-realtime-native-applications/ >> https://www.youtube.com/watch?v=srPdFgbyS6s >> >> The game is running in Pharo 4 (pre-Spur). I configured it to run at 50 >> fps but from time to time some frames are dropped for performance so I >> would say it is running at around 48-49 fps in practice. I think it should >> work on the latest Pharo but you need to ask on pharo-dev how to use >> OSWindow. Some APIs have changed since Pharo 4. Since the latest Pharo >> version is now using Spur I expect the performance to be way better and I >> think 50 fps is definitely manageable on a laptop. >> >> Note that this is still Pharo so if you want something which looks >> real-time you need to be careful about you object allocation rate >> in-between frame rendering. >> >> I hope this can help. >> >> Regards >> >> >> >> On Sun, Sep 24, 2017 at 9:43 AM, Stephane Ducasse < >> stepharo.s...@gmail.com> wrote: >> >>> Hi jeff >>> >>> let us know if this is working. the start.sh script is not working on >>> my machine. but clement made it worked on his machine and he should >>> publish a zip. >>> >>> Stef >>> >>> >>> >>> On Sun, Sep 24, 2017 at 9:39 AM, Stephane Ducasse >>> <stepharo.s...@gmail.com> wrote: >>> > Yes I will share a dropbox with you for now. >>> > >>> > On Sat, Sep 23, 2017 at 9:44 PM, J.F. Rick <s...@je77.com> wrote: >>> >> Hi Stef, >>> >> >>> >> since I'm only doing Athens rendering, it might be possible to do a >>> native >>> >> window implementation. That said, I don't know how to get started >>> with that. >>> >> Documentation seems to be hard to find. The last time I saw any work >>> on that >>> >> it was too early to be usable. I'm also not sure if it solves my "it >>> needs >>> >> to run in fullscreen at full speed" problem. If someone like Clement >>> could >>> >> get me started, that would be awesome. >>> >> >>> >> Cheers, >>> >> >>> >> Jeff >>> >> >>> >> On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse < >>> stepharo.s...@gmail.com> >>> >> wrote: >>> >>> >>> >>> Hi Jeff >>> >>> >>> >>> Nice to see you. I do not know anybody running on X11. Esteban is >>> >>> working on better SDL20 integration. >>> >>> Did you try having a native window? I asked clement if he could >>> >>> release the Wizard Battle Arena because it was a game he did in a >>> >>> couple of days (yes he is good this guy) and that use cairo athens >>> >>> based for drawing on native window. >>> >>> >>> >>> stef >>> >>> >>> >>> On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <s...@je77.com> wrote: >>> >>> > I'm running a fullscreen Pharo application on Ubuntu and I've >>> noticed >>> >>> > that >>> >>> > Athens rendering gets way worse (maybe 10 updates per second) when >>> I >>> >>> > switch >>> >>> > to fullscreen mode from inside Pharo. Ideally, I'd love for that >>> to be >>> >>> > fixed. >>> >>> > >>> >>> > In lieu of that, it would be cool if I could just maximize Pharo >>> to the >>> >>> > size >>> >>> > of the screen to achieve good performance. Two things stop that: >>> the >>> >>> > Unity >>> >>> > application bar and the title-bar. For the former, I can configure >>> Unity >>> >>> > to >>> >>> > hide it. I noticed a '-notitle' X11 option when I execute pharo >>> -help. >>> >>> > I've >>> >>> > tried using these X11 options and neither -notitle or -fullscreen >>> seem >>> >>> > to >>> >>> > have any effect. Here's the command I run: >>> >>> > >>> >>> > ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen >>> PATH_TO_IMAGE & >>> >>> > >>> >>> > Pharo starts fine but neither option seems to have any effect. >>> I've also >>> >>> > tried this in GNOME, thinking that Unity was the problem. Again, no >>> >>> > effect. >>> >>> > >>> >>> > Any suggestions? >>> >>> > >>> >>> > Jeff >>> >>> > >>> >>> > >>> >>> >>> >> >>> >>> >>