Re: anyone interested in a small game?

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 30.10.2011 19:32, schrieb Dennis Haupt:
 hi community,
 
 i decided to create a (small) game in clojure to get a bit of 
 non-theoretical experience. i'm pretty much a clojure noob (only
 did a few experiments) but have done a few real things in scala -
 which is totally awesome btw - so i do have some functional
 programming experience.
 
 if there's someone here who would like to join, just do so by 
 answering yes or something like that.
 
 i was thinking about a game like asteroids, tower defense or that
 old game with lots of aliens on the top and two players at the
 bottom, shooting upwards.
 
 
 

in case anyone is still interested, i committed a running prototype to
github: https://github.com/HamsterofDeath/Clojureoids

i went all the way and used Java's
so-complex-that-not-even-public-area operations for cutting off parts
of randomly generated asteroids instead of just replacing big ones by
smaller ones. the broken off parts are not yet flying around, but you
see where i am going with this.



-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOtl0aAAoJENRtux+h35aGt24QAK9rWtaAW1eTTxyszCiAHGbv
EisjQy7qz+De4BjYwovC8DKYA3knBfcFPxoe95UrF1sDiKEtVCYOxN85v4DKiRpb
FqmxD6YlkCW7sarjUuSzbCKz8wZ4yEdOT2p8SZt5T71rXhYXFOrCaBDQemNUHBrA
fLSwUGPmtvAJxhiAQsB0AeG0ZG6goptwXlO3At/87fgKhn3u1R6+OYBkNS78PG/u
Q0N7OccME3Dl7GtTi0zPRnx3QdrO+Sh7JbTP3b/gICmtRSnfS3s5yuubOdIBHZCQ
LmCnuDp2VEUw6Y1z9OoeJk52FFDvau9sq46n/5yWMMrsBn7W43CpRuHP0YAB3OIj
k+p8qjVfo5wLDV+PSLKDje4mbHMt3iaE/fK9ah5J+KfNRhHFyxhP+c4njZrWVBfw
ZHvX7g9vooBQsW+e8ock3XFIqa6YIElgpG8rxctBVWKmPVjbGBIp9pblKWoVXh+q
dOqjI/JqK4oSMZgsdrEB47Sa06N9yf0JYkOSBvPQilGFldUI4YFn4VTKPfjbwE22
whLDR8wTtn5MBBZhoRVH7tjdPVX8UtHIRKvf+D1AOvtjnoJc8R2csZ0SeoLr+RT+
MHREkcYJyJedT4r+J00QAPPkW2S/JNmtrlsq6N8o+6JsMYw0m66hmdDZ8ezOtZsl
jOOOE1Jnt/VZNj6amCUy
=DGsg
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-11-01 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

got icq/skype/jabber/anything else?

Am 31.10.2011 10:37, schrieb Vikrant Behal:
 Yes, I am interested. Wanna get some practical experience in
 clojure.
 
 Cheers! Vikrant Behal +91 8884963403
 
 P Please do not print this email unless it is absolutely
 necessary. Spread environmental awareness.
 
 
 
 
 
 On Mon, Oct 31, 2011 at 12:02 AM, Dennis Haupt
 d.haup...@googlemail.com wrote: hi community,
 
 i decided to create a (small) game in clojure to get a bit of 
 non-theoretical experience. i'm pretty much a clojure noob (only
 did a few experiments) but have done a few real things in scala -
 which is totally awesome btw - so i do have some functional
 programming experience.
 
 if there's someone here who would like to join, just do so by 
 answering yes or something like that.
 
 i was thinking about a game like asteroids, tower defense or that
 old game with lots of aliens on the top and two players at the
 bottom, shooting upwards.
 
 
 
 
 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOsCRJAAoJENRtux+h35aGKMIP/R4/eC2XtQVZcK9S6xF9Btcy
BB8RN5LEQnRBp+PS6X7ZKDCGOhjzQyzJfRZYUOgCH3OZ1mgwFIPyrenkkqJZlTQj
YHG8zhlibJllcRWPhnglV6btYYg54kAWs3gRKpBWB2fn6bUFqkJRKwQreaSo8Ma0
i/vSNHWioK7AOKBv4zsJcxHs02AKd+YGRdtv/TbmLnMbSR46KLy/2Dk8YcJF5Eju
FXYXmD3Gd/SJs6qlaOKWG8cireCAzwlmNs5U41nalE+X8kxP1jNt4ryGG9vt1Uqs
HmwG7i465nnS6NUUXdF5VqgEI6m/z/uqSnEiFK3tB9bh3qRA6NPc1JibZg7G6CkN
/R1pYhXkQm354o4f+JYSfE/xOeuDGvg63IT0zMULUqCr77h49LdWnnfPnZ5Huenh
+cSh+rz6vv3vDTLWShzo+nlqOYkQEGfAbhBDZjLfkbsLjVSY4N0mIiuvN4AluwEi
GDByKp0L6jxw7NH/lofJN/Vz35CAQ5HiW5/+EsgEaeDbnM5FOyFa5PZz4lvW/GgR
lzz6/k+DQGeRO9+C/ZqQTHGfH6GkHC2atbe0I5Vp47ve1jHvcgzHgkQvetxQ1MmK
AsR27I9UVqQm4wRO/44kemavJHYuOj1xDtlvliLa9yqYgyRkLaxCQwp7LKcZpz7k
lnjy/jbsVA0c1okdbKcf
=kYM9
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-11-01 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

i went a step further:

since my asteroids are all immutable, they don't contain a renderer.
the renderer would either require a reference to the asteroids data,
position, size and so on - if that changes the renderer would be
obsolete - or would require its caller to know about the internals of
asteroid rendering to the caller can then pass the polygon, position
and so on.

both problems are solved by a rendering-factory :)

any game element carries along a renderer-factory that just requires a
a game element as a parameter. that way i can just do:
(render ((:gen-renderer game-element) game-element) target-image)

for all game elements.
if a game element get's replaced by a new version of itself, the
renderer factory can just be carried along, no need to do messy
internal updates.

decoupling rocks.

