OSWindowSDL2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

OSWindowSDL2

Edwin Ancaer
I'm not a smalltalk expert, but from time to time I like to do some experiments.
 
Recently, we talked about making a small 2D-Game, to do something else than  a traditional CRUD database application.
 
I downloaded  pharo 4.0 for Linux (the default version).  My OS version is 3.13.0-46-generic #79-Ubuntu:

Then I installed SDL2 with apt-get. All seemed to he OK.

I started pharo, and executed  the following code in the playground:

|ex |
ex := SDL2Example new .
ex osWindow .

I got an error: Failed to find SDL2 library.
,
Should I have been doing some extra initialization to load the library in Pharo, or is there something else that I forgot to do?

Kind regards

Edwin

Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

Ben Coman
Maybe the SDL version installed was 64-bit, and you need to 32-bit one.

Try something like
    sudo apt-get install  $LIB:i386

I presume...
$ sudo dpkg --add-architecture i386
is already done.

cheers -ben

On Sun, Jan 24, 2016 at 5:45 AM, Edwin Ancaer <[hidden email]> wrote:

> I'm not a smalltalk expert, but from time to time I like to do some
> experiments.
>
> Recently, we talked about making a small 2D-Game, to do something else than
> a traditional CRUD database application.
>
> I downloaded  pharo 4.0 for Linux (the default version).  My OS version is
> 3.13.0-46-generic #79-Ubuntu:
>
> Then I installed SDL2 with apt-get. All seemed to he OK.
>
> I started pharo, and executed  the following code in the playground:
>
> |ex |
> ex := SDL2Example new .
> ex osWindow .
>
> I got an error: Failed to find SDL2 library.
> ,
> Should I have been doing some extra initialization to load the library in
> Pharo, or is there something else that I forgot to do?
>
> Kind regards
>
> Edwin
>

Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

stepharo
In reply to this post by Edwin Ancaer
the support for SDL2.0 should be better in Pharo50 (even if due to ffi
changes and new objcte format we may have some
glitches).


Le 23/1/16 22:45, Edwin Ancaer a écrit :
> I'm not a smalltalk expert, but from time to time I like to do some
> experiments.
>
> Recently, we talked about making a small 2D-Game, to do something else
> than  a traditional CRUD database application.

cool
you can ask clement bera because he did a bomberman using SDL2 now I
guess that it was in Pharo 50.

>
> I downloaded  pharo 4.0 for Linux (the default version).  My OS
> version is 3.13.0-46-generic #79-Ubuntu:
>
> Then I installed SDL2 with apt-get. All seemed to he OK.
>
> I started pharo, and executed  the following code in the playground:
>
> |ex |
> ex := SDL2Example new .
> ex osWindow .
>
> I got an error: Failed to find SDL2 library.
> ,
> Should I have been doing some extra initialization to load the library
> in Pharo, or is there something else that I forgot to do?
>
> Kind regards
>
> Edwin
>


Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

Clément Béra
Yeah I did in in early version of Pharo 5 (50155).

2016-01-24 10:10 GMT+01:00 stepharo <[hidden email]>:
the support for SDL2.0 should be better in Pharo50 (even if due to ffi changes and new objcte format we may have some
glitches).


Le 23/1/16 22:45, Edwin Ancaer a écrit :
I'm not a smalltalk expert, but from time to time I like to do some experiments.

Recently, we talked about making a small 2D-Game, to do something else than  a traditional CRUD database application.

cool
you can ask clement bera because he did a bomberman using SDL2 now I guess that it was in Pharo 50.


I downloaded  pharo 4.0 for Linux (the default version).  My OS version is 3.13.0-46-generic #79-Ubuntu:

Then I installed SDL2 with apt-get. All seemed to he OK.

I started pharo, and executed  the following code in the playground:

|ex |
ex := SDL2Example new .
ex osWindow .

I got an error: Failed to find SDL2 library.
,
Should I have been doing some extra initialization to load the library in Pharo, or is there something else that I forgot to do?

Kind regards

Edwin




Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

Edwin Ancaer
I downloaded Pharo5.

Re-executing

| ex |
ex := SDL2Example new.
ex osWindow.

now gives :

Subclassresponsability: SDL class has the responsability to implment #f

in the method

ffiLibraryName
    self flag: 'HACK: avoid direct subclassResponsibility to not break RB test cases..'.
    ^ SubclassResponsibility signalFor: thisContext selector

Seems like I should have implemeted something myself.

Can any one point me in the right direction?

2016-01-24 10:39 GMT+01:00 Clément Bera <[hidden email]>:
Yeah I did in in early version of Pharo 5 (50155).

2016-01-24 10:10 GMT+01:00 stepharo <[hidden email]>:
the support for SDL2.0 should be better in Pharo50 (even if due to ffi changes and new objcte format we may have some
glitches).


Le 23/1/16 22:45, Edwin Ancaer a écrit :
I'm not a smalltalk expert, but from time to time I like to do some experiments.

Recently, we talked about making a small 2D-Game, to do something else than  a traditional CRUD database application.

cool
you can ask clement bera because he did a bomberman using SDL2 now I guess that it was in Pharo 50.


