Should I use Flash or Java? - 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.

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...

Related

Android (or Android compatible Java) library to draw editable flow chart diagrams

I'm developing a flow chart drawing tool for Android and even though it has been a month I still couldn't find a good, reliable graphics library to help me develop this app.
Here are a few things I tried:
1-) Android views. Since a flowchart would naturally include lots and lots of shapes, this option wasn't satisfactory in terms of performance. Plus, I didn't even know how to draw arrows.
2-) Canvas. It was quite good when it comes to performance but canvas does nothing more than coloring pixels, so I can't go back to editing them after placing a shape on the screen.
3-) Now I'm working on Qt to see if I can achieve my goals and so far it seems as though it's very doable but using a cross-platform development software for only Android doesn't make a lot of sense.
4-) Libgdx and Unity are also options but using a game engine for such a lightweight app didn't seem like a very good idea to me.
Can you suggest me a good library or any other development tool?
There is https://github.com/mocircle/cidrawing library. Maybe useful for this type of task with link to https://github.com/Team-Blox/GraphView library.
Hope it helps.

3d games in android

i want to create 3d games for android but i don't have any information about that. i want to do this in most advanced way like big companies. "most advanced way" means i don't use simple tools that rapidly return result but there is no way to creativity and CREATION. I need an standard way with complete resources and so on...
i want to know this too:
1- i need a game engine or i can create games with my own engine? how?
2- [important] i need to learn 3D Max or Maya etc...?
Every guidance will push me forward. Thanks
I think Unity is the tool which you require for 3D game development.
Unity is the development environment that gets out of your way, allowing you to focus on simply creating your game.
Link : http://unity3d.com/unity/

Porting Java OpenGL-based Android game to iOS (no native code)

I might be a little screwed here. I've been developing an engine for use in various games that I've been making for a long time now.
The engine is written in 100% Java(no NDK), and uses OpenGL ES 1x for rendering. its got textures, 3d mesh loading, animation, image based fonts, tilemaps, custom file types, and all that good stuff at around 8.5k lines of code, so you can probably see why I wouldn't want to recreate all that on iOS :(
Anyways, some of the engine relies on the Android SDK, but those parts can easily be removed/changed, leaving just the engine code and calls to opengl. However, never having developed anything on iOS before, I am a little clueless as to where I should begin with the porting.
I know that you need to develop using XCode(or is it objective-c?) on iOS, but would it be possible to use Java instead?
I would greatly appreciate it if anyone could just point me in the right direction. It would really suck to have to rewrite my entire engine in a different language.
No, there is no way to compile java code so it can run on ios ,and propably will not be in the future either because of the nature of the ios witch is a close platform .
Your best choise here is to rewrite your code to c witch i think its not very difficult since opengl commands stays the same plus you will see a performance boost

Building a music visualiser

I am interested in building a music visualiser using fractal patterns for my final year project. I have googled quite a lot on it and I know a bit about fractals, however I was wondering what software would be used to 'animate' the graphics.
I know Java has a drawing API (AWT and Swing), but it's probably not the best for the animation factor. On the other hand there is also Flash that has new capabilities within as3 to produce such an effect, but if this app was to traverse into mobile development Flash wouldn't be a great choice. So there still exists a gray patch in my head regarding actual app development. Can anyone give me a head's up on where to start looking?
I would suggest that you first define what it is you want to build and then choose the best technology for the task. For audio visualization you will most likely be using some kind of Fourier data. This and the fractal math concepts should translate across programming languages well.
I will often build prototypes in ActionScript or Python just to understand the fundamentals of new topics. Once I have an understanding of the concepts and know the target platform, the prototypes are usually very helpful and sometimes can be easily ported over.
As for quickly prototyping audio visualizations you could use Processing ( java based ), openFrameworks ( c++ ), Cinder ( c++ ) or Flash.
Each of these technologies are cross-platform, allow you to read audio data in realtime, quickly create windows and provide easy to use drawing APIs.
Also, it sounds like you are thinking about mobile. I believe that both Cinder and openFrameworks can be used for iPhone development. As well, AS3 can be compiled into an AIR app which will run on the Android platform. Performance of Flash on Android devices varies greatly from device to device though.

Whats the best way to start programming for my non-smartphone?

I have a general old-fashioned phone that has no special app system and uses Java (I assume ME) for the few applications you can use on it.
This is still a decent userbase and I'd like to start programming for this type of phone. I already know basic Java theory and syntax, so.. where do I get started for programming for non-smartphones?
Best programming environment for Java ME IMO is Eclipse with EclipseME. Includes lots of built-in stuff about packaging your midlets etc. The SonyEricsson wireless toolkit is great for PC-based testing and debugging, but don't forget on-device testing!
If you don't know much about Java ME's lifecycle, then get reading as widely as you can, and try lots and lots of examples. Start with the JSR-118 (MIDP2) javadocs; you'll want these open on your desktop at all times while coding.
Don't waste too much time with the form-based user-interface; I recommend either rolling your own using Canvas, or read about LWUIT.
You can do all sorts in Java ME and target a very broad range of handsets. HTTP capability is guaranteed, so you can hook up to a public web service, or create your own using something like Google Appengine.
Finally, you can release your app very easily on somewhere like Get Jar. Don't be put off by those who say "no owners of Java ME handsets want apps", you'll find the most popular user bases on this site will be users in countries such as India and Indonesia.
Good luck!
I would start with a book on J2ME and work from there.
Try Beginning J2ME: From Novice to Professional.
You could also download the J2ME SDK and play around with the example they give.
For tutorials have a look at the stackoverflow question https://stackoverflow.com/questions/584923/do-you-know-a-good-j2me-tutorial as mention in my comment.
I started with writing simple Flashlight application (choose how much seconds screen will remain lit) in NetBeans ME. And other app which I mange was Countdown with some graphics and sound. After that I found limitations too much annoying and now I'm waiting for my Android phone.
in short:
If you want to try it out - you don't need to buy books. There are plenty of tutorials around.
But, if you want to start deep development - don't waste time.

Categories

Resources