Re: Spring 2016 Lisp Game Jam

2016-04-22 Thread Jakob Eriksson


On 22/04/16 10:27, Robert Herman wrote:
> 
> I am really looking to use miniPicoLisp as the game framework, only leaning
> on SDL2.0 or CSFML as the engine underneath to deal with keyboard i/o,
> event handling, sound, graphics and networking. I guess maybe it's the same
> thing?

I'd say I meant that. :)

// Jakob
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-22 Thread Robert Herman
I have used 8th programming language [1], a Forth, where the same code
compiles to Linux, Windows, Android, OS X and iOS. SDL2 is on all
platforms, and there are games made with it, so maybe the same could be
done for PicoLisp. The Red Language libs and all is under 1mb [2], and it
too is targeting multi-platform, so I think there is a niche for PicoLisp
here too.

Rob

  [1]  http://8th-dev.com/
  [2]  http://www.red-lang.org/

On 22 April 2016 at 15:27, Robert Herman  wrote:

> At first, I only wish to create something quick, so I am ready for the
> game jam. I can add platforms or polish later. I think what you are
> suggesting is embedding miniPicoLisp as a scripting language, if I
> understand you and PicoLisp correclty.
>
> I am really looking to use miniPicoLisp as the game framework, only
> leaning on SDL2.0 or CSFML as the engine underneath to deal with keyboard
> i/o, event handling, sound, graphics and networking. I guess maybe it's the
> same thing?
>
> Rob
>
> On 22 April 2016 at 15:18, Jakob Eriksson  wrote:
>
>>
>> I'd say it's rather simple to embed minipico into any framework
>> which can be used with plain C.  So that should open up Android
>> and iOS too. Although never underestimate the practical troubles
>> with compiling on 4 platforms if you are only one developer. :)
>>
>> Been there, done that. :)
>>
>> // Jakob
>>
>>
>> On 22/04/16 04:24, Robert Herman wrote:
>> > All true Alex and Jakob.
>> >
>> > I am not trying to develop something professional, so that leaves me two
>> > choices:
>> >
>> > 1. Implement a very simple framework, and handcraft all of the
>> > requirements it in miniPicoLisp (thx Christophe! I had put it aside for
>> > a year and forgot) that wraps SDL2, which is C-based, and then I can
>> > distribute the miniPicoLisp executable for the target platform (Windows,
>> > Linux, Mac) with the SDL2.dll or .SDL2.a and other data files (.jpg, ogg
>> > or .wav, etc...).
>> >
>> >   * This is a perfect real world example of this path. A guy whose
>> > handle is rxi on itch.io  and Twitter created a
>> > "Lisp-shaped" language called aria, and then did a jam with it in a
>> > final game called pulsr. Aria is very minimal - no vectors or hash
>> > maps, only lists, but supports lambdas, macros, has a garbage
>> > collector and a C api:
>> >   o https://rxi.itch.io/pulsr
>> >   o https://github.com/rxi/ari
>> >   o You can download both, build aria, and then extract pulsr. In
>> > pulsr there is a folder called pak0. Add .tar.gz to the end of
>> > the folder name (pak0.tar.gz), and extract it. You will then
>> > have a folder with the source to the game. Delete the pak0
>> > folder or move it, since the pulsr exe will try and execute that
>> > first (per rxi, I haven't tested it).
>> >   o He basically modularized his framework in a lot of files. No
>> > criticism from me, but I would like to base mine on a more
>> > traditional frame, or skeleton for doing future jams.
>> >   o miniPicoLisp should work. No multi-player without networking,
>> > and no db to hold entity structures like maps or characters, but
>> > SDL2 has all of the input/keyboard handling, graphics and sound
>> > covered for you. So maybe simply wrapping SDL2 and creating a
>> > better structure or framework?
>> >
>> > 2.  Copy an existing JS game framework (Phaser), and make it
>> > programmable in PicoLisp proper, and just export JS/HTML5/CSS. You have
>> > done a lot of the work on this already, I believe.
>> >
>> > I am favoring option 1, and not distributing to Android and iOS for now.
>> > I see option 2 as a viable future path. I also prefer CSFML over SDL2.
>> > SFML (C++ - based) is another media/game library, and CSFML is the
>> > official C port of it. But, SDL is very popular and easy to find a lot
>> > of tutorials online. With game jams and small stuff, C is preferable
>> > over C++. SDL1.2 (old), and SDL2 are both C-based.
>> >
>> > Would the OpenGL wrapper in PicoLisp work in miniPicoLisp, or not due to
>> > floats, or big nums, and what else would I need to add to miniPicoLisp
>> > to allow it to do so? The goal is to stay neutral, no Posix
>> requirements.
>> >
>> > I have a few days off coming up, and I am going to start on option 1. I
>> > will put it up on Github if I get anywhere next week. Only 7 days and 1
>> > hour until the LGJ!
>> >
>> > Rob
>> >
>> > PS: I have reposted this, since I left the subject off the last time I
>> > hit Send, and I did not see it on the list. Forgive any unintended
>> > double posts. Thanks.
>> >
>> > On 20 April 2016 at 13:23, Jakob Eriksson > > > wrote:
>> >
>> > Actually, I find that you can statically link most libraries on
>> > Linux and that tends to remove almost all distribution problems.
>> >
>> > 

Re: Spring 2016 Lisp Game Jam

2016-04-22 Thread Robert Herman
At first, I only wish to create something quick, so I am ready for the game
jam. I can add platforms or polish later. I think what you are suggesting
is embedding miniPicoLisp as a scripting language, if I understand you and
PicoLisp correclty.

I am really looking to use miniPicoLisp as the game framework, only leaning
on SDL2.0 or CSFML as the engine underneath to deal with keyboard i/o,
event handling, sound, graphics and networking. I guess maybe it's the same
thing?

Rob

On 22 April 2016 at 15:18, Jakob Eriksson  wrote:

>
> I'd say it's rather simple to embed minipico into any framework
> which can be used with plain C.  So that should open up Android
> and iOS too. Although never underestimate the practical troubles
> with compiling on 4 platforms if you are only one developer. :)
>
> Been there, done that. :)
>
> // Jakob
>
>
> On 22/04/16 04:24, Robert Herman wrote:
> > All true Alex and Jakob.
> >
> > I am not trying to develop something professional, so that leaves me two
> > choices:
> >
> > 1. Implement a very simple framework, and handcraft all of the
> > requirements it in miniPicoLisp (thx Christophe! I had put it aside for
> > a year and forgot) that wraps SDL2, which is C-based, and then I can
> > distribute the miniPicoLisp executable for the target platform (Windows,
> > Linux, Mac) with the SDL2.dll or .SDL2.a and other data files (.jpg, ogg
> > or .wav, etc...).
> >
> >   * This is a perfect real world example of this path. A guy whose
> > handle is rxi on itch.io  and Twitter created a
> > "Lisp-shaped" language called aria, and then did a jam with it in a
> > final game called pulsr. Aria is very minimal - no vectors or hash
> > maps, only lists, but supports lambdas, macros, has a garbage
> > collector and a C api:
> >   o https://rxi.itch.io/pulsr
> >   o https://github.com/rxi/ari
> >   o You can download both, build aria, and then extract pulsr. In
> > pulsr there is a folder called pak0. Add .tar.gz to the end of
> > the folder name (pak0.tar.gz), and extract it. You will then
> > have a folder with the source to the game. Delete the pak0
> > folder or move it, since the pulsr exe will try and execute that
> > first (per rxi, I haven't tested it).
> >   o He basically modularized his framework in a lot of files. No
> > criticism from me, but I would like to base mine on a more
> > traditional frame, or skeleton for doing future jams.
> >   o miniPicoLisp should work. No multi-player without networking,
> > and no db to hold entity structures like maps or characters, but
> > SDL2 has all of the input/keyboard handling, graphics and sound
> > covered for you. So maybe simply wrapping SDL2 and creating a
> > better structure or framework?
> >
> > 2.  Copy an existing JS game framework (Phaser), and make it
> > programmable in PicoLisp proper, and just export JS/HTML5/CSS. You have
> > done a lot of the work on this already, I believe.
> >
> > I am favoring option 1, and not distributing to Android and iOS for now

Re: Spring 2016 Lisp Game Jam

2016-04-22 Thread Jakob Eriksson

I'd say it's rather simple to embed minipico into any framework
which can be used with plain C.  So that should open up Android
and iOS too. Although never underestimate the practical troubles
with compiling on 4 platforms if you are only one developer. :)