I downloaded  pharo 4.0 for Linux (the default version).  My OS version is 3.13.0-46-generic #79-Ubuntu:

Then I installed SDL2 with apt-get. All seemed to he OK.

I started pharo, and executed  the following code in the playground:

|ex |
ex := SDL2Example new .
ex osWindow .

I got an error: Failed to find SDL2 library.
,
Should I have been doing some extra initialization to load the library in Pharo, or is there something else that I forgot to do?

Kind regards

Edwin





Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

EstebanLM
yes, SDL2 is still not migrated (we changed FFI infrastructure).
I already have the fix, but I didn’t have the time to integrate it :(

Esteban


On 24 Jan 2016, at 18:24, Edwin Ancaer <[hidden email]> wrote:

I downloaded Pharo5.

Re-executing

| ex |
ex := SDL2Example new.
ex osWindow.

now gives :

Subclassresponsability: SDL class has the responsability to implment #f

in the method

ffiLibraryName
    self flag: 'HACK: avoid direct subclassResponsibility to not break RB test cases..'.
    ^ SubclassResponsibility signalFor: thisContext selector

Seems like I should have implemeted something myself.

Can any one point me in the right direction?

2016-01-24 10:39 GMT+01:00 Clément Bera <[hidden email]>:
Yeah I did in in early version of Pharo 5 (50155).

2016-01-24 10:10 GMT+01:00 stepharo <[hidden email]>:
the support for SDL2.0 should be better in Pharo50 (even if due to ffi changes and new objcte format we may have some
glitches).


Le 23/1/16 22:45, Edwin Ancaer a écrit :
I'm not a smalltalk expert, but from time to time I like to do some experiments.

Recently, we talked about making a small 2D-Game, to do something else than  a traditional CRUD database application.

cool
you can ask clement bera because he did a bomberman using SDL2 now I guess that it was in Pharo 50.


I downloaded  pharo 4.0 for Linux (the default version).  My OS version is 3.13.0-46-generic #79-Ubuntu:

Then I installed SDL2 with apt-get. All seemed to he OK.

I started pharo, and executed  the following code in the playground:

|ex |
ex := SDL2Example new .
ex osWindow .

I got an error: Failed to find SDL2 library.
,
Should I have been doing some extra initialization to load the library in Pharo, or is there something else that I forgot to do?

Kind regards

Edwin






Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

Edwin Ancaer

No problem. We will postpone the SDL experiment.

Traditions must be respected: we will try  a small DB-application in the mean time. And after the first tries for the screen layouts, it seems there is no hurry...

Thanks already for your responses

Edwin

Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

Stephan Eggermont-3
In reply to this post by Edwin Ancaer
On 24-01-16 18:24, Edwin Ancaer wrote:
> I downloaded Pharo5.

You want to try this first with a non-spur pharo5.
(50496, e.g. from files.pharo.org/image/50-preSpur)
The current work on FFI is not yet announced to be
finished

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

Edwin Ancaer

Do i need a specific version of the vm for this, or can i use the one in pharo5.0?

On Jan 24, 2016 7:36 PM, "Stephan Eggermont" <[hidden email]> wrote:
On 24-01-16 18:24, Edwin Ancaer wrote:
I downloaded Pharo5.

You want to try this first with a non-spur pharo5.
(50496, e.g. from files.pharo.org/image/50-preSpur)
The current work on FFI is not yet announced to be
finished

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

stepharo
Hi edwin

if you use a prespur image you should get a pre-spur VM
Check
    http://pharo.org/download
You will get the latest pre-spur VM and image.
Once esteban is done fixing the SDL in the latest Pharo you will be able to use
the latest vm.

Stef

Le 24/1/16 21:56, Edwin Ancaer a écrit :

Do i need a specific version of the vm for this, or can i use the one in pharo5.0?

On Jan 24, 2016 7:36 PM, "Stephan Eggermont" <[hidden email]> wrote:
On 24-01-16 18:24, Edwin Ancaer wrote:
I downloaded Pharo5.

You want to try this first with a non-spur pharo5.
(50496, e.g. from files.pharo.org/image/50-preSpur)
The current work on FFI is not yet announced to be
finished

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: OSWindowSDL2

Edwin Ancaer
Sorry guys,

now I'm geting Error: Could not find accessor for variable named "flags" in SDL2 class>>#init:.

I will watch out for the announcement of the official 5.0 version.

Thanks,

Edwin

2016-01-24 22:09 GMT+01:00 stepharo <[hidden email]>:
Hi edwin

if you use a prespur image you should get a pre-spur VM
Check
    http://pharo.org/download
You will get the latest pre-spur VM and image.
Once esteban is done fixing the SDL in the latest Pharo you will be able to use
the latest vm.

Stef

Le 24/1/16 21:56, Edwin Ancaer a écrit :

Do i need a specific version of the vm for this, or can i use the one in pharo5.0?

On Jan 24, 2016 7:36 PM, "Stephan Eggermont" <[hidden email]> wrote:
On 24-01-16 18:24, Edwin Ancaer wrote:
I downloaded Pharo5.

You want to try this first with a non-spur pharo5.
(50496, e.g. from files.pharo.org/image/50-preSpur)
The current work on FFI is not yet announced to be
finished

Stephan