开发者

Should I use Flash or Java?

开发者 https://www.devze.com 2023-01-03 06:29 出处:网络
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.

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 silve开发者_StackOverflow中文版rlight 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.


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.


JavaFx is a very upcoming technology in developing both 2D/3D games and infact it gives same effect as Flash.you can have its libraries and inbuilt support IDE in Netbeans IDE.


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 is better suited to 2D graphics rendering, was made for the browser environment, everyone has it installed and it's easier to learn than 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.


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/


In terms of user accessibility, I suggest flash.I believe it's easier to develop 2d games in flash...

0

精彩评论

暂无评论...
验证码 换一张
取 消