Been there, done that. :)

// Jakob


On 22/04/16 04:24, Robert Herman wrote:
> All true Alex and Jakob.
> 
> I am not trying to develop something professional, so that leaves me two
> choices:
> 
> 1. Implement a very simple framework, and handcraft all of the
> requirements it in miniPicoLisp (thx Christophe! I had put it aside for
> a year and forgot) that wraps SDL2, which is C-based, and then I can
> distribute the miniPicoLisp executable for the target platform (Windows,
> Linux, Mac) with the SDL2.dll or .SDL2.a and other data files (.jpg, ogg
> or .wav, etc...).
> 
>   * This is a perfect real world example of this path. A guy whose
> handle is rxi on itch.io  and Twitter created a
> "Lisp-shaped" language called aria, and then did a jam with it in a
> final game called pulsr. Aria is very minimal - no vectors or hash
> maps, only lists, but supports lambdas, macros, has a garbage
> collector and a C api:
>   o https://rxi.itch.io/pulsr
>   o https://github.com/rxi/ari
>   o You can download both, build aria, and then extract pulsr. In
> pulsr there is a folder called pak0. Add .tar.gz to the end of
> the folder name (pak0.tar.gz), and extract it. You will then
> have a folder with the source to the game. Delete the pak0
> folder or move it, since the pulsr exe will try and execute that
> first (per rxi, I haven't tested it).
>   o He basically modularized his framework in a lot of files. No
> criticism from me, but I would like to base mine on a more
> traditional frame, or skeleton for doing future jams.
>   o miniPicoLisp should work. No multi-player without networking,
> and no db to hold entity structures like maps or characters, but
> SDL2 has all of the input/keyboard handling, graphics and sound
> covered for you. So maybe simply wrapping SDL2 and creating a
> better structure or framework?
> 
> 2.  Copy an existing JS game framework (Phaser), and make it
> programmable in PicoLisp proper, and just export JS/HTML5/CSS. You have
> done a lot of the work on this already, I believe.
> 
> I am favoring option 1, and not distributing to Android and iOS for now.
> I see option 2 as a viable future path. I also prefer CSFML over SDL2.
> SFML (C++ - based) is another media/game library, and CSFML is the
> official C port of it. But, SDL is very popular and easy to find a lot
> of tutorials online. With game jams and small stuff, C is preferable
> over C++. SDL1.2 (old), and SDL2 are both C-based.
> 
> Would the OpenGL wrapper in PicoLisp work in miniPicoLisp, or not due to
> floats, or big nums, and what else would I need to add to miniPicoLisp
> to allow it to do so? The goal is to stay neutral, no Posix requirements.
> 
> I have a few days off coming up, and I am going to start on option 1. I
> will put it up on Github if I get anywhere next week. Only 7 days and 1
> hour until the LGJ!
> 
> Rob
> 
> PS: I have reposted this, since I left the subject off the last time I
> hit Send, and I did not see it on the list. Forgive any unintended
> double posts. Thanks.
> 
> On 20 April 2016 at 13:23, Jakob Eriksson  > wrote:
> 
> Actually, I find that you can statically link most libraries on
> Linux and that tends to remove almost all distribution problems.
> 
> best regards,
> Jakob
> 
> 
> On 20/04/16 07:57, Alexander Burger wrote:
> > Hi Rob,
> >
> >> HTML5, JS and family come into the picture when you want to
> distribute or
> >> share your game. Distribution is king, and sadly it is asking too
> much to
> >> have a basic user/player to install PicoLisp so they can play
> your game,
> >
> > Yes, that's the problem. As long as you go for a native Linux
> solution,
> > using C libraries and GUI, you run into trouble with distribution.
> There
> > are so many different Linuxes around that it becomes a full-time
> job to
> > provide turn-key packages for all of them. I addition, PicoLisp
> may run
> > also natively on Windows now that Microsoft jumped onto the train.
> >
> > An online implementation doesn't have these problems, but has other
> > limitations.
> >
> > As I said, it all depends on the type of game, and on which is based.
> > Some JavaScript framework is probably the easiest, it would
> communicate
> > with a PicoLisp server in a similar way as @lib/canvas.l and
> > @lib/canvas.js, using XMLHttpRequest().
> >
> > ♪♫ Alex
> >
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> 

Re: Spring 2016 Lisp Game Jam

2016-04-21 Thread Robert Herman
All true Alex and Jakob.

I am not trying to develop something professional, so that leaves me two
choices:

1. Implement a very simple framework, and handcraft all of the requirements
it in miniPicoLisp (thx Christophe! I had put it aside for a year and
forgot) that wraps SDL2, which is C-based, and then I can distribute the
miniPicoLisp executable for the target platform (Windows, Linux, Mac) with
the SDL2.dll or .SDL2.a and other data files (.jpg, .ogg or .wav, etc...).


   - This is a perfect real world example of this path. A guy whose handle
   is rxi on itch.io and Twitter created a "Lisp-shaped" language called
   aria, and then did a jam with it in a final game called pulsr. Aria is very
   minimal - no vectors or hash maps, only lists, but supports lambdas,
   macros, has a garbage collector and a C api:
  - https://rxi.itch.io/pulsr
  - https://github.com/rxi/ari
  - You can download both, build aria, and then extract pulsr. In pulsr
  there is a folder called pak0. Add .tar.gz to the end of the folder name
  (pak0.tar.gz), and extract it. You will then have a folder with
the source
  to the game. Delete the pak0 folder or move it, since the pulsr exe will
  try and execute that first (per rxi, I haven't tested it).
  - He basically modularized his framework in a lot of files. No
  criticism from me, but I would like to base mine on a more traditional
  frame, or skeleton for doing future jams.
  - miniPicoLisp should work. No multi-player without networking, and
  no db to hold entity structures like maps or characters, but SDL2 has all
  of the input/keyboard handling, graphics and sound covered for you. So
  maybe simply wrapping SDL2 and creating a better structure or framework?

2.  Copy an existing JS game framework (Phaser), and make it programmable
in PicoLisp proper, and just export JS/HTML5/CSS. You have done a lot of
the work on this already, I believe.

I am favoring option 1, and not distributing to Android and iOS for now. I
see option 2 as a viable future path. I also prefer CSFML over SDL2. SFML
(C++ - based) is another media/game library, and CSFML is the official C
port of it. But, SDL is very popular and easy to find a lot of tutorials
online. With game jams and small stuff, C is preferable over C++. SDL1.2
(old), and SDL2 are both C-based.

Would the OpenGL wrapper in PicoLisp work in miniPicoLisp, or not due to
floats, or big nums, and what else would I need to add to miniPicoLisp to
allow it to do so? The goal is to stay neutral, no Posix requirements.

I have a few days off coming up, and I am going to start on option 1. I
will put it up on Github if I get anywhere next week. Only 7 days and 1
hour until the LGJ!

Rob

PS: I have reposted this, since I left the subject off the last time I hit
Send, and I did not see it on the list. Forgive any unintended double
posts. Thanks.

On 20 April 2016 at 13:23, Jakob Eriksson  wrote:

> Actually, I find that you can statically link most libraries on
> Linux and that tends to remove almost all distribution problems.
>
> best regards,
> Jakob
>
>
> On 20/04/16 07:57, Alexander Burger wrote:
> > Hi Rob,
> >
> >> HTML5, JS and family come into the picture when you want to distribute
> or
> >> share your game. Distribution is king, and sadly it is asking too much
> to
> >> have a basic user/player to install PicoLisp so they can play your game,
> >
> > Yes, that's the problem. As long as you go for a native Linux solution,
> > using C libraries and GUI, you run into trouble with distribution. There
> > are so many different Linuxes around that it becomes a full-time job to
> > provide turn-key packages for all of them. I addition, PicoLisp may run
> > also natively on Windows now that Microsoft jumped onto the train.
> >
> > An online implementation doesn't have these problems, but has other
> > limitations.
> >
> > As I said, it all depends on the type of game, and on which is based.
> > Some JavaScript framework is probably the easiest, it would communicate
> > with a PicoLisp server in a similar way as @lib/canvas.l and
> > @lib/canvas.js, using XMLHttpRequest().
> >
> > ♪♫ Alex
> >
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-20 Thread Jakob Eriksson
Actually, I find that you can statically link most libraries on
Linux and that tends to remove almost all distribution problems.

best regards,
Jakob


On 20/04/16 07:57, Alexander Burger wrote:
> Hi Rob,
> 
>> HTML5, JS and family come into the picture when you want to distribute or
>> share your game. Distribution is king, and sadly it is asking too much to
>> have a basic user/player to install PicoLisp so they can play your game,
> 
> Yes, that's the problem. As long as you go for a native Linux solution,
> using C libraries and GUI, you run into trouble with distribution. There
> are so many different Linuxes around that it becomes a full-time job to
> provide turn-key packages for all of them. I addition, PicoLisp may run
> also natively on Windows now that Microsoft jumped onto the train.
> 
> An online implementation doesn't have these problems, but has other
> limitations.
> 
> As I said, it all depends on the type of game, and on which is based.
> Some JavaScript framework is probably the easiest, it would communicate
> with a PicoLisp server in a similar way as @lib/canvas.l and
> @lib/canvas.js, using XMLHttpRequest().
> 
> ♪♫ Alex
> 
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-20 Thread Alexander Burger
Hi Rob,

> HTML5, JS and family come into the picture when you want to distribute or
> share your game. Distribution is king, and sadly it is asking too much to
> have a basic user/player to install PicoLisp so they can play your game,

Yes, that's the problem. As long as you go for a native Linux solution,
using C libraries and GUI, you run into trouble with distribution. There
are so many different Linuxes around that it becomes a full-time job to
provide turn-key packages for all of them. I addition, PicoLisp may run
also natively on Windows now that Microsoft jumped onto the train.

An online implementation doesn't have these problems, but has other
limitations.

As I said, it all depends on the type of game, and on which is based.
Some JavaScript framework is probably the easiest, it would communicate
with a PicoLisp server in a similar way as @lib/canvas.l and
@lib/canvas.js, using XMLHttpRequest().

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-19 Thread Christophe Gragnic
If you need more portability and don't need the DB, you could
use miniPicoLisp.
And what about Ersatz ?

chri
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-19 Thread Robert Herman
Alex,

I was brainstorming, and reaching out to any other possible graphics/game
devs that might also be interested in using  PicoLisp. For me, I know what
I want. I want to be able to code my game in PicoLisp, and run it as is on
my Linux box. I would only require a minimal game framework, which would
just setup the main loop, set a cap on fps (frames per second) and make fps
consistent, along with a a way to handle game resources like sprite sheets
or maps (basically one big graphics file with all of your sprites, and you
just index the position of a small square/rectangle on the sheet), handle
collisions, simple physics, later add AI, and event handling. All that
being said, there are C libs that already do this like SDL2, SFML,
Allegro5, etc... They handle input, graphics, sound, networking and maybe
scenes or entities (PicoLisp's database would work great here). So my basic
question was do we wrap those libraries, and still write the core logic of
the game in PicoLisp, and custom write anything not wrapped?

HTML5, JS and family come into the picture when you want to distribute or
share your game. Distribution is king, and sadly it is asking too much to
have a basic user/player to install PicoLisp so they can play your game,
unless you can package it and make it one-clickable like Love2D (
https://love2d.org/). Love2D is small, programmed in LUA, but is on top of
SDL and other libraries, which can be packed with the Love2D executeable.
It is portable to Windows, Linux, Mac, iOS, and Android. A lot of game
jammers use it. Creating a clone of Love2D in PicoLisp would be ideal, but
I don't think you would want to build all of those libs in PicoLisp. Well,
you would, but we're talking many man-years of work. You do have OpenGL
binding already, and networking (for multiplayer), so maybe it's simply
adding input, sound, and collison detection. Basic collision detection
would also be needed right away, but simple physics (could also wrap Box2D
physics engine like Love2D), and AI could be added later.

I too, am no expert on game engines or frameworks, so forgive me if I step
the wrong way. I am researching and hoping to have a more coherent plan
soon. Of course, I would like it PicoLisp all the way down, not turtles ;)
But it requires a lot of time, which is why I throw things out like
leveraging an existing OpenGL or other GUI toolkit to make pretty
interfaces. I am not designer, but look at some minimal GUI toolkits that
run on top of OpenGL or SDL2 like https://github.com/vurtun/nuklear

Rob

On 19 April 2016 at 16:20, Alexander Burger  wrote:

> On Tue, Apr 19, 2016 at 11:29:13AM +0700, Robert Herman wrote:
> > What does Alex and everyone else think about implementing a game engine
> > from scratch, wrapping a few libraries, or wrapping an entire JS game
> > framework?
>
> This indeed very hard to say. All options are possible, but the decision
> depends on the goal and how close existing stuff is to it.
>
> I don't know any game libraries or frameworks. What would be the task of
> PicoLisp in such a project? Using the database to model the game world?
>
>
> > And for a stretch, is there anyway to generate C to be compiled into llvm
> > bytecode with llvm-gcc or clang? Or am I missing something, and we can
> > somehow make a PicoLisp to llvm module,
>
> For which purpose? What C would you "generate", and what is the role of
> LLVM then?
>
>
> > so we can generate JS with
> > emscripten? I can see programming a pure PicoLisp game engine, and then
> > running it in the browser after it has been translated to JS.
>
> I see not much benefit to write something in PicoLisp and then translate
> it to JS. You lose all advantages of PicoLisp, so that writing it
> directly in JS is a lot better.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-19 Thread Alexander Burger
On Tue, Apr 19, 2016 at 11:29:13AM +0700, Robert Herman wrote:
> What does Alex and everyone else think about implementing a game engine
> from scratch, wrapping a few libraries, or wrapping an entire JS game
> framework?

This indeed very hard to say. All options are possible, but the decision
depends on the goal and how close existing stuff is to it.

I don't know any game libraries or frameworks. What would be the task of
PicoLisp in such a project? Using the database to model the game world?


> And for a stretch, is there anyway to generate C to be compiled into llvm
> bytecode with llvm-gcc or clang? Or am I missing something, and we can
> somehow make a PicoLisp to llvm module,

For which purpose? What C would you "generate", and what is the role of
LLVM then?


> so we can generate JS with
> emscripten? I can see programming a pure PicoLisp game engine, and then
> running it in the browser after it has been translated to JS.

I see not much benefit to write something in PicoLisp and then translate
it to JS. You lose all advantages of PicoLisp, so that writing it
directly in JS is a lot better.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-19 Thread Mike Pechkin
1. 2048 in my repo already
https://bitbucket.org/mihailp/tankfeeder/src/34ef20ee65a0b3c0f1be5a0d56de27fa3d141304/2048.l?at=default=file-view-default

2. the hardest part of tetris implemented too, but without simul.l
https://bitbucket.org/mihailp/tankfeeder/src/34ef20ee65a0b3c0f1be5a0d56de27fa3d141304/citris/?at=default
https://imgur.com/4JelKp9




On Tue, Apr 19, 2016 at 7:29 AM, Robert Herman  wrote:

> I'm on my iPad and cannot check sources, but didn't Alex or somebody
> implement 2048 already? Or do you mean in HTML5?
> What does Alex and everyone else think about implementing a game engine
> from scratch, wrapping a few libraries, or wrapping an entire JS game
> framework?
> Alex made an RC flight sim that still wows me to this day; If only I could
> be so productive!
> I am playing with a C game engine called Corange that is minimal but
> inspiring as a root to wrap for PicoLisp then add the other supporting
> libraries for JS.
>
> And for a stretch, is there anyway to generate C to be compiled into llvm
> bytecode with llvm-gcc or clang? Or am I missing something, and we can
> somehow make a PicoLisp to llvm module, so we can generate JS with
> emscripten? I can see programming a pure PicoLisp game engine, and then
> running it in the browser after it has been translated to JS.
>
> Rob
>
>
> On Monday, April 18, 2016, Mike Pechkin  wrote:
>
>>
>>
>> On Fri, Apr 15, 2016 at 7:33 PM, Alexander Burger 
>> wrote:
>>
>>> On Fri, Apr 15, 2016 at 08:35:04PM +0700, Robert Herman wrote:
>>> > Hey, everyone, I am thinking on participating in the Lisp Game Jam
>>> coming
>>> > up in just 13 days.
>>> >
>>> > https://itch.io/jam/spring-2016-lisp-game-jam
>>> >
>>> > I invite all picolispers to try, so picolisp gets some love from the
>>> gaming
>>> > community!
>>>
>>> Wow, this is cool!
>>>
>>> Do you have an idea for a game? That would be the first issue.
>>>
>>>
>> ​my list for simul.l games
>> o) 2048
>> o) snake
>> o) roguelike
>> o) tetris​
>>
>>


