简体   繁体   中英

Should I use Flash or Java?

I want to make some 2d games that I may want to submit to a game site, such as newgrounds.com. Even if I decide not to submit, I'd still like to know which is a better choice.

Which has a faster startup time? Which performs faster in a 2d game? Which IDE should I use?

Thanks in advance!

EDIT:

Also, a couple more quick questions. I have used xna quite a bit, and silverlight a little. Where do I get started with flash? And what 2d libraries do i need? Also, is flash going to be anything like xna with an update loop and a draw loop?

The de facto standard for browser games is Flash. While there are game submission sites like ArcadePod.com that accept Java, most (including Newgrounds) are Flash exclusive.

Notably, Adobe Flash Pro and Adobe Flash Builder both cost $700.

Performance-wise and deployment-wise, Java using JOGL is probably the best I've seen in a browser.
Check this out: https://jogl-demos.dev.java.net/applettest.html

That said, Flash and HTML5 should be hardware accelerated... at some point in the future. We should be seeing some very nice DHTML5 graphics libraries very soon. Combined with more Javascript-targeting compilers like GWT, I'm guessing that this is where we'll be seeing much game development in the future.

JavaFx是开发2D / 3D游戏的一项即将出现的技术,实际上它具有与Flash相同的效果。您可以在Netbeans IDE中拥有其库并内置支持IDE。

Definitley Flash over Java for in browser. Silverlight is also decent. Don't expect Flash or Silverlight to perform as well as XNA, as XNA makes use of the GPU with programmable shaders etc.

I recommend using FlashDevelop if you don't want to pay for any tools.

Realtime games in Flash use a loop. There are two ways of achieving this. The first is to create a Timer object and create a listener for it. The second is to listen to an ENTER_FRAME event (which is dependant on the Framerate you set). I personally use the second way of doing it. Since you can not guarantee the framerate its good practise to use a time delta to adjust values.

The best thing about Flash is there are a lot of mature engines out there, I will only focus on 2D ones here.

  • For physics, Box2D is the way to go, its a port of the C++ Box2D engine. Very powerful.
  • For keyboard input grab this class: KeyPoll
  • Depending on the type of game, the as3 game engine fixel might be useful

As for rendering, the simplest way is to use Sprites and Movieclips. You can draw programmatically, or if you use Adobe Flash Pro you can draw them by hand. An alternate way to render is to create a bitmap object and draw pixels to it.

I think it would be worth investing in a good book. For learning ActionScript3.0 everyone recommends Essential ActionScript 3.0 by Colin Mook.

For games development: Foundation Actionscript 3.0 Animation: Making Things Move! and AdvancED ActionScript 3.0 Animation by Keith Peters are great. You can find his blog at Bit-101

And last but not least, a fairly new book The Essential Guide To Flash Games looks great but I have not read it yet.

Also if you search stackoverflow you will find similar questions about learning AS3 with links to online resources.

I have developed both in Java2d/swings/graphics and Flash. Flash uses VECTOR Graphics which has a very good output irrespective of any screen resolution. Plus it will become fun and easier to design objects in flash rather doing everything by coding in Java.

That does not mean that you have everything ready in Flash. You still have to work with Actionscripts which obviously involves coding but it will be really fun once you learn it. You can always post your problems in this community where you have nice support for any actionscript related issues.

All the best!

If you are building a game, mass outreach is more important than any of the factors listed. Far more people have flash installed than JRE/Java Plugin, So I would advise you to go with Flash. Of course performance matters a lot, but getting people to play is more important.

For flash games, you can use Adobe creative suite or flex.

BTW, another good game development platform is MS silverlight, but thats out of the question too. It has even lesser market penetration than Java

Flash更适合2D图形渲染,它是针对浏览器环境制作的,每个人都安装了Flash,它比Java IMHO更易于学习。

Here is a good way to get started looking for good libraries, although to be honest, Flash comes built-in with everything you "need", per se.

22 ActionScript 3.0 API's

Also, don't leave home without your API Documentation !

I'll try to dig through my history of API's and apps; it's been a while since I dabbled in AS3, but those were some nice times.

在用户可访问性方面,我建议使用flash。我相信用flash开发2d游戏会更容易...

The sites you are looking to submit to will most likely take flash games over java versions.

I would recommend picking up flash its self and actionscript 3.

You may also want to pick up a free copy of the PushButton game engine which will take a lot of your development time away and allow you to focus more on actually building the games and not so much on getting the physics and collisions etc working.

http://pushbuttonengine.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM