Skip to main content
GameDev.net gamedev.net
🔒 Locked

ActionScript Vs. Javascript

Started by NateTheGreat22 Feb 15, 2011 at 10:48 PM 9 replies 5.5k views
Original Post
NateTheGreat22
NateTheGreat22
Hey guys/gals,

My friend and I are college students, currently in our 2nd semester of our freshman year majoring in Comp Sci. We both have the same career goal, which is having a career in the game development industry. We figured we started early on creating our own projects while in school. By doing research, we made a decision to go with Flash + Action Script. My questions are :

1. What are your opinions on Action Script ? Is that the way to go for beginners?

2. Could JavaScript also be another option? My reason for asking this is because I'm actually self- teaching myself this language and was wondering if it were compatible to create games (We're trying to create a side - scroller).

3. Are they're any other programming languages we should consider ?
jbadams
jbadams
1. I think ActionScript is a great choice for a beginner -- you will be exposed to proper programming practices and learn technique that can be transferred to other languages, and you will have a viable platform to release and potentially sell games both on the internet, and on iOS devices by way of the Adobe iPhone Packager. If you're using the official Adobe tools you have an excellent toolset at your disposal, and if not there are reasonably capable and usable alternatives freely available. Flash also seems some use by professional studios, often for casual games, and is also sometimes used to provide a UI in other games via Scaleform.

2. Yes, JavaScript is a potential alternative, although you may find it more difficult ('though not neccessarily impossible) to create a game as performant as you might make with Flash/ActionScript. The languages themselves are fairly similar, and both would serve you well in terms of transferable knowledge. I personally would suggest ActionScript rather than JavaScript, but both are capable and acceptable choices. As far as I'm aware JavaScript sees little professional use, but can be and sometimes is used for scripting.

3. You could also consider C# (with XNA), or Python (with PyGame or Pyglet). Don't spend forever investigating languages and trying to make the perfect choice though -- it's more important in the long run that you pick any sufficiently capable language and actually get started on learning to make games.


Hope that helps! :-)
- Jason Astle-Adams
NateTheGreat22
NateTheGreat22

1. I think ActionScript is a great choice for a beginner -- you will be exposed to proper programming practices and learn technique that can be transferred to other languages, and you will have a viable platform to release and potentially sell games both on the internet, and on iOS devices by way of the Adobe iPhone Packager. If you're using the official Adobe tools you have an excellent toolset at your disposal, and if not there are reasonably capable and usable alternatives freely available. Flash also seems some use by professional studios, often for casual games, and is also sometimes used to provide a UI in other games via Scaleform.

2. Yes, JavaScript is a potential alternative, although you may find it more difficult ('though not neccessarily impossible) to create a game as performant as you might make with Flash/ActionScript. The languages themselves are fairly similar, and both would serve you well in terms of transferable knowledge. I personally would suggest ActionScript rather than JavaScript, but both are capable and acceptable choices. As far as I'm aware JavaScript sees little professional use, but can be and sometimes is used for scripting.

3. You could also consider C# (with XNA), or Python (with PyGame or Pyglet). Don't spend forever investigating languages and trying to make the perfect choice though -- it's more important in the long run that you pick any sufficiently capable language and actually get started on learning to make games.


Hope that helps! :-)

It sure does help us. Thanks so much. Also, being that this is our first project where a bit unsure in terms of where to start. We began writing the story. So far it has tons of depth to it, which we might cut short due to the fact of what genre the game falls into, Side - Scroll. In my opinion games that fall in this genre are Game-play > Story. Should we begin to learn Action Script while we work on story, design, etc OR work on each part of the game 1 at a time?
jbadams
jbadams
Start with the basics:
  1. Learn to display a graphic.
  2. Learn to move your graphic in response to user input.
  3. Learn to perform collision detection, and get your graphic moving around on a simple platform -- have it fall if it goes off the side.
  4. Learn how to add additional graphics.
  5. Learn how to move your new graphics around randomly.
  6. Learn how to implement some basic AI rather than simply moving the graphics randomly -- you might start by simply trying to move towards the player.
  7. Learn how to animate walk animations, or perhaps even an attack
  8. etc.

Start off with the basics, and continue building until you have a working game. Read articles and learn additional techniques along the way, and implement them in your game as relevant.

You can work on writing your storyline and designing your gameplay while you're learning; you'll probably want to think about what types of enemies you will have, and what abilities you will give the player to overcome them. You might consider making some simple games as you learn before tackling your side-scroller -- pong (or "tennis") is a good way to learn about displaying graphics, reacting to user input, and the general structure of games.


Oh, and I'm going to move you to For Beginners, as although your chosen language(s) are predominantly web-based this isn't strictly a web-development question. :-)
- Jason Astle-Adams
dotminic
dotminic
1.
AS3 is pretty "good" and complete programming language, and it's got so very good IDE's (Flash builder, Flash Develop...), some of them are even free. It's also a fully OOP language and is pretty similar to Java, so as jbadams said, you could easily move on from AS3 to an other language (like Java, or C#...).
It's also fairly simple to get started with, and it's a very "graphics oriented" language. It's pretty good at everything you need for games: graphics, user input, sound, animations and so on. Last but not least, it's portable and totally "cross browser compatible".

2.
Yes, but IMHO, it's a pretty messy language, and there are not many, if any, tools for developing Javascript, and most of all, you will be faced with all this "cross browser" BS that seems to be a nightmare.