Re: Spring 2016 Lisp Game Jam

2016-04-18 Thread Robert Herman
I'm on my iPad and cannot check sources, but didn't Alex or somebody
implement 2048 already? Or do you mean in HTML5?
What does Alex and everyone else think about implementing a game engine
from scratch, wrapping a few libraries, or wrapping an entire JS game
framework?
Alex made an RC flight sim that still wows me to this day; If only I could
be so productive!
I am playing with a C game engine called Corange that is minimal but
inspiring as a root to wrap for PicoLisp then add the other supporting
libraries for JS.

And for a stretch, is there anyway to generate C to be compiled into llvm
bytecode with llvm-gcc or clang? Or am I missing something, and we can
somehow make a PicoLisp to llvm module, so we can generate JS with
emscripten? I can see programming a pure PicoLisp game engine, and then
running it in the browser after it has been translated to JS.

Rob

On Monday, April 18, 2016, Mike Pechkin  wrote:

>
>
> On Fri, Apr 15, 2016 at 7:33 PM, Alexander Burger  > wrote:
>
>> On Fri, Apr 15, 2016 at 08:35:04PM +0700, Robert Herman wrote:
>> > Hey, everyone, I am thinking on participating in the Lisp Game Jam
>> coming
>> > up in just 13 days.
>> >
>> > https://itch.io/jam/spring-2016-lisp-game-jam
>> >
>> > I invite all picolispers to try, so picolisp gets some love from the
>> gaming
>> > community!
>>
>> Wow, this is cool!
>>
>> Do you have an idea for a game? That would be the first issue.
>>
>>
> ​my list for simul.l games
> o) 2048
> o) snake
> o) roguelike
> o) tetris​
>
>


