Re: Rolling dices on OpenMoko

2010-07-26 Thread Michael Smith
On Sun, 25 Jul 2010 19:11:22 +0200
Xavier Cremaschi omega.xav...@gmail.com wrote:

 Hi folks,
 a new application will be soon available for SHR (as soon as I 
 understood how to build a package) : alea

All of my applications including this one:

http://glitch.tl/cgi-bin/hgwebdir.cgi/home/host/glitch.tl/repos/mkrpn/

...build their own packages. It needs a simple script ipkg-build.sh which 
should be commonly available. You should be able to copy my code to do what you 
want.
-- 
Michael Smith
+61 416 062 898
http://glitch.tl

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Rolling dices on OpenMoko

2010-07-26 Thread Xavier Cremaschi
On 26/07/2010 10:40, Michael Smith wrote:
 All of my applications including this one:

 http://glitch.tl/cgi-bin/hgwebdir.cgi/home/host/glitch.tl/repos/mkrpn/

 ...build their own packages. It needs a simple script ipkg-build.sh which 
 should be commonly available. You should be able to copy my code to do what 
 you want.


Thanks very much !
So here is a link to install alea :
 opkg install http://www.troulite.fr/~xav/freerunner/alea_0.1_all.ipk

As mentioned in previous mail, there is a layout bug in second panel : 
app becomes larger than 480px when formula becomes larger too.

Xavier.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Rolling dices on OpenMoko

2010-07-25 Thread Xavier Cremaschi
Hi folks,
a new application will be soon available for SHR (as soon as I 
understood how to build a package) : alea

alea is a dice rolling application that you could use for role playing game.

It's a very simple application which uses python-elementary -- no 3D at 
all, I would have love it but not enough time nor motivation --, here 
are some screenshots :

Main page : you click on dices and score is automatically updated. If 
you need more dices, click on Add. There are 2 complete dice sets, but 
no more so buttons are big enough.
 http://imgur.com/8qxok.png
This should limits the number of action to do in order to roll few dices.

Second page (advanced) : a pad to enter a formula, like 5d6+5
Used formula are accessible through history, if you need to roll them 
several times during your game (but it's not saved on disk, you have to 
keep it running).
 http://imgur.com/Xth92.png
This should be useful for big roll.


Bug known : as formula becomes big, Roll button shrinks. I still don't 
understand totally elementary :/

Todo list :
* allow to click on score to see details for each dice (some games 
requires to keep only certain dices)
* add a '-' button hidden behind the '+' one (barely useful)
* maybe a roll sound and a persistent history


I will try to add it to SHR repository, but I don't understand what I 
need to do to achieve this.

I hope you will like it,
Xavier Cremaschi.

PS : many thanks to podboy project, which is useful to discover how 
python-elementary and elementary work :)
PPS : https://svn.troulite.fr/alea/


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: 3D in EFL (Rolling dices on OpenMoko)