Am 31.10.2011 20:54, schrieb Michael Gardner:
 On Oct 31, 2011, at 2:03 PM, Timothy Baldridge wrote:
 
 This is what Clojure excels at...de-coupling, or as Rich put it
 in his recent talk Simple made Easy: don't assume things about
 your code. Don't assume that all models will always fit into the
 concept of a polygon...don't assume that you'll always want to
 represent your models via Java2D.
 
 It's impossible to make zero assumptions about your code; the trick
 is figuring out which are the appropriate ones. Making too many
 assumptions leads to brittle and hard-to-extend code, but making
 too few leads to over-generalized, ponderous code that does way
 more than it's ever likely to be used for.
 
 In a case like this game, it should be easy to refactor away from
 the everything is a polygon model if and when the game outgrows
 it, so I'd argue against introducing the extra complexity of
 per-entity renderers until it's actually necessary.
 
 That's a strength of dynamic, expressive languages like Clojure,
 IMO: because there's so much less code, refactoring is much easier.
 So instead of trying to predict all future requirements and
 possibly ending up with over-generalized code, you can make
 assumptions based on current/near-term requirements and refactor
 when those assumptions no longer apply.
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOsEKNAAoJENRtux+h35aGe7kP/37maMjp1c+x7yBd77HA52Xo
ap7LO0EL43jcwie28y7iK3qkRT2O12wxCpHMD9RmyCIO3g68H1CmOIrVhT9JYs5g
Q/fjsilXg9kmgHvimATTDsTRng7wg4mNIh3l9n4ZpOj11Q+Ib7aK9DEynUsr2474
PTKsIxiIscD2ZDkb4Xl0qoZBnLj9m2o3xzXTMPkNUEXEepC4MVzuFWowxWsemJ6k
zk9MuaxY7NzKYzdmtAm0UBg2RrtaFfWDSfLobpIp7g3i9es+9WpfCToCj9GdcIdS
bwCaU76AUiS2SJf9Ti8Q5DCtFw2dkICnLqBSYbp4xkO+0aU5ihdEXNF+PpEul087
ic/pxsg0jBzwwy05hngxGx9vlx1zFUjN5A3WLWFLlsWhfkBGPo90LTj+7P+t3mch
y2QLoqLZHOlRA2+r8emFJJhRXQeqHHecTEBy8q0vPPhC9QH1ejt7d4jF2yRi/rkk
UZHJxUqH8yxMzqIj27BGojJUz6UVr7JH/VwWQpuYNLn3I7ThV6J2l8xKcD00SUcX
HjLP4TpM2CT/eJTlUEzm8wzqrSQdN+2XmT5u5x4YNasz2FC61C9bd03Po8WvX2gW
bG+X2GjIaqslzRgP4/NUMkL9FVXD5OY1kkaD6ZXmysTQRNAttTu9VUHahchfsxvk
CPVHu/tMkv4A4EfQFxos
=JsnE
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Timothy Baldridge
I'd be up for something like this. I have a fair amount of clojure
experience, and I've done quite allot of work with OpenGL in other
languages, so this actually sounds fun! Another option to consider, is
the old DOS version of SpaceWar!

http://www.youtube.com/watch?v=yY5qHe2VadA

I like the idea of doing a Asteroids/Spacewar! clone, mostly because
it would give us a chance to introduce Agents as the building block of
the game engine.

Timothy

On Sun, Oct 30, 2011 at 1:32 PM, Dennis Haupt d.haup...@googlemail.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 hi community,

 i decided to create a (small) game in clojure to get a bit of
 non-theoretical experience. i'm pretty much a clojure noob (only did a
 few experiments) but have done a few real things in scala - which is
 totally awesome btw - so i do have some functional programming experience.

 if there's someone here who would like to join, just do so by
 answering yes or something like that.

 i was thinking about a game like asteroids, tower defense or that old
 game with lots of aliens on the top and two players at the bottom,
 shooting upwards.



 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.14 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iQIcBAEBAgAGBQJOrZhRAAoJENRtux+h35aGzE4P/2llb/0Pfy/qJSjK0pEM/plD
 ySU/CYupObaI3aZN+1aK8LwCQmiznyk6AUa8UcdO9fYcvEXDTBvHbWJUpimG0gUC
 pMUuL/wfTqB232gtuNbYMc6zYRoN3ddq4yZIq0QFnbqXI8PaxjQJBaS7J+5DZEGG
 JXaaA9RpTL6mnyTxxlw29BwHgmsv+xxbu09yAg8VHABD2TcuRUuz81OKmHTUxxhm
 1ZtlP9dw+jVzryNUHfE3lygn+stfIJxC3ui3cf4Rfham+CbhjpseClkXWA4nNYYF
 tqsQHxxe76CewXbQBpnKhqPvB9REo+qGdADi6camML5k+i6FYen4QXIvh5bF8PmO
 jkOFQZLN2t05pPEmq+lamMmpb3LA2VLVv4zC/m9mEgrJ/rB34Ewv1upU76Qme+OB
 r/++jgFeb0OcjdFs4kvJpF7wKFKHJv0nMfyzKnzrx4D0HckrpQdsBGsXjhDqsvZQ
 6QwamOZhk9yugPlqgEy3eN6VrKxY9JawQ0H6e5P+DD0F7UyDbYtBk/HcEx916Kjj
 CBNEIwImHoR/0uA7Dyzrn08LoaTcej7kSA06UOkOiRaw71T9EnQuOjDDabrzmsyk
 Go/R+rPMlgFTpdt6w43dnmmXqrOfKJqmFrvYztKBAulVoibY0ZSkwmKd/cftiYNw
 WSOA0yQMG5qN1pBmpiCk
 =j+7J
 -END PGP SIGNATURE-

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en



-- 
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

seems to be pretty similar to asteriods. we can just do an engine that
can do both. at the same time.

does clojure support remote agents?


Am 31.10.2011 12:41, schrieb Timothy Baldridge:
 I'd be up for something like this. I have a fair amount of clojure 
 experience, and I've done quite allot of work with OpenGL in other 
 languages, so this actually sounds fun! Another option to consider,
 is the old DOS version of SpaceWar!
 
 http://www.youtube.com/watch?v=yY5qHe2VadA
 
 I like the idea of doing a Asteroids/Spacewar! clone, mostly
 because it would give us a chance to introduce Agents as the
 building block of the game engine.
 
 Timothy
 
 On Sun, Oct 30, 2011 at 1:32 PM, Dennis Haupt
 d.haup...@googlemail.com wrote: hi community,
 
 i decided to create a (small) game in clojure to get a bit of 
 non-theoretical experience. i'm pretty much a clojure noob (only
 did a few experiments) but have done a few real things in scala -
 which is totally awesome btw - so i do have some functional
 programming experience.
 
 if there's someone here who would like to join, just do so by 
 answering yes or something like that.
 
 i was thinking about a game like asteroids, tower defense or that
 old game with lots of aliens on the top and two players at the
 bottom, shooting upwards.
 
 
 
 
 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en
 
 
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOrpI5AAoJENRtux+h35aG4TYQAI/fKfaddP0UAotFk44WekQs
joW3ea7v84rcg6qsCgQe0by0Zsa+oYP2nlQ4lneTu9VT4JQHC3MpLesRVYQ3qLQv
7VrBvuifLb84UeHWZhlYflMApVDr0l200anaHEhXbgxbG38MR0oBsAVg6wP5gx6a
TW17BSAIPEmu4XqMQxD9yYJvJMoMsKwDrA2Yguj7/hgJh3znNlADZZ6JVqKMv6h3
IyyYkDaYBJNAAhZiEm8zV1BVgzA6Lyh/IgBCWg2/o2oq4OkcjL2UBd2suvRO/gVS
24bBJoPHn+w2XVaplBWsxF/lEPnogOo9CeK5MOnaTVIA2Jq0e6cCnSM30OSsQ5UU
2kdnU6dOZ6VNocfL80T5b2eFvTjQKU6k3GIPV03FP6LxvRT8g/y5qqecTYlBW7G2
KJXY0Xw7otHQcaQxQD4kF//FCyim2+bQj5i//MhKzeMGRLr6CE8fSgov2nmwd6M8
yuCdip7bzOEsw2Bzr4iiC1dTp3pZhqLSIeDUJgFCI35argB4rai0RKne0eTly1fj
1jaQKddTY1mDrPKKsuKSwVAxFj6LeVHnBrdyzIr/9fEC/ccThIB8HoZmHbGU4jOZ
EwU9rCGNyd/lY1AcA6ou1MR2YY+MtlTmep7gczUHwelAsqbBxK3HS/2puPgQuOl+
8J+pEDcccpqAXRCKRSrp
=z8nu
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

isn't openGL a bit of overkill (we can just use java2d), or do you
want to add a renderer doing all sorts of awesome stuff which totally
contradicts the white-polygon-on-black-background graphics? might give
the game a pretty unique look :)