Re: Spring 2016 Lisp Game Jam

2016-04-17 Thread Mike Pechkin
On Fri, Apr 15, 2016 at 7:33 PM, Alexander Burger 
wrote:

> On Fri, Apr 15, 2016 at 08:35:04PM +0700, Robert Herman wrote:
> > Hey, everyone, I am thinking on participating in the Lisp Game Jam coming
> > up in just 13 days.
> >
> > https://itch.io/jam/spring-2016-lisp-game-jam
> >
> > I invite all picolispers to try, so picolisp gets some love from the
> gaming
> > community!
>
> Wow, this is cool!
>
> Do you have an idea for a game? That would be the first issue.
>
>
​my list for simul.l games
o) 2048
o) snake
o) roguelike
o) tetris​


Re: Spring 2016 Lisp Game Jam

2016-04-17 Thread Robert Herman
Yes, simul.l. I need to sleep!

I'll also investigate HTML idiosyncrasies more this week. It cannot be
ignored in today's world.

But, to do a desktop app, has SDL2, or the older SDL lib been wrapped for
picoLisp, or is there an advantage of handling this natively with picoLisp?

Any information or comparisons you might have on how picoLisp handles many
distributed processes like Erlang on the BEAM VM with OTP? For what I do,
LFE (Lisp Flavored Erlang) is overkill, but a Lisp nonetheless! I study
small GP (Genetic Programming) and TWEANN (Topology and Weight Evolving
Neural Networks) in Lisp or LFE.

