how to write a 2D game by using GWT and html5.

802 views
Skip to first unread message

Joey

unread,
Aug 28, 2012, 3:51:33 PM8/28/12
to google-we...@googlegroups.com
I want to write a simple animated 2D game by using GWT and HTML5. The game basically needs to keep running several animations all the time, but I do not know what libraries or techniques I should use to achieve this.
Based on my experience in GWT so far, I know I can just use plain GWT and GWT-animation to achieve what I want. This is the easiest way for me to achieve. However, I hope I can make the game look and feel a bit more professional and attractive. So GWT-Canvas may be the good option for me to write the animation. Physical reactions and Audio are also the important concern. 
Please give me some advices about the following questions.

1. To write the animations, which technique should I use, plain GWT-animation or GWT-Canvas+HTML5. Which one has better performance? (the game will be running on the webpage, so the level of performance is the most important for me)
2. Is there any good libs I should definitely use for writing 2d games? I do not prefer the complicated lib because my game is pretty simple.
3. I am considering using some game engine. My game is easy and simple, I could make a fake physical reactions by just using some math functions to run the animations. but if the game engine is easy and handy to use, then I would prefer using game engine. So is there any good one out there for beginners?
4. Please give me some advices about making the game audio. are there any good audio libraries for GWT projects?

Thanks.

Chris Price

unread,
Aug 28, 2012, 3:54:58 PM8/28/12
to google-we...@googlegroups.com
Have you looked at PlayN?

http://code.google.com/p/playn/
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/ppy_atK6jRkJ.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.

Andrei

unread,
Aug 28, 2012, 7:37:17 PM8/28/12
to google-we...@googlegroups.com
I love GWT, but I think it's the wrong choice for a simple game. Take a look at my game: www.playgrape.com. I did it in jQuery using canvas. It has its own physics engine with collision detection, etc., and the total size of the game is less than 6kB (plus jQuery). Even a simple GWT app will get you over 300kB very quickly, even more with RequestFactory.

Unless you have a lot of complex data entities and a complicated UI (many different views, panels, popups), jQuery is a better option.

As for the third party libraries, I would not recommend any for a simple game. Libraries I looked at were heavy and geared for more complex games. Drawing on canvas is pretty simple.

Reply all
Reply to author
Forward
0 new messages