Am 31.10.2011 12:41, schrieb Timothy Baldridge:
 I'd be up for something like this. I have a fair amount of clojure 
 experience, and I've done quite allot of work with OpenGL in other 
 languages, so this actually sounds fun! Another option to consider,
 is the old DOS version of SpaceWar!
 
 http://www.youtube.com/watch?v=yY5qHe2VadA
 
 I like the idea of doing a Asteroids/Spacewar! clone, mostly
 because it would give us a chance to introduce Agents as the
 building block of the game engine.
 
 Timothy
 
 On Sun, Oct 30, 2011 at 1:32 PM, Dennis Haupt
 d.haup...@googlemail.com wrote: hi community,
 
 i decided to create a (small) game in clojure to get a bit of 
 non-theoretical experience. i'm pretty much a clojure noob (only
 did a few experiments) but have done a few real things in scala -
 which is totally awesome btw - so i do have some functional
 programming experience.
 
 if there's someone here who would like to join, just do so by 
 answering yes or something like that.
 
 i was thinking about a game like asteroids, tower defense or that
 old game with lots of aliens on the top and two players at the
 bottom, shooting upwards.
 
 
 
 
 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en
 
 
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOrpwDAAoJENRtux+h35aGBx4P/RXFWjr+zFQMjA49bHobnOKY
PbepwqpwunucJ9M6zp0MDnudoXWDyE2zCG7QgAf/ZgaSoI4+4KvRL5IwYgPwBDO2
rgAEMSyK30/HLnSnn5zgTrFRRTNde2oCFMB5soE5qYNvRKB0lXJ58DbKHF3f21H9
NXPwz4x6GU1Vs1w9Kx94Skx+Rf4mJKX7sN6choI8ENOE8dEiXiyTFdqO1cNjPZyR
iimmEhaXzwjkHCcCPiLo1rTSn14yNty0EObNvo/WhFqK/4Y3YP7NR9tWrHJSN5ll
Sc4n9+B+qpaHrun+QvjIE41vXaMF3LPrXLRM9tM042ImRdvy210eVBU5h1riGA97
R/0c9fm6L4UbeuhS/SBVEg3m9bdL62dcxOmDcYi0kuYrNRRcBbioptEYCxiyhcmy
bna6/k6UZX+YeLNtvXBk49+K2fQElC3TIzEmIkotMd3Q0gjhhSsoYgcW3uCvWLy1
0RNSPSmKmQ9m6Htif/yO2dCnCVadO/nJgqeE8LsDMhtLlh8gj4Q+x3ppU6cxtiEP
S9mGISRv6Sk6p88TVHZGVKXEHLaRuhWrfC0Nu1mTQQEwm3ilQ10ipSLrnvlGfvBs
eqCqVJpXtx/m6cvtLLczB3WoKpsGvLhDJMq0TFxYMIKbws726YdpN/VRaEMSkGFm
YJWqDYGOPOubGge4tJbn
=JTgF
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Timothy Baldridge
Haha! I forgot about Java2d... Yeah, that would work just fine. No,
Clojure does not support remote agents. But agents can really help in
a system like this to express objects as distinct entities. That is,
you have one object per item on the screen, and then each object
basically can live on its own:

(send entity update-time timespan)

(send asteroid do-split)

etc.

Actually, this really isn't too long of a project, at least the
asteroids part isn't.

Timothy

On Mon, Oct 31, 2011 at 8:00 AM, Dennis Haupt d.haup...@googlemail.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 isn't openGL a bit of overkill (we can just use java2d), or do you
 want to add a renderer doing all sorts of awesome stuff which totally
 contradicts the white-polygon-on-black-background graphics? might give
 the game a pretty unique look :)

 Am 31.10.2011 12:41, schrieb Timothy Baldridge:
 I'd be up for something like this. I have a fair amount of clojure
 experience, and I've done quite allot of work with OpenGL in other
 languages, so this actually sounds fun! Another option to consider,
 is the old DOS version of SpaceWar!

 http://www.youtube.com/watch?v=yY5qHe2VadA

 I like the idea of doing a Asteroids/Spacewar! clone, mostly
 because it would give us a chance to introduce Agents as the
 building block of the game engine.

 Timothy

 On Sun, Oct 30, 2011 at 1:32 PM, Dennis Haupt
 d.haup...@googlemail.com wrote: hi community,

 i decided to create a (small) game in clojure to get a bit of
 non-theoretical experience. i'm pretty much a clojure noob (only
 did a few experiments) but have done a few real things in scala -
 which is totally awesome btw - so i do have some functional
 programming experience.

 if there's someone here who would like to join, just do so by
 answering yes or something like that.

 i was thinking about a game like asteroids, tower defense or that
 old game with lots of aliens on the top and two players at the
 bottom, shooting upwards.




 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en





 - --

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.14 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iQIcBAEBAgAGBQJOrpwDAAoJENRtux+h35aGBx4P/RXFWjr+zFQMjA49bHobnOKY
 PbepwqpwunucJ9M6zp0MDnudoXWDyE2zCG7QgAf/ZgaSoI4+4KvRL5IwYgPwBDO2
 rgAEMSyK30/HLnSnn5zgTrFRRTNde2oCFMB5soE5qYNvRKB0lXJ58DbKHF3f21H9
 NXPwz4x6GU1Vs1w9Kx94Skx+Rf4mJKX7sN6choI8ENOE8dEiXiyTFdqO1cNjPZyR
 iimmEhaXzwjkHCcCPiLo1rTSn14yNty0EObNvo/WhFqK/4Y3YP7NR9tWrHJSN5ll
 Sc4n9+B+qpaHrun+QvjIE41vXaMF3LPrXLRM9tM042ImRdvy210eVBU5h1riGA97
 R/0c9fm6L4UbeuhS/SBVEg3m9bdL62dcxOmDcYi0kuYrNRRcBbioptEYCxiyhcmy
 bna6/k6UZX+YeLNtvXBk49+K2fQElC3TIzEmIkotMd3Q0gjhhSsoYgcW3uCvWLy1
 0RNSPSmKmQ9m6Htif/yO2dCnCVadO/nJgqeE8LsDMhtLlh8gj4Q+x3ppU6cxtiEP
 S9mGISRv6Sk6p88TVHZGVKXEHLaRuhWrfC0Nu1mTQQEwm3ilQ10ipSLrnvlGfvBs
 eqCqVJpXtx/m6cvtLLczB3WoKpsGvLhDJMq0TFxYMIKbws726YdpN/VRaEMSkGFm
 YJWqDYGOPOubGge4tJbn
 =JTgF
 -END PGP SIGNATURE-

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en



-- 
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

one agent per entity? i'd have done an agent for the whole world and
apply functions like apply-collision and apply-shot-fired to it