OT, I love concise programming languages like picoLisp, and J, which odds
very concise too. Different languages, but many aspects on common.

Thanks,

Rob
On Apr 18, 2016 03:20, "Alexander Burger"  wrote:

Hi Rob,

> When I look at lib sim.l for instance, it has a genetic algorithm snippet,
> and some other related, or not-related functions. What is the origin or
> specific use case for sim.l?

You mean @lib/simul.l, right? It is for general simulation purposes. The
genetic algorithm 'gen' was used initially in a research project at
Hokkaido University. 'game' implements an alpha-beta game tree search
and is used for example in some games in the PicoLisp distribution's
"games/" directory, together with 'grid' for 2-dimensional structures.
And all are used heavily in many task in rosettacode.org.


> Game frameworks always have keyboard input for movement (WASD keys,
arrows,
> space, etc... think Asteroids).

Sure, that's why I brought up the issue. It is not a serious problem, we
just need to decide how (that means: where) the keyboard focus should be
handled.


> I'll try running some stress tests with the way canvas is now with
picoLisp
> to see if it can stay at 24 to 30 fps with lots going on. I am busy the
> next few days, so I'll get back to you when I can. I would love to stay on
> this even after the Spring LGJ to bring gaming to picoLisp!

Cool!


> Distribution for the any game jam, the simpler the better. That's why I
> started looking back to the HTML stuff again. Easy to distribute and plays
> on anything with a browser. I am still not sure how picoLisp could work
> here.