2010-03-24 Thread The Rasterman
On Wed, 24 Mar 2010 11:56:50 +0100 Xavier Cremaschi omega.xav...@gmail.com
said:

 Le 24/03/2010 01:22, Carsten Haitzler (The Rasterman) a écrit :
  On Mon, 22 Mar 2010 10:00:56 +0100
  Xavier Cremaschiomega.xav...@gmail.comsaid:
 
  EFL can use opengl for its rendering (not on openmoko, because it seems
  we don't have an opengl-es driver). What do you mean by 3d ? Can I
  modelize cube, sphere, and do some projective geometry ?
 
  In elementary I cannot find an equivalent of an opengl context
  (QGLWidget in qt4), if someone has an idea ?
   
  see evas_map stuff - u can apply a map (a (texture)map). you define 4
  points in space (3d), 4 texture u,v co-ordinates (that map the given object
  geometry to these 4 points - just like opengl). you cat rotate these points
  around the 3 axes (x, y and z) by  number of degrees and you now can apply
  a perspective transform + lighting to this map (the 4 points). see expedite
  or elementary - they use this. the elm flip widget does just this to flip
  in 3d between a front and back side of a card. expedite crates its
  spinning cubes this way.
 
  it's not intended for full 3d - like making complex 3d apps/games. it's
  meant for 3d effects in 2d ui's. like spinning, rotating and flipping. it
  can be used a bit more extensively to do single geometric stuff like cubes
  - it could do spheres given enough faces made out of multiple objects, but
  that's pushing it. it could do simple 3d needed for things like
  mapping/navigation apps.
 
  but no - there is no qglwidget thing in evas - this imho is throwing in
  the towel and just do it all in opengl which is a very different api
  concept to evas - it means you NEEED opengl or it just doesnt work. evas
  provides its map feature with or without opengl present. it works (fast) in
  software as well as opengl. it's an always-on and always-working feature.
 
 
 
 Thanks for you answer.
 
 I just need to modelize simple dices I think (d4,6,8,10,12,20... I could 
 see later to add the exotic ones), so if I understand what you wrote and 
 how evas_map works, I need to :
 - use many evas_map to describe a dice (evas_map being 4 points, it's 
 easy for d4...for d6 with 8 vertexes I could use 2 maps)
 - use available rotate functions (and own translate functions) to 
 animate that
 
 For a d4, something like :
 - Evas_Map *m = evas_map_new(4);
 - I give my four 3d points, using evas_map_point_coord_set(..)
 - I do myself a projection to determine where these points are in the 2d 
 texture (if I want a top view for example)
 - I set these four 2d points with evas_map_point_image_uv_set(..)
 - Now I can use rotate/translate to move the dice
 ?

look at expedite and its cubes - u dont need to do the projection etc. evas has
these for you - move your stuff in 2d space as u please (the 4 point x, y
coords) and set z as u like. u can use the map util funcs to rotate around any
point/axis. you can use the perspective call to do the projection (if you
want 3d perspective) and lighting too. if you want. with a point lightsource.
when done u set the map for the obj (well enable it too). you can free it now
as the obj has its own copy of that map - u want to make a new one and modify
it for the next frame/change


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: 3D in EFL (Rolling dices on OpenMoko)

2010-03-23 Thread Xavier Cremaschi
EFL can use opengl for its rendering (not on openmoko, because it seems 
we don't have an opengl-es driver). What do you mean by 3d ? Can I 
modelize cube, sphere, and do some projective geometry ?

In elementary I cannot find an equivalent of an opengl context 
(QGLWidget in qt4), if someone has an idea ?



Le 09/03/2010 02:04, Steven Le Roux a écrit :
 EFL does 3D too :)

 On Mon, Mar 8, 2010 at 10:47 PM, Xavier Cremaschi
 omega.xav...@gmail.com mailto:omega.xav...@gmail.com wrote:

 On 08/03/2010 19:43, Davide Scaini wrote:
   give a try asking to mokomaze developer... I think he should give you
   lots of answers... maybe :)
   d

 Thanks, very good idea indeed ! Mokomaze can be a perfect model, I will
 read the source :)


 ___
 Openmoko community mailing list
 community@lists.openmoko.org mailto:community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community




 --
 Steven Le Roux
 Jabber-ID : ste...@jabber.fr mailto:ste...@jabber.fr
 0x39494CCB ste...@le-roux.info mailto:ste...@le-roux.info
 2FF7 226B 552E 4709 03F0  6281 72D7 A010 3949 4CCB



 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: 3D in EFL (Rolling dices on OpenMoko)

2010-03-23 Thread The Rasterman
On Mon, 22 Mar 2010 10:00:56 +0100
Xavier Cremaschi omega.xav...@gmail.comsaid:

 EFL can use opengl for its rendering (not on openmoko, because it seems 
 we don't have an opengl-es driver). What do you mean by 3d ? Can I 
 modelize cube, sphere, and do some projective geometry ?
 
 In elementary I cannot find an equivalent of an opengl context 
 (QGLWidget in qt4), if someone has an idea ?

see evas_map stuff - u can apply a map (a (texture)map). you define 4 points
in space (3d), 4 texture u,v co-ordinates (that map the given object geometry
to these 4 points - just like opengl). you cat rotate these points around the
3 axes (x, y and z) by  number of degrees and you now can apply a perspective
transform + lighting to this map (the 4 points). see expedite or elementary -
they use this. the elm flip widget does just this to flip in 3d between
a front and back side of a card. expedite crates its spinning cubes this way.

it's not intended for full 3d - like making complex 3d apps/games. it's meant
for 3d effects in 2d ui's. like spinning, rotating and flipping. it can be used
a bit more extensively to do single geometric stuff like cubes - it could do
spheres given enough faces made out of multiple objects, but that's pushing it.
it could do simple 3d needed for things like mapping/navigation apps.

but no - there is no qglwidget thing in evas - this imho is throwing in the
towel and just do it all in opengl which is a very different api concept to
evas - it means you NEEED opengl or it just doesnt work. evas provides its map
feature with or without opengl present. it works (fast) in software as well as
opengl. it's an always-on and always-working feature.

 Le 09/03/2010 02:04, Steven Le Roux a écrit :
  EFL does 3D too :)
 
  On Mon, Mar 8, 2010 at 10:47 PM, Xavier Cremaschi
  omega.xav...@gmail.com mailto:omega.xav...@gmail.com wrote:
 
  On 08/03/2010 19:43, Davide Scaini wrote:
give a try asking to mokomaze developer... I think he should give you
lots of answers... maybe :)
d
 
  Thanks, very good idea indeed ! Mokomaze can be a perfect model, I will
  read the source :)
 
 
  ___
  Openmoko community mailing list
  community@lists.openmoko.org mailto:community@lists.openmoko.org
  http://lists.openmoko.org/mailman/listinfo/community
 
 
 
 
  --
  Steven Le Roux
  Jabber-ID : ste...@jabber.fr mailto:ste...@jabber.fr
  0x39494CCB ste...@le-roux.info mailto:ste...@le-roux.info
  2FF7 226B 552E 4709 03F0  6281 72D7 A010 3949 4CCB
 
 
 
  ___
  Openmoko community mailing list
  community@lists.openmoko.org
  http://lists.openmoko.org/mailman/listinfo/community
 
 
 
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Rolling dices on OpenMoko

2010-03-09 Thread Xavier Cremaschi
Some elements :
- mokomaze relies on libsdl
- ODE can be used to simulate dice physic : 
http://www.youtube.com/watch?v=8CcfG5uxSOw
- 
http://www.reddit.com/r/Physics/comments/achxo/i_want_to_simulate_the_physics_of_dice_rolling/


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Rolling dices on OpenMoko

2010-03-09 Thread DRSp.
Am 08.03.2010 19:13, schrieb Xavier Cremaschi:
 Hi folks,

 I would like to develop a free software to roll dices (for role playing
 games). My inspiration comes from : http://www.machwerx.com/apps/MachDice/
 which seems to be a very great soft ! Lot of nice ideas, but only for
 iPhone :(

 I don't think I could make something better than this soft, which is the
 result of lots of nice ideas (if you compare v1 and v2 you can see the
 evolution), but -- being a coder and a role playing gamer -- here are my
 goals :
 - using MachDice ideas (entering formulas, having a formula history,
 having workspaces, can block dices...), because these are great ideas
 and I don't think it worth trying to find a better conception. MachDice
 author you're a clever guy, kudos!
 - a good looking soft, but with low graphics to fit openmoko abilities
 - a portable software, because openmoko and non-openmoko users could be
 interested (except iPhone users who already have this soft).
 - having fun coding it (I don't think I will use it, I love rolling real
 dices :P)

 About coding :
 - for 3D : OpenGl or ???
 - for non-3D : Qt4 or EFL.

 I am not sure about using OpenGl or not... I know the tech, and OpenGl
 would be great when soft runs on PC, but what about openmoko ? AFAIK,
 because of a lack of OpenGl ES support, any OpenGl app would run on
 mesa/software-acceleration-by-cpu. Without OpenGl I don't know how I can
 do 3d, any idea ?

 For Qt4 vs EFL :
 - qt4 is ok for ~all linux distribs, windows, and QtMoko (I think). What
 about SHR ?
 - elf is ok for ~all linux distribs (I think), SHR, and some packages
 exists for windows
 (http://fr.enlightenment.org/2009/05/31/efl-installateur-windows-xp/) so
 portability is ok (linux = main target for me)


 Thanks in advance for any advice (^^)
 Xavier Cremaschi.


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

dont forget moko-eightball http://www.opkg.org/package_35.html

it displays a ball when shaking the FR an answer appears..

Code needs some adjustments for recent shr-distros tought...

cheers DRSp.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Rolling dices on OpenMoko

2010-03-08 Thread Xavier Cremaschi
Hi folks,

I would like to develop a free software to roll dices (for role playing 
games). My inspiration comes from : http://www.machwerx.com/apps/MachDice/
which seems to be a very great soft ! Lot of nice ideas, but only for 
iPhone :(

I don't think I could make something better than this soft, which is the 
result of lots of nice ideas (if you compare v1 and v2 you can see the 
evolution), but -- being a coder and a role playing gamer -- here are my 
goals :
- using MachDice ideas (entering formulas, having a formula history, 
having workspaces, can block dices...), because these are great ideas 
and I don't think it worth trying to find a better conception. MachDice 
author you're a clever guy, kudos!
- a good looking soft, but with low graphics to fit openmoko abilities
- a portable software, because openmoko and non-openmoko users could be 
interested (except iPhone users who already have this soft).
- having fun coding it (I don't think I will use it, I love rolling real 
dices :P)

About coding :
- for 3D : OpenGl or ???
- for non-3D : Qt4 or EFL.

I am not sure about using OpenGl or not... I know the tech, and OpenGl 
would be great when soft runs on PC, but what about openmoko ? AFAIK, 
because of a lack of OpenGl ES support, any OpenGl app would run on 
mesa/software-acceleration-by-cpu. Without OpenGl I don't know how I can 
do 3d, any idea ?

For Qt4 vs EFL :
- qt4 is ok for ~all linux distribs, windows, and QtMoko (I think). What 
about SHR ?
- elf is ok for ~all linux distribs (I think), SHR, and some packages 
exists for windows 
(http://fr.enlightenment.org/2009/05/31/efl-installateur-windows-xp/) so 
portability is ok (linux = main target for me)


Thanks in advance for any advice (^^)
Xavier Cremaschi.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Rolling dices on OpenMoko

2010-03-08 Thread Rui Miguel Silva Seabra
Em 08-03-2010 18:13, Xavier Cremaschi escreveu:
 - for 3D : OpenGl or ???
 
 I am not sure about using OpenGl or not... I know the tech, and OpenGl 
 would be great when soft runs on PC, but what about openmoko ? AFAIK, 
 because of a lack of OpenGl ES support, any OpenGl app would run on 
 mesa/software-acceleration-by-cpu. Without OpenGl I don't know how I can 
 do 3d, any idea ?

Don't worry so much about fancy hardware 3D support for effects, better
a simple 2D fast and working app than fancy but slow or not working.

Rui

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Rolling dices on OpenMoko

2010-03-08 Thread Davide Scaini
On Mon, Mar 8, 2010 at 7:28 PM, Rui Miguel Silva Seabra r...@1407.orgwrote:

 Em 08-03-2010 18:13, Xavier Cremaschi escreveu:
  - for 3D : OpenGl or ???
 
  I am not sure about using OpenGl or not... I know the tech, and OpenGl
  would be great when soft runs on PC, but what about openmoko ? AFAIK,
  because of a lack of OpenGl ES support, any OpenGl app would run on
  mesa/software-acceleration-by-cpu. Without OpenGl I don't know how I can
  do 3d, any idea ?

 Don't worry so much about fancy hardware 3D support for effects, better
 a simple 2D fast and working app than fancy but slow or not working.

 Rui

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community


give a try asking to mokomaze developer... I think he should give you lots
of answers... maybe :)
d
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Rolling dices on OpenMoko

2010-03-08 Thread Xavier Cremaschi
On 08/03/2010 19:43, Davide Scaini wrote:
 give a try asking to mokomaze developer... I think he should give you
 lots of answers... maybe :)
 d

Thanks, very good idea indeed ! Mokomaze can be a perfect model, I will 
read the source :)


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Rolling dices on OpenMoko

2010-03-08 Thread Steven Le Roux
EFL does 3D too :)

On Mon, Mar 8, 2010 at 10:47 PM, Xavier Cremaschi omega.xav...@gmail.comwrote:

 On 08/03/2010 19:43, Davide Scaini wrote:
  give a try asking to mokomaze developer... I think he should give you
  lots of answers... maybe :)
  d

 Thanks, very good idea indeed ! Mokomaze can be a perfect model, I will
 read the source :)


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community




-- 
Steven Le Roux
Jabber-ID : ste...@jabber.fr
0x39494CCB ste...@le-roux.info
2FF7 226B 552E 4709 03F0  6281 72D7 A010 3949 4CCB
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community