Am 31.10.2011 14:46, schrieb Timothy Baldridge:
 Haha! I forgot about Java2d... Yeah, that would work just fine.
 No, Clojure does not support remote agents. But agents can really
 help in a system like this to express objects as distinct entities.
 That is, you have one object per item on the screen, and then each
 object basically can live on its own:
 
 (send entity update-time timespan)
 
 (send asteroid do-split)
 
 etc.
 
 Actually, this really isn't too long of a project, at least the 
 asteroids part isn't.
 
 Timothy
 
 On Mon, Oct 31, 2011 at 8:00 AM, Dennis Haupt
 d.haup...@googlemail.com wrote: isn't openGL a bit of overkill
 (we can just use java2d), or do you want to add a renderer doing
 all sorts of awesome stuff which totally contradicts the
 white-polygon-on-black-background graphics? might give the game a
 pretty unique look :)
 
 Am 31.10.2011 12:41, schrieb Timothy Baldridge:
 I'd be up for something like this. I have a fair amount of
 clojure experience, and I've done quite allot of work with
 OpenGL in other languages, so this actually sounds fun!
 Another option to consider, is the old DOS version of
 SpaceWar!
 
 http://www.youtube.com/watch?v=yY5qHe2VadA
 
 I like the idea of doing a Asteroids/Spacewar! clone, mostly 
 because it would give us a chance to introduce Agents as the 
 building block of the game engine.
 
 Timothy
 
 On Sun, Oct 30, 2011 at 1:32 PM, Dennis Haupt 
 d.haup...@googlemail.com wrote: hi community,
 
 i decided to create a (small) game in clojure to get a bit
 of non-theoretical experience. i'm pretty much a clojure noob
 (only did a few experiments) but have done a few real things
 in scala - which is totally awesome btw - so i do have some
 functional programming experience.
 
 if there's someone here who would like to join, just do so
 by answering yes or something like that.
 
 i was thinking about a game like asteroids, tower defense or
 that old game with lots of aliens on the top and two players
 at the bottom, shooting upwards.
 
 
 
 
 -- You received this message because you are subscribed to
 the Google Groups Clojure group. To post to this group,
 send email to clojure@googlegroups.com Note that posts from
 new members are moderated - please be patient with your
 first post. To unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options,
 visit this group at
 http://groups.google.com/group/clojure?hl=en
 
 
 
 
 
 
 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en
 
 
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOrrKfAAoJENRtux+h35aG8xMP/RNYGqwEAXbuovpdI1KDyiny
fxUTQc+cppQwDNl43OwkdHlqlj7hHoWZVSshd5GoKjTBGGU/H6McILD0mKCvGUPw
EMOSDdzORPEJkQFc/VINGzBW3veQwAy/3K6TujwyO6ChsSCGbBepSABVvAtdUHpM
xU9CkSCu2s5iwxO25CrlsTliwV6xAAwUUkM0Rp7AR+qYco5msOPLBG0+KU/XVIPO
hqRX82SaqifPAbk2Yx4vRoR5wamF0w4vd0rRMVENMckImI3DteX1To+k3hHwCvLt
GJKyHwJXZRJ0JzBzUITjqfuVUI9pW+71RBh5odb13PuDNOpRou/k/JgDeTXK6e8t
l1BKpbchs+ar1IO38mlWSvsVwYDySuzkopBH1cSgOyAgUa1Yi/0HNSA05BgXxlyZ
voGnTGBjis/eLZ2Bdbz3EgITetxG/ypM41hlIj0QHEX6JWiAP9tCq7xvTLUVQ0a4
zzt+knoDOatQwbn+TgtcYyfl8ObtVrMJaQhpY5PnpdN3MDXFVqJpIZ8urm2UAn9w
35V+SiIV3/1UOAVaEdzmCLhDMPcHCuuB09rWZ7QpcywnomDyoGmURcog7hZX64hJ
OrhqBc1j39LmNwWO1cxSn9rPITsb8tozXt3VW5hIMXPWuIw2/uVla72PNl3jS7t8
OabAgU9XWOlNQOb5Vd/4
=FyCY
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Timothy Baldridge
I once wrote a test game engine that handled used a one-agent per
entity approach, and the idea was that it should be close to
linearly scale-able. It actually worked quite well. I think in the end
I tested it with more than 10,000 entities flying in a
flocking/following pattern, and the engine ran like a dream. IIRC the
limit with 10,000 entities was more because my GPU on my laptop is
crap, and couldn't push much more than that at a single time. With
10,000 entities on my quad-core desktop the app worked like a dream.

Now all this is overkill for a small game, but it did seem to work
well. Unfortunately, I'm not sure a game as small as asteroids would
work well to have multiple people working on it. Simply because each
part of the game (graphics, physics, gui, etc.) are all so small, that
multiple developers would just step on each other's toes.

Timothy

On Mon, Oct 31, 2011 at 9:37 AM, Dennis Haupt d.haup...@googlemail.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 one agent per entity? i'd have done an agent for the whole world and
 apply functions like apply-collision and apply-shot-fired to it

 Am 31.10.2011 14:46, schrieb Timothy Baldridge:
 Haha! I forgot about Java2d... Yeah, that would work just fine.
 No, Clojure does not support remote agents. But agents can really
 help in a system like this to express objects as distinct entities.
 That is, you have one object per item on the screen, and then each
 object basically can live on its own:

 (send entity update-time timespan)

 (send asteroid do-split)

 etc.

 Actually, this really isn't too long of a project, at least the
 asteroids part isn't.

 Timothy

 On Mon, Oct 31, 2011 at 8:00 AM, Dennis Haupt
 d.haup...@googlemail.com wrote: isn't openGL a bit of overkill
 (we can just use java2d), or do you want to add a renderer doing
 all sorts of awesome stuff which totally contradicts the
 white-polygon-on-black-background graphics? might give the game a
 pretty unique look :)

 Am 31.10.2011 12:41, schrieb Timothy Baldridge:
 I'd be up for something like this. I have a fair amount of
 clojure experience, and I've done quite allot of work with
 OpenGL in other languages, so this actually sounds fun!
 Another option to consider, is the old DOS version of
 SpaceWar!

 http://www.youtube.com/watch?v=yY5qHe2VadA

 I like the idea of doing a Asteroids/Spacewar! clone, mostly
 because it would give us a chance to introduce Agents as the
 building block of the game engine.

 Timothy

 On Sun, Oct 30, 2011 at 1:32 PM, Dennis Haupt
 d.haup...@googlemail.com wrote: hi community,

 i decided to create a (small) game in clojure to get a bit
 of non-theoretical experience. i'm pretty much a clojure noob
 (only did a few experiments) but have done a few real things
 in scala - which is totally awesome btw - so i do have some
 functional programming experience.

 if there's someone here who would like to join, just do so
 by answering yes or something like that.

 i was thinking about a game like asteroids, tower defense or
 that old game with lots of aliens on the top and two players
 at the bottom, shooting upwards.




 -- You received this message because you are subscribed to
 the Google Groups Clojure group. To post to this group,
 send email to clojure@googlegroups.com Note that posts from
 new members are moderated - please be patient with your
 first post. To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com For more options,
 visit this group at
 http://groups.google.com/group/clojure?hl=en






 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en





 - --

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.14 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iQIcBAEBAgAGBQJOrrKfAAoJENRtux+h35aG8xMP/RNYGqwEAXbuovpdI1KDyiny
 fxUTQc+cppQwDNl43OwkdHlqlj7hHoWZVSshd5GoKjTBGGU/H6McILD0mKCvGUPw
 EMOSDdzORPEJkQFc/VINGzBW3veQwAy/3K6TujwyO6ChsSCGbBepSABVvAtdUHpM
 xU9CkSCu2s5iwxO25CrlsTliwV6xAAwUUkM0Rp7AR+qYco5msOPLBG0+KU/XVIPO
 hqRX82SaqifPAbk2Yx4vRoR5wamF0w4vd0rRMVENMckImI3DteX1To+k3hHwCvLt
 GJKyHwJXZRJ0JzBzUITjqfuVUI9pW+71RBh5odb13PuDNOpRou/k/JgDeTXK6e8t
 l1BKpbchs+ar1IO38mlWSvsVwYDySuzkopBH1cSgOyAgUa1Yi/0HNSA05BgXxlyZ
 voGnTGBjis/eLZ2Bdbz3EgITetxG/ypM41hlIj0QHEX6JWiAP9tCq7xvTLUVQ0a4
 zzt+knoDOatQwbn+TgtcYyfl8ObtVrMJaQhpY5PnpdN3MDXFVqJpIZ8urm2UAn9w
 35V+SiIV3/1UOAVaEdzmCLhDMPcHCuuB09rWZ7QpcywnomDyoGmURcog7hZX64hJ
 OrhqBc1j39LmNwWO1cxSn9rPITsb8tozXt3VW5hIMXPWuIw2/uVla72PNl3jS7t8
 OabAgU9XWOlNQOb5Vd/4
 =FyCY
 -END PGP SIGNATURE-

 --
 You received this message because you are subscribed to the Google
 Groups Clojure 

Re: anyone interested in a small game?

2011-10-31 Thread Jack Moffitt
 Unfortunately, I'm not sure a game as small as asteroids would
 work well to have multiple people working on it. Simply because each
 part of the game (graphics, physics, gui, etc.) are all so small, that
 multiple developers would just step on each other's toes.

What we need is a Clojure game jam :)

jack.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

i'm not looking for people to split the work and get things done
faster, i'm looking for people to think about how and why things
should be done.

for example, right now i have a record called gameentity which
contains a position, the current health, speed, the polygon
representation which should be rendered and a few more things - but
haven't figured out yet where to put the logic and how to apply it so
that everything is easily extensible





Am 31.10.2011 15:44, schrieb Timothy Baldridge:
 I once wrote a test game engine that handled used a one-agent per 
 entity approach, and the idea was that it should be close to 
 linearly scale-able. It actually worked quite well. I think in the
 end I tested it with more than 10,000 entities flying in a 
 flocking/following pattern, and the engine ran like a dream. IIRC
 the limit with 10,000 entities was more because my GPU on my laptop
 is crap, and couldn't push much more than that at a single time.
 With 10,000 entities on my quad-core desktop the app worked like a
 dream.
 
 Now all this is overkill for a small game, but it did seem to work 
 well. Unfortunately, I'm not sure a game as small as asteroids
 would work well to have multiple people working on it. Simply
 because each part of the game (graphics, physics, gui, etc.) are
 all so small, that multiple developers would just step on each
 other's toes.
 
 Timothy
 
 On Mon, Oct 31, 2011 at 9:37 AM, Dennis Haupt
 d.haup...@googlemail.com wrote: one agent per entity? i'd have
 done an agent for the whole world and apply functions like
 apply-collision and apply-shot-fired to it
 
 Am 31.10.2011 14:46, schrieb Timothy Baldridge:
 Haha! I forgot about Java2d... Yeah, that would work just
 fine. No, Clojure does not support remote agents. But agents
 can really help in a system like this to express objects as
 distinct entities. That is, you have one object per item on
 the screen, and then each object basically can live on its
 own:
 
 (send entity update-time timespan)
 
 (send asteroid do-split)
 
 etc.
 
 Actually, this really isn't too long of a project, at least
 the asteroids part isn't.
 
 Timothy
 
 On Mon, Oct 31, 2011 at 8:00 AM, Dennis Haupt 
 d.haup...@googlemail.com wrote: isn't openGL a bit of
 overkill (we can just use java2d), or do you want to add a
 renderer doing all sorts of awesome stuff which totally
 contradicts the white-polygon-on-black-background graphics?
 might give the game a pretty unique look :)
 
 Am 31.10.2011 12:41, schrieb Timothy Baldridge:
 I'd be up for something like this. I have a fair amount
 of clojure experience, and I've done quite allot of
 work with OpenGL in other languages, so this actually
 sounds fun! Another option to consider, is the old DOS
 version of SpaceWar!
 
 http://www.youtube.com/watch?v=yY5qHe2VadA
 
 I like the idea of doing a Asteroids/Spacewar! clone,
 mostly because it would give us a chance to introduce
 Agents as the building block of the game engine.
 
 Timothy
 
 On Sun, Oct 30, 2011 at 1:32 PM, Dennis Haupt 
 d.haup...@googlemail.com wrote: hi community,
 
 i decided to create a (small) game in clojure to get a
 bit of non-theoretical experience. i'm pretty much a
 clojure noob (only did a few experiments) but have done
 a few real things in scala - which is totally awesome
 btw - so i do have some functional programming
 experience.
 
 if there's someone here who would like to join, just do
 so by answering yes or something like that.
 
 i was thinking about a game like asteroids, tower
 defense or that old game with lots of aliens on the top
 and two players at the bottom, shooting upwards.
 
 
 
 
 -- You received this message because you are
 subscribed to the Google Groups Clojure group. To
 post to this group, send email to
 clojure@googlegroups.com Note that posts from new
 members are moderated - please be patient with your 
 first post. To unsubscribe from this group, send
 email to clojure+unsubscr...@googlegroups.com For
 more options, visit this group at 
 http://groups.google.com/group/clojure?hl=en
 
 
 
 
 
 
 -- You received this message because you are subscribed to
 the Google Groups Clojure group. To post to this group,
 send email to clojure@googlegroups.com Note that posts from
 new members are moderated - please be patient with your
 first post. To unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options,
 visit this group at
 http://groups.google.com/group/clojure?hl=en
 
 
 
 
 
 
 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en
 
 
 


- -- 

-BEGIN PGP 

Re: anyone interested in a small game?

2011-10-31 Thread Jack Moffitt
 for example, right now i have a record called gameentity which
 contains a position, the current health, speed, the polygon
 representation which should be rendered and a few more things - but
 haven't figured out yet where to put the logic and how to apply it so
 that everything is easily extensible

In the OOP languages, entity systems seem to be all the rage. I
suggest stealing ideas from there if you can.

I'll note that most descriptions of such systems are very much written
for C++ programmers, and many of their explanations are tough to get
through if you aren't familiar with the problems.

The basic idea is something like splitting up your record above into a
record per feature. An entity is then just an aggregation of such
features. Then for each feature, there is a function which handles
changes to that feature.  The game loop goes through each function,
runs it against all entities, and then continues.

In some ways, the entities are data and relations, and the functions
that operate on them take queries on this data as input.

jack.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Timothy Baldridge
 In the OOP languages, entity systems seem to be all the rage. I
 suggest stealing ideas from there if you can.


In this same vein, I'd recommend thinking about the following approach:

First, read up on reify and protocols. Next, create protocols for the
main areas of your engine. Perhaps start with IRender and
IPhysicalEntity

(defprotocol IRender
(render [this]))

(defprotocol IPhysicalEntity
(update-position [this timespan]))



then for the user ship, you can do something as simple as:

(defn new-ship [x y]
   (let [pos (atom {:x x :y y})]
(reify
 IRender
(render [this]
(render-ship-model pos))
 IPhysicalEntity
(update-position [this timespan]
(swap! pos
 #(hash-map :x (inc (:x %)) :y (:y %)))

there's bound to be errors in the above code, but you get the point.
The thing I love about the above example is that we've completely
abstracted away the parts of this engine. We can have entities that
implement different protocols, we can have a separate data structure
for each and every entity, depending on its needs, and everything is
abstracted nicely. Static objects can just implement IRender, and
invisible objects can implement IPhysicalEntity. Extend this to
implement ICollideable (for collision detection), and you have the
makings of a very extensible system.

Timothy

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

no need for IRender since everything has a java.awt.polygon. i just
draw it. in a sense, the polygon is my IRender and it's data is the
implementation.

i was thinking about using a simple type (:asteroid, :ship, :bullet)
for each entity and pick an advance-function (input = complete old
game state + one specific entity, output = new entity) depending on it.
- -
{:asteroid advance-asteroid :ship advance-ship}

i'd like to avoid mutable states as much as possible which means there
will be one atom or agent for the whole world and a bufferedimage.
other than that, i'd like to stay purely functional.

Am 31.10.2011 19:03, schrieb Timothy Baldridge:
 In the OOP languages, entity systems seem to be all the rage. I 
 suggest stealing ideas from there if you can.
 
 
 In this same vein, I'd recommend thinking about the following
 approach:
 
 First, read up on reify and protocols. Next, create protocols for
 the main areas of your engine. Perhaps start with IRender and 
 IPhysicalEntity
 
 (defprotocol IRender (render [this]))
 
 (defprotocol IPhysicalEntity (update-position [this timespan]))
 
 
 
 then for the user ship, you can do something as simple as:
 
 (defn new-ship [x y] (let [pos (atom {:x x :y y})] (reify IRender 
 (render [this] (render-ship-model pos)) IPhysicalEntity 
 (update-position [this timespan] (swap! pos #(hash-map :x (inc (:x
 %)) :y (:y %)))
 
 there's bound to be errors in the above code, but you get the
 point. The thing I love about the above example is that we've
 completely abstracted away the parts of this engine. We can have
 entities that implement different protocols, we can have a separate
 data structure for each and every entity, depending on its needs,
 and everything is abstracted nicely. Static objects can just
 implement IRender, and invisible objects can implement
 IPhysicalEntity. Extend this to implement ICollideable (for
 collision detection), and you have the makings of a very extensible
 system.
 
 Timothy
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOruwPAAoJENRtux+h35aG0NsP/3CmDZHPnWjIYS2wULzTE4cp
t9w+Citz3ZEfK5KmLDpy2dPB9l5bu2K4r7cwcgfmLLdZ90rcxgcan+WbtkffiPwd
RZdB/E6IJrVPd2RvTt858VjNYvIeWxeU4XhpgS9EUBjiqRurQHrVrV/5bKFudRGn
E8WO+wYv8kMGRxlB/3YjYxhxRtqy7Kevaf508J3Tq+U49TBnzpBYPvO8yX+HzRO2
RNDVOr4S1ANf4OPn0l7AETxnEcvsI5D359JwSMGQ5whSk60kveZXTsMiD6nCFsQ0
2CD57iGlhHisNF78gnT78x+Qi1aMmkzWl2adfeXrW/zqZLXghLHaWamEy9dETATY
TZxRlvYgqkp7Bwqh4+PHCB20uzRPTHex2bSw6SqY53XYiK8IWCG6iecwz0t/cuOt
BxWRn+uTOlgX8FPZqX954eMmu1/5QjNRje5+i8kS7naRuXeZQLxwgZt6uFHN8jTS
H4s2aso0eWyfimTQXgwQx1K+81LzbF+bDk2iI/6lk6sdbCoD1RkaIzp5qYJIxU4v
zmFInbt+tPQFHtl8taEoUavN/Vc8//evcBDQpfdZ32JhzmZUHqGeJXEHQuVFojSr
ursyF9oiCrWRlm4j63hWrYYdf6OUIzOYlzN2ehXGWt0Ek8TbV2J36XY8Jf6sPu3v
9LVXoiGlFmrjEtPKxog0
=8KV+
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Timothy Baldridge
As far as the mutable state goes, yes, that's probably a better route,
at least for a simple game. However I would recommend against
everything is a polygon route. Once again, for a simple game, this
may be fine, but you're now making an assumption: everything is a
polygon. What if you want a simple laser point-to-point entity? What
if you want a planet that is represented by a circle? What if you want
your ship to be a different color than the asteroids? By implementing
IRender, you get two side effects:

1) you can now de-couple the presentation of the object, from the code
that presents it
2) you can have very complex models (multiple polygons and colors)
without having complex render code
3) you can have entities represented by bitmaps, polygons, circles,
arcs, 3d meshes, etc.

This is what Clojure excels at...de-coupling, or as Rich put it in his
recent talk Simple made Easy: don't assume things about your code.
Don't assume that all models will always fit into the concept of a
polygon...don't assume that you'll always want to represent your
models via Java2D.

Now, I'm not saying that your idea is bad for a simple game...but for
a larger project you may run into problems with this approach.

If you want a good way to think about this, I'd recommend trying to
design the engine to run on both Clojure and ClojureScript. Have it
support Java2D, SVG and Canvas front ends...even if you don't
implement anything but the JVM version, if you can at least show that
your engine would work on these other platforms without heavy
modifications (massive kodos if you can do this without any
modifications to the core engine at all) then I would say you have
reached a higher plane of understanding in when it comes to Clojure.

Timothy



On Mon, Oct 31, 2011 at 1:42 PM, Dennis Haupt d.haup...@googlemail.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 no need for IRender since everything has a java.awt.polygon. i just
 draw it. in a sense, the polygon is my IRender and it's data is the
 implementation.

 i was thinking about using a simple type (:asteroid, :ship, :bullet)
 for each entity and pick an advance-function (input = complete old
 game state + one specific entity, output = new entity) depending on it.
 - -
 {:asteroid advance-asteroid :ship advance-ship}

 i'd like to avoid mutable states as much as possible which means there
 will be one atom or agent for the whole world and a bufferedimage.
 other than that, i'd like to stay purely functional.

 Am 31.10.2011 19:03, schrieb Timothy Baldridge:
 In the OOP languages, entity systems seem to be all the rage. I
 suggest stealing ideas from there if you can.


 In this same vein, I'd recommend thinking about the following
 approach:

 First, read up on reify and protocols. Next, create protocols for
 the main areas of your engine. Perhaps start with IRender and
 IPhysicalEntity

 (defprotocol IRender (render [this]))

 (defprotocol IPhysicalEntity (update-position [this timespan]))



 then for the user ship, you can do something as simple as:

 (defn new-ship [x y] (let [pos (atom {:x x :y y})] (reify IRender
 (render [this] (render-ship-model pos)) IPhysicalEntity
 (update-position [this timespan] (swap! pos #(hash-map :x (inc (:x
 %)) :y (:y %)))

 there's bound to be errors in the above code, but you get the
 point. The thing I love about the above example is that we've
 completely abstracted away the parts of this engine. We can have
 entities that implement different protocols, we can have a separate
 data structure for each and every entity, depending on its needs,
 and everything is abstracted nicely. Static objects can just
 implement IRender, and invisible objects can implement
 IPhysicalEntity. Extend this to implement ICollideable (for
 collision detection), and you have the makings of a very extensible
 system.

 Timothy



 - --

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.14 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iQIcBAEBAgAGBQJOruwPAAoJENRtux+h35aG0NsP/3CmDZHPnWjIYS2wULzTE4cp
 t9w+Citz3ZEfK5KmLDpy2dPB9l5bu2K4r7cwcgfmLLdZ90rcxgcan+WbtkffiPwd
 RZdB/E6IJrVPd2RvTt858VjNYvIeWxeU4XhpgS9EUBjiqRurQHrVrV/5bKFudRGn
 E8WO+wYv8kMGRxlB/3YjYxhxRtqy7Kevaf508J3Tq+U49TBnzpBYPvO8yX+HzRO2
 RNDVOr4S1ANf4OPn0l7AETxnEcvsI5D359JwSMGQ5whSk60kveZXTsMiD6nCFsQ0
 2CD57iGlhHisNF78gnT78x+Qi1aMmkzWl2adfeXrW/zqZLXghLHaWamEy9dETATY
 TZxRlvYgqkp7Bwqh4+PHCB20uzRPTHex2bSw6SqY53XYiK8IWCG6iecwz0t/cuOt
 BxWRn+uTOlgX8FPZqX954eMmu1/5QjNRje5+i8kS7naRuXeZQLxwgZt6uFHN8jTS
 H4s2aso0eWyfimTQXgwQx1K+81LzbF+bDk2iI/6lk6sdbCoD1RkaIzp5qYJIxU4v
 zmFInbt+tPQFHtl8taEoUavN/Vc8//evcBDQpfdZ32JhzmZUHqGeJXEHQuVFojSr
 ursyF9oiCrWRlm4j63hWrYYdf6OUIzOYlzN2ehXGWt0Ek8TbV2J36XY8Jf6sPu3v
 9LVXoiGlFmrjEtPKxog0
 =8KV+
 -END PGP SIGNATURE-

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - 

Re: anyone interested in a small game?

2011-10-31 Thread Jack Moffitt
 However I would recommend against
 everything is a polygon route. Once again, for a simple game, this
 may be fine, but you're now making an assumption: everything is a
 polygon. What if you want a simple laser point-to-point entity? What
 if you want a planet that is represented by a circle? What if you want
 your ship to be a different color than the asteroids?

A simple example is a trigger. This in fact has a polygon (or rather,
a volume or area), and causes some event to happen when some object
collides with it. However, it is not rendered itself.

Lots of game logic is implemented as triggers and other things, which
are entities but not rendered. This is overkill perhaps for the simple
games, but very flexible for the not so simple ones.

I highly recommend reading this description of the Thief engine:
http://www.gamasutra.com/view/feature/3355/postmortem_thief_the_dark_project.php?print=1

jack.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

this is my opinion as well:
adding a layer of abstraction at a later point in time is much more
difficult than removing one that is just delegating calls, so it often
pays off to add one in the beginning just in case. i decided to just
skip that because everything is going to be a polygon, even lines and
circles can be represented as polygons.

i did what you suggested anyway.

Am 31.10.2011 20:03, schrieb Timothy Baldridge:
 As far as the mutable state goes, yes, that's probably a better
 route, at least for a simple game. However I would recommend
 against everything is a polygon route. Once again, for a simple
 game, this may be fine, but you're now making an assumption:
 everything is a polygon. What if you want a simple laser
 point-to-point entity? What if you want a planet that is
 represented by a circle? What if you want your ship to be a
 different color than the asteroids? By implementing IRender


, you get two side effects:
 
 1) you can now de-couple the presentation of the object, from the
 code that presents it 2) you can have very complex models (multiple
 polygons and colors) without having complex render code 3) you can
 have entities represented by bitmaps, polygons, circles, arcs, 3d
 meshes, etc.
 
 This is what Clojure excels at...de-coupling, or as Rich put it in
 his recent talk Simple made Easy: don't assume things about your
 code. Don't assume that all models will always fit into the concept
 of a polygon...don't assume that you'll always want to represent
 your models via Java2D.
 
 Now, I'm not saying that your idea is bad for a simple game...but
 for a larger project you may run into problems with this approach.
 
 If you want a good way to think about this, I'd recommend trying
 to design the engine to run on both Clojure and ClojureScript. Have
 it support Java2D, SVG and Canvas front ends...even if you don't 
 implement anything but the JVM version, if you can at least show
 that your engine would work on these other platforms without heavy 
 modifications (massive kodos if you can do this without any 
 modifications to the core engine at all) then I would say you have 
 reached a higher plane of understanding in when it comes to
 Clojure.



 
 Timothy
 
 
 
 On Mon, Oct 31, 2011 at 1:42 PM, Dennis Haupt
 d.haup...@googlemail.com wrote: no need for IRender since
 everything has a java.awt.polygon. i just draw it. in a sense, the
 polygon is my IRender and it's data is the implementation.
 
 i was thinking about using a simple type (:asteroid, :ship,
 :bullet) for each entity and pick an advance-function (input =
 complete old game state + one specific entity, output = new entity)
 depending on it. - {:asteroid advance-asteroid :ship
 advance-ship}
 
 i'd like to avoid mutable states as much as possible which means
 there will be one atom or agent for the whole world and a
 bufferedimage. other than that, i'd like to stay purely
 functional.
 
 Am 31.10.2011 19:03, schrieb Timothy Baldridge:
 In the OOP languages, entity systems seem to be all the
 rage. I suggest stealing ideas from there if you can.
 
 
 In this same vein, I'd recommend thinking about the
 following approach:
 
 First, read up on reify and protocols. Next, create protocols
 for the main areas of your engine. Perhaps start with IRender
 and IPhysicalEntity
 
 (defprotocol IRender (render [this]))
 
 (defprotocol IPhysicalEntity (update-position [this
 timespan]))
 
 
 
 then for the user ship, you can do something as simple as:
 
 (defn new-ship [x y] (let [pos (atom {:x x :y y})] (reify
 IRender (render [this] (render-ship-model pos))
 IPhysicalEntity (update-position [this timespan] (swap! pos
 #(hash-map :x (inc (:x %)) :y (:y %)))
 
 there's bound to be errors in the above code, but you get
 the point. The thing I love about the above example is that
 we've completely abstracted away the parts of this engine. We
 can have entities that implement different protocols, we can
 have a separate data structure for each and every entity,
 depending on its needs, and everything is abstracted nicely.
 Static objects can just implement IRender, and invisible
 objects can implement IPhysicalEntity. Extend this to
 implement ICollideable (for collision detection), and you
 have the makings of a very extensible system.
 
 Timothy
 
 
 
 
 -- You received this message because you are subscribed to the
 Google Groups Clojure group. To post to this group, send email
 to clojure@googlegroups.com Note that posts from new members are
 moderated - please be patient with your first post. To
 unsubscribe from this group, send email to 
 clojure+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/clojure?hl=en
 
 
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOrvt3AAoJENRtux+h35aGpaUP+wRIRAEckRC/QISuwCUzeYm8

Re: anyone interested in a small game?

2011-10-31 Thread Michael Gardner
On Oct 31, 2011, at 2:03 PM, Timothy Baldridge wrote:

 This is what Clojure excels at...de-coupling, or as Rich put it in his
 recent talk Simple made Easy: don't assume things about your code.
 Don't assume that all models will always fit into the concept of a
 polygon...don't assume that you'll always want to represent your
 models via Java2D.

It's impossible to make zero assumptions about your code; the trick is figuring 
out which are the appropriate ones. Making too many assumptions leads to 
brittle and hard-to-extend code, but making too few leads to over-generalized, 
ponderous code that does way more than it's ever likely to be used for.

In a case like this game, it should be easy to refactor away from the 
everything is a polygon model if and when the game outgrows it, so I'd argue 
against introducing the extra complexity of per-entity renderers until it's 
actually necessary.

That's a strength of dynamic, expressive languages like Clojure, IMO: because 
there's so much less code, refactoring is much easier. So instead of trying to 
predict all future requirements and possibly ending up with over-generalized 
code, you can make assumptions based on current/near-term requirements and 
refactor when those assumptions no longer apply.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

if you *really* make zero assumptions, every second call has to be a
protocol/interface call. *i know what i am, so no assumption* -
*interface call* - *repeat*

i think no assumptions should be make no assumptions about the
internals of what you are calling. as long as you just code against
the outer shell, you should be fine.

Am 31.10.2011 20:54, schrieb Michael Gardner:
 On Oct 31, 2011, at 2:03 PM, Timothy Baldridge wrote:
 
 This is what Clojure excels at...de-coupling, or as Rich put it
 in his recent talk Simple made Easy: don't assume things about
 your code. Don't assume that all models will always fit into the
 concept of a polygon...don't assume that you'll always want to
 represent your models via Java2D.
 
 It's impossible to make zero assumptions about your code; the trick
 is figuring out which are the appropriate ones. Making too many
 assumptions leads to brittle and hard-to-extend code, but making
 too few leads to over-generalized, ponderous code that does way
 more than it's ever likely to be used for.
 
 In a case like this game, it should be easy to refactor away from
 the everything is a polygon model if and when the game outgrows
 it, so I'd argue against introducing the extra complexity of
 per-entity renderers until it's actually necessary.
 
 That's a strength of dynamic, expressive languages like Clojure,
 IMO: because there's so much less code, refactoring is much easier.
 So instead of trying to predict all future requirements and
 possibly ending up with over-generalized code, you can make
 assumptions based on current/near-term requirements and refactor
 when those assumptions no longer apply.
 


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOrwmYAAoJENRtux+h35aGTQgQAMC1bUbjN0Mz90fmOQVUCjBN
zO+UJXfaiVo6DmR0usZkv1ynwTyuZwQm+llhamabAMLUZXsIiAcbpu0KLjkxJwjJ
S6EpZwAsRnqYtUTn3DvdFC3kTkgUR5+KD7fQ97PBHBmyNKcy+GcU7MQP0bsZ9KdQ
26K6qo5TqWmkQEzvg9kVBrB2W5FQj6BuH7UA3LQxHSegpc4Wryxf9qQZFEa5mqFg
IdRUFFR2oLOD1rCBcVoeV9hvyPeIdw8ntHoVVepfeDN+PspC3Z58f09dr9E8gar6
Jp9DSgOsZr6ClUHVGUhVOaWPiFeZLunOe9cOCJTaanXKzkE1fejzuQez51sAo3ns
mSF40Ezip30kTpJWld1mQV4/mFgsmfymegQiJ71r8V0nEJxOESpmGPb3by0CIAyE
sqoFyh/oqbp8lwupwHI636L6O9DPqKYwIVv1ba0q09NhO6rbvDe93+9lWTs3n+XB
XLJprZjoU8A7PtUxCEdVCWx75Hi5Lt3FXaFeF/36clWCftRC9yyy+61ZAM5UrmsC
4QjUIG3jJCX7aeHteerWZrkApieYr5JBxL81Zyvf6at0wnINr/x8drWuB8R9gwKy
gBIpi+WrjSZhlCgkaQnJocgxrMhNTkdk1XsRcdHDFt1j5kLfb3ZdjK+rSr13XX0H
5FLhhzQZOnnlDibXw1P9
=nWrK
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: anyone interested in a small game?

2011-10-31 Thread Vikrant Behal
Yes, I am interested. Wanna get some practical experience in clojure.

Cheers!
Vikrant Behal
+91 8884963403

P Please do not print this email unless it is absolutely necessary.
Spread environmental awareness.





On Mon, Oct 31, 2011 at 12:02 AM, Dennis Haupt d.haup...@googlemail.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 hi community,

 i decided to create a (small) game in clojure to get a bit of
 non-theoretical experience. i'm pretty much a clojure noob (only did a
 few experiments) but have done a few real things in scala - which is
 totally awesome btw - so i do have some functional programming experience.

 if there's someone here who would like to join, just do so by
 answering yes or something like that.

 i was thinking about a game like asteroids, tower defense or that old
 game with lots of aliens on the top and two players at the bottom,
 shooting upwards.



 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.14 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iQIcBAEBAgAGBQJOrZhRAAoJENRtux+h35aGzE4P/2llb/0Pfy/qJSjK0pEM/plD
 ySU/CYupObaI3aZN+1aK8LwCQmiznyk6AUa8UcdO9fYcvEXDTBvHbWJUpimG0gUC
 pMUuL/wfTqB232gtuNbYMc6zYRoN3ddq4yZIq0QFnbqXI8PaxjQJBaS7J+5DZEGG
 JXaaA9RpTL6mnyTxxlw29BwHgmsv+xxbu09yAg8VHABD2TcuRUuz81OKmHTUxxhm
 1ZtlP9dw+jVzryNUHfE3lygn+stfIJxC3ui3cf4Rfham+CbhjpseClkXWA4nNYYF
 tqsQHxxe76CewXbQBpnKhqPvB9REo+qGdADi6camML5k+i6FYen4QXIvh5bF8PmO
 jkOFQZLN2t05pPEmq+lamMmpb3LA2VLVv4zC/m9mEgrJ/rB34Ewv1upU76Qme+OB
 r/++jgFeb0OcjdFs4kvJpF7wKFKHJv0nMfyzKnzrx4D0HckrpQdsBGsXjhDqsvZQ
 6QwamOZhk9yugPlqgEy3eN6VrKxY9JawQ0H6e5P+DD0F7UyDbYtBk/HcEx916Kjj
 CBNEIwImHoR/0uA7Dyzrn08LoaTcej7kSA06UOkOiRaw71T9EnQuOjDDabrzmsyk
 Go/R+rPMlgFTpdt6w43dnmmXqrOfKJqmFrvYztKBAulVoibY0ZSkwmKd/cftiYNw
 WSOA0yQMG5qN1pBmpiCk
 =j+7J
 -END PGP SIGNATURE-

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


anyone interested in a small game?

2011-10-30 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hi community,

i decided to create a (small) game in clojure to get a bit of
non-theoretical experience. i'm pretty much a clojure noob (only did a
few experiments) but have done a few real things in scala - which is
totally awesome btw - so i do have some functional programming experience.

if there's someone here who would like to join, just do so by
answering yes or something like that.

i was thinking about a game like asteroids, tower defense or that old
game with lots of aliens on the top and two players at the bottom,
shooting upwards.



-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOrZhRAAoJENRtux+h35aGzE4P/2llb/0Pfy/qJSjK0pEM/plD
ySU/CYupObaI3aZN+1aK8LwCQmiznyk6AUa8UcdO9fYcvEXDTBvHbWJUpimG0gUC
pMUuL/wfTqB232gtuNbYMc6zYRoN3ddq4yZIq0QFnbqXI8PaxjQJBaS7J+5DZEGG
JXaaA9RpTL6mnyTxxlw29BwHgmsv+xxbu09yAg8VHABD2TcuRUuz81OKmHTUxxhm
1ZtlP9dw+jVzryNUHfE3lygn+stfIJxC3ui3cf4Rfham+CbhjpseClkXWA4nNYYF
tqsQHxxe76CewXbQBpnKhqPvB9REo+qGdADi6camML5k+i6FYen4QXIvh5bF8PmO
jkOFQZLN2t05pPEmq+lamMmpb3LA2VLVv4zC/m9mEgrJ/rB34Ewv1upU76Qme+OB
r/++jgFeb0OcjdFs4kvJpF7wKFKHJv0nMfyzKnzrx4D0HckrpQdsBGsXjhDqsvZQ
6QwamOZhk9yugPlqgEy3eN6VrKxY9JawQ0H6e5P+DD0F7UyDbYtBk/HcEx916Kjj
CBNEIwImHoR/0uA7Dyzrn08LoaTcej7kSA06UOkOiRaw71T9EnQuOjDDabrzmsyk
Go/R+rPMlgFTpdt6w43dnmmXqrOfKJqmFrvYztKBAulVoibY0ZSkwmKd/cftiYNw
WSOA0yQMG5qN1pBmpiCk
=j+7J
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en