Yes, it is convenient and easy to use, but the drawback is in many cases
the network bandwidth. It depends also largely on the game itself.

♪♫ Alex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-17 Thread Alexander Burger
Hi Rob,

> When I look at lib sim.l for instance, it has a genetic algorithm snippet,
> and some other related, or not-related functions. What is the origin or
> specific use case for sim.l?

You mean @lib/simul.l, right? It is for general simulation purposes. The
genetic algorithm 'gen' was used initially in a research project at
Hokkaido University. 'game' implements an alpha-beta game tree search
and is used for example in some games in the PicoLisp distribution's
"games/" directory, together with 'grid' for 2-dimensional structures.
And all are used heavily in many task in rosettacode.org.


> Game frameworks always have keyboard input for movement (WASD keys, arrows,
> space, etc... think Asteroids).

Sure, that's why I brought up the issue. It is not a serious problem, we
just need to decide how (that means: where) the keyboard focus should be
handled.


> I'll try running some stress tests with the way canvas is now with picoLisp
> to see if it can stay at 24 to 30 fps with lots going on. I am busy the
> next few days, so I'll get back to you when I can. I would love to stay on
> this even after the Spring LGJ to bring gaming to picoLisp!

Cool!


> Distribution for the any game jam, the simpler the better. That's why I
> started looking back to the HTML stuff again. Easy to distribute and plays
> on anything with a browser. I am still not sure how picoLisp could work
> here.

Yes, it is convenient and easy to use, but the drawback is in many cases
the network bandwidth. It depends also largely on the game itself.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-17 Thread Robert Herman
Alex,

When I look at lib sim.l for instance, it has a genetic algorithm snippet,
and some other related, or not-related functions. What is the origin or
specific use case for sim.l?

Game frameworks always have keyboard input for movement (WASD keys, arrows,
space, etc... think Asteroids). I have avoided web programming even though
I have done some in the past, so I am even further afield with HTML5
canvas. I like webgl and web audio though. I usually use desktop
gameframeworks that usually use SDL lib for graphic, audio, and input
devices. Is there a wrapper for it in picoLIsp?

You may want to look at the game engines phaser.io or babylonjs for
examples of how they handle things you may want to do in picoLisp.

I would be happy with a basic framework, and wrappers for webgl and web
audio. You could do a lot with just those, 3D and 2D and great music.

I'll try running some stress tests with the way canvas is now with picoLisp
to see if it can stay at 24 to 30 fps with lots going on. I am busy the
next few days, so I'll get back to you when I can. I would love to stay on
this even after the Spring LGJ to bring gaming to picoLisp! I have even
thought of using it as a scripting language inside of a simple C framework
called Corange, and building from there. All for fun of course!

Distribution for the any game jam, the simpler the better. That's why I
started looking back to the HTML stuff again. Easy to distribute and plays
on anything with a browser. I am still not sure how picoLisp could work
here. Love2D is a popular platform to code 2D games in, in Lua. You can
wrap up your game and the Love2D engine, so nobody needs to download or
install a piece of software, just your game as a .zip that unzips to an
exe on Windows, or LInux.

Rob



On 17 April 2016 at 01:40, Alexander Burger  wrote:

> On Sun, Apr 17, 2016 at 12:20:42AM +0700, Robert Herman wrote:
> > That did it, Alex. Now onto looking at the libs to see what has been
> > implemented in HTML5 Canvas.
>
> Good. The function list can be easily extended if necessary.
>
>
> One important issue needs still be decided: Do you need key events in
> the game? Currently, @lib/canvas.l supports mouse- and touch-events
> (click, double-click and drag), but no key-events.
>
> They would be trivial to implement: Just add a handler for keydown, and
> pass the key to 'drawCanvas' as a transient symbol in the third argument
> (where a number encodes the mouse-events).
>
> The problem is another one: A canvas does normally not receive keyboard
> focus (though it may be possible to force it by setting the "tabindex"
> and "contentEditable" attributes), and I'm not sure if this is the right
> way in a browser. It is of course also always possible to set the
> keyboard focus to some input field and process the keys there. How do
> other games handle this?
>
>
> > Any ideas on the maximum amount of entities, and what type, can be
> rendered
> > with picoLisp?
>
> There is no maximum. It may be thousands, see for example
>
>http://picolisp.com/wiki/?osmgeodata
>
> The question however is how many can be handled at the required speed. I
> have no exact info about that.
>
>
> > Most importantly, how could I package the final picoLisp/HTML5 game for
> > folks that don't have or want to install picoLisp?
>
> If a single TGZ is OK, then it is easy. Just install a local PicoLisp
> together with the whole app in a single directory (all references with
> relative path names), and pack that into a tarball. It can be unpacked
> on any equivalent machine in an arbitrary location. Would that suffice?
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
On Sun, Apr 17, 2016 at 12:20:42AM +0700, Robert Herman wrote:
> That did it, Alex. Now onto looking at the libs to see what has been
> implemented in HTML5 Canvas.

