Thanks,
leo
Am Sonntag, 29. Februar 2004 11:47 schrieb Leopold Toetsch:
> I'm currently preparing 0.1.0, so please no changes to CVS until further
> ntice.
Here is the tetris example, include it if you want...
> Thanks,
> leo
jens
Sorry, too late. Next time.
> jens
leo
> Here is the tetris example, include it if you want...
I've now tested it a bit. Looks really good and works - mostly :)
- it tries to load SDL_Image, albeit this seems to be unused
- some blocks are dropping down invisibly
- it doesn't recognize a "game over" situation
- some <q>uit key handling would be nice.
Despite that its a great application and a very good example:
# create the tetris app
app = _Tetris::App::new()
# init the tetris app
ret = _Tetris::App::init( app )
This code looks darned good.
> jens
leo
> Hi,
>
> Am Dienstag, 2. März 2004 10:48 schrieb Leopold Toetsch:
>>- some blocks are dropping down invisibly
>>
> Which blocks?
It was the red (color=4) one, which vanished on my notebook, especially
when it got darkened after dropping down.
> Parrot's object support is not yet good enough to be able to convert the game
> to use ParrotObjects.
What is missing?
leo
Am Dienstag, 2. März 2004 10:48 schrieb Leopold Toetsch:
> Jens Rieks <par...@jensbeimsurfen.de> wrote:
> > Hi leo,
> >
> > Here is the tetris example, include it if you want...
>
> I've now tested it a bit. Looks really good and works - mostly :)
> - it tries to load SDL_Image, albeit this seems to be unused
I will add support for textured blocks when the object orientated
SDL interface is working.
> - some blocks are dropping down invisibly
Which blocks?
> - it doesn't recognize a "game over" situation
Yep, to be done. A two player mode is also available,
F1 starts a single, F2 a two player game.
They are just two distinct boards with no interaction yet.
> - some <q>uit key handling would be nice.
escape or alt-f4. A former version also supported Q, but
now W/S/A/D/LSHIFT is used as the second player's controls.
I will change this too, as the right controls are for the left board
at the moment, and wise versa.
> Despite that its a great application and a very good example:
>
> # create the tetris app
> app = _Tetris::App::new()
>
> # init the tetris app
> ret = _Tetris::App::init( app )
>
> This code looks darned good.
Thanks a lot :-)
Parrot's object support is not yet good enough to be able to convert the game
to use ParrotObjects.
The documentation is also not finished yet, the i386 JIT set_i_n bug took a
lot of time (no block with the highest id occured when running JIT)...
I acted on the assumption that the release will be one day later.
> > jens
>
> leo
jens
Am Dienstag, 2. März 2004 17:19 schrieb Dan Sugalski:
> At 5:13 PM +0100 3/2/04, Leopold Toetsch wrote:
> >>Parrot's object support is not yet good enough to be able to
> >>convert the game to use ParrotObjects.
> >
> >What is missing?
>
> Constructors and destructors are my two big guesses here. :-P
Mainly imcc support for method calling, but constructors too.
Another nice-to-have is "hidden method calling" for array and
hash-like access to objects.
The Board "class" is currently just an array, but the element access
can of course be replaced with direct method calls.
from pdd 15:
: instantiate Px, Py, Sz (Unimplemented)
: Instantiate a brand new class, based on the metadata
: in Py, named Sz.
I think I have missread this last time. What it is op supposed to do?
How can I create an object of class the "Block"?
jens
> from pdd 15:
> : instantiate Px, Py, Sz (Unimplemented)
> : Instantiate a brand new class, based on the metadata
> : in Py, named Sz.
> I think I have missread this last time. What it is op supposed to do?
>
> How can I create an object of class the "Block"?
newclass P1, "Block" # Creates a "Block" class
find_type I0, "Block" # Gets Parrot's internal index no. for the
# "Block" class
new P2, I0 # Creates an object in that class
This really needs to be spelled out better in the PDD -- it is mentioned
in an example, but I don't think it's covered in the discussion of
object-related opcodes.
NB. The code above just creates the object -- you still need to init.
the data by hand.
Simon
Hopefully in the next day or two.
>Another nice-to-have is "hidden method calling" for array and
>hash-like access to objects.
>The Board "class" is currently just an array, but the element access
>can of course be replaced with direct method calls.
As soon as I can abuse pmc2c2.pl sufficiently then this'll be doable.
>from pdd 15:
>: instantiate Px, Py, Sz (Unimplemented)
>: Instantiate a brand new class, based on the metadata
>: in Py, named Sz.
>I think I have missread this last time. What it is op supposed to do?
>
>How can I create an object of class the "Block"?
find_type $I0, "Block"
new $P0, $I0
should do it.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
Constructors and destructors are my two big guesses here. :-P