3.
jbadams said it here too, C#/XNA is a good way to go for making 2D/3D games at the cost of being windows/XBox only.
Ravyne
Ravyne
The problem with Javascript for browser games is that not all of the story is there -- firstly, there aren't currently any web-game portals that publish javascript/HTML5 games that I'm aware of. Secondly, the audio story for javascript/html5 is pretty crappy since there's no concept of mixing audio -- basically, you get a bunch of sound elements that you can start, stop, set the volume of and possibly pan -- but you can't treat them as a buffer, filter and mix things together as you'd like. Also, logically, every sound on every sound-emitter is a different HTML sound element -- in other words, sounds are not instanced (though they might be in the back-end). Basically, sound is really troublesome right now, although the story for rendering is much more satisfying with Canvas 2D and 3D via WebGL (basically OpenGL|ES).

I'm hopeful that Khronos will propose a WebSL in the near future to address this issue, but even OpenSL itself has been slow to see adoption.


Google's Native Client is another interesting technology, allowing you to run native-code applications in a Chrome browser (with some limitations, of course, such as no self-modifying code, restricted file-system access), it supports OpenAL for audio and OpenGL|ES for rendering. The version of Lego Starwars in the Chrome AppStore uses it.
throw table_exception("(? ???)? ? ???");
digitaldisciple
digitaldisciple
1) I also started with ActionScript in a web design class during college and I now work for a quick-growing startup that makes most of their games in Flash. I would definitely recommend ActionScript as a starting point. It's a great language; easy to learn and well-suited for small-scale games, not to mention the cross-platform aspect. I also love how easy it is to get your stuff up and running fairly quickly. The Flash and FlashBuilder IDEs are solid and there are many online communities centered around Flash-based game design so you'll have no shortage of community support when trying to figure out your bugs. It's also worth mentioning that you can get a free student license for the FlashBuilder IDE somewhere on the Adobe website. It's a bit hard to find the application page, but it's there somewhere. The student version has everything you will likely need though it does lack some more advanced features such as memory profiling.

2) I won't comment on JS as I've only used it for web-related stuff when making Flash games.

3) If you're okay with sacrificing cross-platformness and have any interest in developing for PC/XBox, I highly highly (highly) recommend C#/XNA. I recently started using it and have fallen in love. It was a fairly easy transition from many years of ActionScript but is much better in terms of efficiency and 3D (both of which can be pretty dismal in ActionScript/Flash). The C# IDE (Visual Studio) is free for the basic version and is pretty much everything you could ask for in an IDE (quick, highly customizable, great auto-complete features). Also, if you start to get serious about your game development later down the line you can apply to the bizspark program to gain access to all the enterprise software you need for three years. Good stuff.
NateTheGreat22
NateTheGreat22
Thanks for all the feedback. We've been blessed with all the tools (Adobe Master Collection) so we'll be putting it to good use. Only problem we have is "time." Our school schedule is a bit hectic and we both live miles away from each other. We'll figure something out lol.Again thanks guys, really appreciate it.
doomtoo
doomtoo
I'd recommend starting out in actionscript, and using FlashDevelop (Free and actually much better built than Flash CS3, CS4, CS5, for programming).
(javascript is more setup for manipulating a webpage- you can create a game using it, but it's not really streamlined for it)

It will also help you to code faster with auto-complete and automatically adding imports as you are coding.


I created a tutorial recently showing how to create an asteroids game using flash develop, but took 9 posts total to show all that was involved

http://chrismweb.com/2011/01/26/creating-an-asteroids-game-part-1-setting-up-flashdevelop-and-planning/

Also, what I've learned from my experience and trying to save time- plan out ahead of time what you think you'll need and try to estimate how long it will take you. If you just jump into it with a good idea, you'll find yourself re-doing stuff a decent amount of the time.

A good book on learning actionscript programming and with some information on planning is:
http://www.amazon.com/Real-World-Flash-Game-Development-Practices/dp/024081178X/ref=sr_1_3?ie=UTF8&qid=1298055816&sr=8-3

And a blog I visit a lot, and he has lots of articles on game programming is:
http://www.emanueleferonato.com/

I like his site- but I'm trying to provide more articles on fairly complete games, whereas he has a lot of articles on helpful tidbits, and useful smaller articles.

Let me know if you have any questions, or want a blog post created about a subject - trying to make more entries to help more people.
Check out the Actionscript game tutorials on my site, and let me know what articles you want!
http://www.chrismweb.com
NateTheGreat22
NateTheGreat22

A good book on learning actionscript programming and with some information on planning is:
http://www.amazon.co...98055816&sr=8-3


Will be sure to pick this up tomorrow afternoon after classes. THANKS!biggrin.gif

I'll be sure to PM you with anymore questions I have in the future. Thanks again

cool.gif MAN DO I LOVE GAMEDEV.NET!cool.gif
way2lazy2care
way2lazy2care

I'd recommend starting out in actionscript, and using FlashDevelop (Free and actually much better built than Flash CS3, CS4, CS5, for programming).

I cry a solitary tear every time I have to edit actionscript in the flash ide...

I would recommend actionscript because it's a supporting language designed to support media. Javascript has a much broader base of uses, and because of that falls into a kind of jack of all trades master of none feeling IN MY OPINION.

I don't think their names accurately portray how dissimilar they are.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.