Good. The function list can be easily extended if necessary.


One important issue needs still be decided: Do you need key events in
the game? Currently, @lib/canvas.l supports mouse- and touch-events
(click, double-click and drag), but no key-events.

They would be trivial to implement: Just add a handler for keydown, and
pass the key to 'drawCanvas' as a transient symbol in the third argument
(where a number encodes the mouse-events).

The problem is another one: A canvas does normally not receive keyboard
focus (though it may be possible to force it by setting the "tabindex"
and "contentEditable" attributes), and I'm not sure if this is the right
way in a browser. It is of course also always possible to set the
keyboard focus to some input field and process the keys there. How do
other games handle this?


> Any ideas on the maximum amount of entities, and what type, can be rendered
> with picoLisp?

There is no maximum. It may be thousands, see for example

   http://picolisp.com/wiki/?osmgeodata

The question however is how many can be handled at the required speed. I
have no exact info about that.


> Most importantly, how could I package the final picoLisp/HTML5 game for
> folks that don't have or want to install picoLisp?

If a single TGZ is OK, then it is easy. Just install a local PicoLisp
together with the whole app in a single directory (all references with
relative path names), and pack that into a tarball. It can be unpacked
on any equivalent machine in an arbitrary location. Would that suffice?

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Robert Herman
That did it, Alex. Now onto looking at the libs to see what has been
implemented in HTML5 Canvas.
Any ideas on the maximum amount of entities, and what type, can be rendered
with picoLisp?
Most importantly, how could I package the final picoLisp/HTML5 game for
folks that don't have or want to install picoLisp?
I'm not a web guy, if you havn't noticed ;)

Rob

On 16 April 2016 at 21:23, Alexander Burger  wrote:

> On Sat, Apr 16, 2016 at 08:50:22PM +0700, Robert Herman wrote:
> > There is hope yet!
> > It works, and I get up to 420 Hz.
>
> Wow! Very fast.
>
>
> > The httpGate command seems to execute,
> > however, if I put in http://localhost the page cannot connect. I have to
>
> The simplest is to start it (as root) as
>
># bin/httpGate 80 8080
>
> then http://localhost redirects to the app listening on port 80.
>
> Perhaps you didn't do that as root?
>
>
> > Is there a way to know if httpGate is running?
>
> I use  'ps -C httpGate'.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
On Sat, Apr 16, 2016 at 08:50:22PM +0700, Robert Herman wrote:
> There is hope yet!
> It works, and I get up to 420 Hz.

Wow! Very fast.


> The httpGate command seems to execute,
> however, if I put in http://localhost the page cannot connect. I have to

The simplest is to start it (as root) as

   # bin/httpGate 80 8080

then http://localhost redirects to the app listening on port 80.

Perhaps you didn't do that as root?


> Is there a way to know if httpGate is running?

I use  'ps -C httpGate'.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Robert Herman
There is hope yet!
It works, and I get up to 420 Hz. The httpGate command seems to execute,
however, if I put in http://localhost the page cannot connect. I have to
put in http://localhost:8080 in both Firefox and Midori (Opera). Is there a
way to know if httpGate is running? I don't see it with pgrep or htop.
Thanks!

Rob

On 16 April 2016 at 19:32, Alexander Burger  wrote:

> On Sat, Apr 16, 2016 at 07:02:57PM +0700, Robert Herman wrote:
> > Cool. I am only getting around 2.80 Hz maximum over my 3G/4G WiFi
> hotspot.
> > I usually see 150 KBs to 300 KBs (1.2 to 2.5 mb/s).
>
> In fact it is not the data rates but the ping times which are relevant
> here.
>
>
> > I cannot run the example locally for some strange reason. I had the
> > rectangle example working earlier. Does this example require running
> > httpGate too? I kind of know what the -main and -go do, but can you
> explain
> > in case I am missing something?
>
> I start it as
>
>$ ./pil misc/canvas.l -main -go +
>
> and then point the browser to http://localhost (with httpGate running on
> port 80).
>
> If httpGate is not running, point the browser to http://localhost:8080,
> but note that then JS won't fire up immediately (due to the same-origin
> policy of XMLHttpRequest). Just click any button or the "Single" link to
> get it going.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
On Sat, Apr 16, 2016 at 07:02:57PM +0700, Robert Herman wrote:
> Cool. I am only getting around 2.80 Hz maximum over my 3G/4G WiFi hotspot.
> I usually see 150 KBs to 300 KBs (1.2 to 2.5 mb/s).

In fact it is not the data rates but the ping times which are relevant
here.


> I cannot run the example locally for some strange reason. I had the
> rectangle example working earlier. Does this example require running
> httpGate too? I kind of know what the -main and -go do, but can you explain
> in case I am missing something?

I start it as

   $ ./pil misc/canvas.l -main -go +

and then point the browser to http://localhost (with httpGate running on
port 80).

If httpGate is not running, point the browser to http://localhost:8080,
but note that then JS won't fire up immediately (due to the same-origin
policy of XMLHttpRequest). Just click any button or the "Single" link to
get it going.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Robert Herman
Cool. I am only getting around 2.80 Hz maximum over my 3G/4G WiFi hotspot.
I usually see 150 KBs to 300 KBs (1.2 to 2.5 mb/s).
I cannot run the example locally for some strange reason. I had the
rectangle example working earlier. Does this example require running
httpGate too? I kind of know what the -main and -go do, but can you explain
in case I am missing something?

I can still consider picolisp for the Lisp Game Jam that's 12 days off, but
I think I need to fall back to CL for this weekend's LD35 compo. Thanks for
your continued help, Alex!

