Hi Stef,

A complete port of the SDL capabilities (http://wiki.libsdl.org/Introduction) will be super nice (audio) and improved stability.

For your students, the perspective on the game is likely 2 months, may be 6 months; you know I have longer perspective - DrGeo was slowly developed and crafted for 20 years; therefore stability on the code is very important for me as I will have to work over long period. That's the reason I don't fell at ease relying on many code layers. For your students, as the horizon is counted in months it is a null consideration, not for me. Not to mention there are uncertainty over this layers. Moreover these layers will make hard to my student to understand what's going on, if they want to dig in.

I am not sure how far will get me this reflexion, but for my students, I can imagine different models of 2D games: board games, horizontal/vertical scrolling games, isometric games. Each one can be optimized differently. Banks of sprites and audio will be already there to get started the students. The models will encapsulate SDL, as PyGame is doing, but still easilly accessible.

I imagine such an environment to rely only on two layers: SDL and spec, the later if some dedicated user interface is needed for the game designer; but a lot should happen in the class browser.

I found this Python PyGame code bellow rather easy to understand. Will it be possible to produce an equally understandable Smalltalk code with the layers your are proposing?

importsys,pygamepygame.init()size=width,height=320,240speed=[2,2]black=0,0,0screen=pygame.display.set_mode(size)ball=pygame.image.load("ball.bmp")ballrect=ball.get_rect()while1:foreventinpygame.event.get():ifevent.type==pygame.QUIT:sys.exit()ballrect=ballrect.move(speed)ifballrect.left<0orballrect.right>width:speed[0]=-speed[0]ifballrect.top<0orballrect.bottom>height:speed[1]=-speed[1]screen.fill(black)screen.blit(ball,ballrect)pygame.display.flip()


Hilaire

Your time stamp bellow is a strike! ;)
   vvvvvvvvvvvvvvvvvvvvvv

Le 01/01/2018 à 00:00, Stephane Ducasse a écrit :
Hi hilaire

Some students at Prague are working on different 2D games with Bloc
and this is working.
Some did a sokoban, other a miner (check on pharo weekly).

They use Bloc and I will ask them to make public their code.
No need for SDL. SDL is ***low level***.

Now modeling the board and proposing some abstractions that can be
easily extended is difficult.
and this is what lauraMaximilliano did in MetaBorg.

It was on my todo to do a pass. I implemented a grid to help the
design of board game.
Now having direction/location can be good.

What is interesting in the design of metaborg is that we do not test
if an object can move to
a place. We go to the place and the place pull the item.
A wall will not pull for example while a empty slot will pull the item to move.

I found it intriguing and I would like to know if this is working for
more complex situation.

Maximiliano implemented sokoban, tetris, snake, pacman with the same framwork.
Now it is a bit abstract but an interesting experience.


Stef

On Sun, Dec 31, 2017 at 2:41 PM, Hilaire<[email protected]>  wrote:
I am*exploring*  if Pharo will be suitable to have a simple programming
environment to let kids write simple 2D games, SDL was designed for that.

Some of my students asked me about programming games, Smalltalk way of
writing code will be neat, but the environment need to be accessible and not
over engineered.


Le 30/12/2017 à 22:32, Stephane Ducasse a écrit :
What kind of game are you targeting? Did you look at Bloc? Because to
me this is the way to go except if you want just a canvas
and reimplement your event loop. in that case SDL + Athens should work.
--
Dr. Geo
http://drgeo.eu




--
Dr. Geo
http://drgeo.eu



Reply via email to