Regards,

Rob

On 16 April 2016 at 16:15, Alexander Burger  wrote:

> Hi Rob,
>
> > A simple game engine only requires a main loop to set things up, and a
> draw
> > loop to update the screen for animation. Do you think the current
> picoLisp
> > libs with Canvas can support a 30 fps update of a 640x480 screen of
> > bitmapped graphics?
>
> This does not depend much on the canvas size, but mainly on network
> bandwidth and the number of elements to draw per frame.
>
> For example, the simple Canvas demo from
>
>http://picolisp.com/wiki?canvasDrawing
>
> runs at about 15 Hz when called on http://canvas.picolisp.com via DSL,
> but at up to 140 Hz when invoked at localhost (tested on my Nexus 9
> tablet) as
>
>$ ./pil misc/canvas.l -main -go +
>
>
> For that, I have just extended the demo a little and inserted a "Hz"
> display:
>
>(let (U (usec)  D (- U (default *Last U)))
>   (inc '*Frames)
>   (when (>= D 100)
>  (setq *Hz (*/ 1 *Frames D)  *Last U  *Frames 0) )
>   (csFillText
>  (pack (format *Hz 2) " Hz")
>  (- *DX 60)
>  20 ) )
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
Hi Rob,

> A simple game engine only requires a main loop to set things up, and a draw
> loop to update the screen for animation. Do you think the current picoLisp
> libs with Canvas can support a 30 fps update of a 640x480 screen of
> bitmapped graphics?

This does not depend much on the canvas size, but mainly on network
bandwidth and the number of elements to draw per frame.

For example, the simple Canvas demo from

   http://picolisp.com/wiki?canvasDrawing

runs at about 15 Hz when called on http://canvas.picolisp.com via DSL,
but at up to 140 Hz when invoked at localhost (tested on my Nexus 9
tablet) as

   $ ./pil misc/canvas.l -main -go +


For that, I have just extended the demo a little and inserted a "Hz"
display:

   (let (U (usec)  D (- U (default *Last U)))
  (inc '*Frames)
  (when (>= D 100)
 (setq *Hz (*/ 1 *Frames D)  *Last U  *Frames 0) )
  (csFillText
 (pack (format *Hz 2) " Hz")
 (- *DX 60)
 20 ) )

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Spring 2016 Lisp Game Jam

2016-04-15 Thread Robert Herman
Yes, I definitely have ideas, but the tools and my talent determine how far
I prune them back! I am currently in the Ludum Dare #35 challenge (48 hours
to create a game from scratch by yourself, all original). This is the LD
Compo, vs. the LD Jam where you get 72 hours. The Spring 2016 Lisp Game Jam
gives you 10 days, so if I try and fail with picoLisp for the LD35, I will
have gained the skills hopefully for the LGJ coming up in 12 days! I'll
look more at the canvas libs, to see what they offer in terms of graphics.
A simple game engine only requires a main loop to set things up, and a draw
loop to update the screen for animation. Do you think the current picoLisp
libs with Canvas can support a 30 fps update of a 640x480 screen of
bitmapped graphics? Or would I use a C game engine like Corange (
https://github.com/orangeduck/Corange), and then write wrapper for it in
picoLisp? In Common Lisp (SBCL and CCL) I use SDL2 as detailed on
https://github.com/lispgames/lispgames.github.io/wiki

There is an cl-sdl2 library for CL.

I have done simple games with IDE game creation tools (Godot, Blender3d).
Sadly, I have only done very simplistic console 'hangman' games in J, Lisp,
and C.
I am a mediocre artist, musician and programmer, but it is a hobby, so I am
very happy. I would love to use picoLisp for my own selfish reasons, and to
get it more exposure. I was looking at Shen, but due to licensing issues
(OSS vs. proprietary license), and not being 'there' myself yet in skills,
I prefer to use picoLisp; it clicks with me. Perhaps it is the fexprs!

 I also like LFE too, since it is a Lisp, and it runs on the BEAM with OTP.
More baggage though. That is more for my personal research into CI, and
Evolutionary Programming (EC), Genetic Algorithms (GAs), and Genetic
Programming (GP), since it fits the distributed nature of these things. I
happened upon a thread on the picoLisp archives about Erlang and picoLisp.
Is picoLisp capable of running, say a 1000 processes on an average
notebook? Not serving pages, simply running them. They are usually just
list processing, with a fitness function or evaluation function applied
between each run or several generations of runs.

A lot of my alternative Lisp addictions cannot make a distributable game
other than CL with CL-SDL2. Maybe you have ideas on this? Thanks, and I
need to not write so much and get back to work on LD35!

Regards,

Rob


On 15 April 2016 at 23:33, Alexander Burger  wrote:

> On Fri, Apr 15, 2016 at 08:35:04PM +0700, Robert Herman wrote:
> > Hey, everyone, I am thinking on participating in the Lisp Game Jam coming
> > up in just 13 days.
> >
> > https://itch.io/jam/spring-2016-lisp-game-jam
> >
> > I invite all picolispers to try, so picolisp gets some love from the
> gaming
> > community!
>
> Wow, this is cool!
>
> Do you have an idea for a game? That would be the first issue.
>
>
> > I am more familiar with SBCL using SDL2 for game making, but I love
> > picolisp so much I just may enter with it if I can put together a
> > framework/process. Alex has done most of the work (chess, flightsim,
> > etc...), but I would need 2 things:
> >
> > 1. a way of distributing the game for play
> > 2. a GUI - either HTML/Canvas or C
> >
> > For #1 an HTML5/Canvas game could be hosted, and for #2 FFI and
> > distributing the picolisp library with the exe as a dynamic link?
> >
> > Any recommendations? Thanks!
>
> I would definitely go with Canvas. I used it (@lib/canvas.l and
> @lib/canvas.js) recently for various applications, and could support you
> here.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>