What are some examples of games in action script? - actionscript

I'm new to this ActionScript language, however I have 2 questions.
So you code in ActionScript (2 or 3) in Adobe, and then export it as a (I believe) a .swf file, which you can upload to newgrounds or something as a game?
I would like to know if this is the process? Or if that is not, what is the process?
Have there been any bigger-name games that were developed with ActionScript? I know most games are parsed over to different languages.

1) Yes, that sounds about right. You code in AS2/3 (I like 3) and compile/export to a swf. That swf is an "executable" that will run in the Adobe Flash Player. That swf may rely on external resources such as sounds and images, or they can be packed inside the swf. I'm not sure about newgrounds' process, but in theory if you pack the resources into the swf you should be able to simply upload the swf and be done.
2) There are more flash games on the web then you could ever begin to count. Newgrounds, miniclip, and similar sites are good places to start, but web based games are not the only flash games. Flash games can be packaged as standalone PC games and even as iOS and Android apps. As far as big-name games, that really depends on your definition of big-name. Farmville is a huge multi-million dollar revenue game made in flash. The original Super Meat Boy was done in flash, though I think the retail version was redone in something else. Flash/AS3 is pretty powerful and totally acceptable for big-name games, as long as your game is actually good and you avoid/workaround a few of flash's drawbacks.

1) Adobe Systems is the company name. The Adobe software to create 'flash' games is Adobe Flash and Adobe Flash Builder.
However, there are multiple open source and/or free development Environments that use the free ActionScript libraries. You can, for example, use Flex and FlashDevelop to create industry standard games.
Like always, Google is your best friend when looking for tutorials.
2) There have been relatively big games produced with flash. However it is traditionally a 2d platform, so no real AAA games.

Related

What takes up the majority of the storage space in video games?

I've been curious recently about why text/code seems to take up so little storage but videogame applications are enormous in size. For example, a game like Warzone is over 100 Gb.
Link to see how enormous the maps are: https://www.gamesatlas.com/cod-modern-warfare/guides/call-of-duty-warzone-map-all-cod-battle-royale-locations
I've done some research and think that it has something to do with the complex landscapes that are created in the videogames. Those don't seem to be lines of code that a developer has written but rather creating some sort of 3D environment for your game to run in.
What about something like Windows or other operating systems? Is there entire storage "weight" of what is downloaded code or data that is being downloaded as well to make the applications done?
If the majority of it is code, how do those enormous organizations write so many lines of code to take up so much storage?
It just depends on the game.
For triple A games, I woukd say most of it is binary data like texture, models, media (like video, cinematic, audio).
Then you have the way your game is packed and lot of dependencies like C Redistribuable, game engines, physics engine, libraries, etc ... While many of those are not used they may still be packed in the game.
For some "indie" games like Minecraft, I wouldn't be surprise code is what take most of the space (or Audio I guess ?). Note that the map can be larger than the game too ...
What you can do is use a tool like Windirstats to check what is happening, but It will not find dependencies that are out of the folder.
For the codebase, I guess its mainly automated through games engines.
Here is an example for Conan Exile :
So it's mainly texture data (GraniteSDK), the game engine files is 115MB and executable are 100MB (note that it has Battleye anti-cheat packed, + the server version of the game). Video is 500MO ...
Another example for Minecraft :
Which is (contrary to what I expected) mainly texture/sound data.
What about, let's say, Chrome ?
Interpretation : I have no clue :D.
Last one:
Python itself is not quite big. But all the dependencies, their dependencies (the dlls, etc) are quite big at the end.

Could I rewrite the attached AS1 Flash game and create a HTML5/JavaScript/CSS3/PhoneGap iPad app with the same performance?

I have a successful kids educational maths game made in Adobe Flash ActionScript 1, its a fairly simple game but there is animations for example a plane crashing into our logo and breaking it apart.
Could I use HTML5 and tools such as PhoneGap and get it to work like it does now in an iPad App and get Apple to accept it on there App Store? I'm drawn towards HTML5 because its non-propriety and has a promising future but will it be able to replicate the game. I've noticed the featured games on the PhoneGap website aren't very interactive/game like compared to Adobe AIR app examples.
Thanks
You could definitely recreate the game in HTML5 and use PhoneGap to package it for iOS. As long as you follow the app store guidelines, there's no reason why the game wouldn't be accepted by Apple.
The game logic seems straightforward enough and should, therefore, be relatively easy to translate to JavaScript. However, I think there may be significant effort involved in reproducing the animations you have, to an acceptable level of performance, using standards-based web technologies.
There are a few avenues I can think of which it might be worth your while exploring:
Google's swiffy will convert SWF files to HTML5 so you can use them on devices which don't support Flash. I have used it successfully to convert a reasonably complex Flash animation, however the performance of the animation on the device, when it was packaged as a native app for iOS using PhoneGap, was significantly worse than the Flash version. I'm not sure whether the tool would be capable of converting the whole game (definitely not if it's pulling in dynamic data), but you could certainly use it to translate the individual animations of the game.
Adobe Edge is an animation tool similar to Flash for creating animations in HTML. I've not used it so I don't know whether it's any good. However, it is still a relatively new product and a quick search for character animations using Adobe Edge wasn't particularly encouraging.
The CreateJS toolkit for Flash Professional is a free extension which will convert Flash animations to JavaScript using the open source CreateJS framework (which looks superb and may be a good starting point for rebuilding the game should you decide to convert it).
Convert the game logic from ActionScript 1 to ActionScript 3.0, reuse all your existing animations as is, and package the game for iOS using the Adobe AIR packager. Inevitably the performance won't be comparable to native, but I think it should be acceptable for this type of game.
I think in your case I would probably go for option 4, primarily because you'll save yourself the effort of recreating / converting existing animations in another technology. I would definitely encourage you to embrace HTML5 and associated technologies but would suggest you use them on a new project which will allow you to plan around its particular strengths and weaknesses.

Html5 for iOS game development

I have been hearing of the advent of html5 for iOS development. I know nothing about web dev technologies and am wondering, can this really be used for iOS game development? Just hearing html makes me think this will be used for web related apps, not things like graphically dynamic 2d games, but being unfamiliar, I'm hoping to get some insight from the experts here. Is html5 going to be useful at all for games, or should I basically expect to be sticking with the likes of cocos2d for iphone?
The short answer is "Yes, you can develop full speed, interactive games with HTML5". Check out "Private Joe", "Biolab Disaster" and "FUBAR" in the Apple app store. All were created with HTML5, Javascript, and a few javascript libraries (ImpactJS and Box2D).
One thing you'll see as you explore this is the repeated caveat that "web games aren't fast enough", also "Web games can't use the device's goodies - like GPS, vibration, etc."
These statements represent "common thought" and are not really true anymore. Companies like PhoneGap and appMobi have tools that make it possible to do anything in HTML/JS that can be done in native apps. Browsers keep getting faster, and smartphone processors also keep getting faster. Qualcomm's new chipset even has GPU acceleration for future smartphones.
As an added bonus from coding your app in HTML5, you will have the choice of whether to compile it app into a native app and post to one of the app stores (using appmobi or phonegap), or to offer it yourself as a web app (saving the Apple censorship and 30% tax).
Viva HTML5!
The real benefit to using HTML 5 for game development is that it's a write once, deploy everywhere strategy, meaning you can write the same code and have it work on iOS, Android, Windows, MacOS, Linux, etc, as long as it has a browser.
The HTML5 canvas element supports both 2d and 3d (on some platforms), so you can use it for complex games as well.
This will, however, run in a browser, so the only way to sell it in an app store is to wrap it in a UIWebView container or the like.
Also, there are games written in Canvas (just google it, also google 'chrome experiments' to find cool 3d stuff in HTML5).
I wrote this HTML5 Tetris implementation: http://htmltetris.com
It is designed to be equally playable on a PC and on touch devices supporting Javascript touch events.
One of the important things to get right in a mobile game is the control scheme and it took some thinking to come up with the swipe/tap control scheme used for Tetris here. But it turns out quite playable (in fact, just as playable if not more so than all of the tetris like iOS apps I have tried, and there are... quite a few of them) and is proof that it is possible to build a perfectly playable game with HTML5 technology.
Check out HTML5 Canvas. Lots of Web games are based on this tag. Here are some samples :- http://www.canvasdemos.com/type/games/
There are two great things about investing your time in learning HTML5 and its counterparts:
For one, every application that you write will theoretically be able to run on many platforms. iOS, Android, Windows, Mac, Linux, etc, all have HTML5 capabilities. You'll also be investing your time in a language that is still being developed, so you'll already know the ins-and-outs of it as more features are added, and you'll have mastered it when the final product finally goes mainstream.
The capabilities and power of HTML5 are only expanding, so the experience with the language should only improve with time ;)

Any Resources for Pure Actionscript 3 Games?

What resources (books or website/tutorials) are available, that cover game development using pure Actionscript 3 code? By pure, I mean not using Flash CS4 and its timeline, and not using Flex MXML components. Everything done using only Actionscript code.
In another question, I asked about using certain objects of the Flex SDK for simple games, and the consensus was that I shouldn't use it at all, but only Actionscript for a game. Sounds reasonable, but the books/website tutorials that I have found on the subject of games, all use AS3 in the context of Flash CS4. They assume your objects will be movieclips, with timelines, etc.
I realize that you can learn game programming from books in other languages, and/or ignore the Flash aspect of AS3 books. I guess what I'm looking for, is whatever information is specific to AS3, such as best practices for AS3-only games, how to make architectural/design decisions, etc. If it exists, anyway :)
You may want to take a look at Flixel.
What is flixel?
flixel is a completely free collection of Actionscript 3 files that helps organize, automate, and optimize Flash games; an object-oriented framework that lets anyone create original and complex games with thousands of objects on screen in just a few hours.
Flixel is licensed under the MIT license and the site has quite a few tutorials to get you started.
Flash Adventure Game Tutorial
series shows you how to create a
Flash adventure game with Flex and
ActionScript.
FlexFighters
shows you how to make a shoot'em'up
with Flex and ActionScript.
This is a tutorial series that shows you how to make a 3D Flash game with Flex and Away3D
A site that is basically all about using just pure AS3 and that now has game tutorials centered around his pure AS3 game making library is www.actiontad.com.
Your games may be smaller using only AS3 and the SDK, but you loose the ability to animate with a timeline, animations made with the timeline in Flash will perform better, than say sticking a whole bunch of .pngs together, which is a technique actiontad uses, but that site is coming into it's own now with the library he recently released, if pure AS3 game making is your thing it's worth a look.
If you want to deploy your games on mobile (iOS/Android) you should take advantage of Starling (http://gamua.com/starling/), 2D rendering engine built on top of Stage3D, which gives you GPU raw power.

Can one make real games with XNA and C#?

Can XNA and C# be used to create commercially feasible PC/XBOX games?
Is it the best approach for creating 3D games with C#? If not, what would be?
Actually you can do that but it is a little bit tricky.
You need to pass via an approval process by the "community" (XNA Creators club Online users).
You will also need to pay an Xbox live account plus an Xbox live developper licence.
According to XNA FAQ:
Do I need an XNA Creators Club premium membership to create games?
You don't need a premium membership to make games for Windows or Zune. However, you must be a premium member and in a supported region to create games for the Xbox 360, to release Xbox 360 games to Community Games on Xbox LIVE, or to peer-review submitted games.
Who can peer review XNA Community Games?
A member of the Creators Club whose premium (paid) account is in good standing and is a legal adult (for the countries we currently serve this means 18 years of age or older).
And:
Why does my game have to be peer-reviewed? Why can't I just send it to Xbox LIVE marketplace?
Peer reviewers help creators write better games, and protect game players from experiencing highly offensive or malfunctioning games. Peer reviewers will reject your game if:
Your game contains prohibited content, which is content not allowed on Xbox LIVE services
You misrepresent what is in the game play or in the promotional materials for the game
The promotional content for your game ( for example, the box art, description, banner or title) is not appropriate for all ages on Xbox LIVE Marketplace
The game crashes, it has too many bugs, or it is technically defective in some way
the faq is can be read here
If you want to do it simplier you can play with DirectX directly or even other libraries like SDL (for 2D games). Actually C# is very good for a variety of things and it gets better as the time goes.
A short answer to your first question would be, yes. It is entirely possible to create just about any kind of game with the XNA library. It can be used to make simple 2D platformers, or moderatily complex 3D shooters.
Depending on the game, the amount of logic you'll need to create for your game may vary.
Of course, while creating 3D games, you'll either have to create your own 3D engine, or get your hands on one pre made. XNA in and on itself does not provide an engine that would be fully usable out of the box. It does, however, provide wide variety of tool to help you in the process of making your own engine.
XNA is dedicated primarily to garage games, small projects with small teams, and hobbyists. Also, it's a really good learning tool for game architecture and 3D programming. But for commercial applications, there's a clearly huge gap between the XLA and the XDK.
Using the XDK allows you to access to a much deeper level of hardware, which is definitively a must if performances are an issue. Also, most of commercial game engines are developed for use with the XDK (the Unreal Engine, for example). The debugging and profiling system of the XDK is also an amazing tool which is not available using XLA.
So yes, it is technically possible to make commercial games using XNA, but the real world tends to prefer the XDK.
C# is not that much slower than C++, however C#'s memory management is not really Game friendly (in the AAA style). Never the less rendering is basically the same, as you'll be using DirectX I guess, so there is no reason a very professional game like Gear of Wars couldn't be made with C# (As a game dev my self, I've seen the source code for Gears of War, and can tell you this first hand). But you'll need great artists.
The real roadblock, is if your source is in C#, you have just locked your self out of other Platforms that aren't from Microsoft (Say Sony or Nintendo), but then again GoW is Microsoft bound, ASFAIK.
As for XNA, the best selling Arcade/Community Game Braid, was written in C++, but that's because the author didn't want to lock himself out of other platforms, and he had lots of experience and a large code-base that was already C++ based
XNA saves you a lot of the low level tedium associated with making games. This can be a huge time savings for a handful of people banging out games that don't need to push the hardware to its limit; however, most AAA games require a few people getting down and dirty with the hardware to push the limit as much as they can.
Having said that by no means does your game have to be AAA to be commercially feasible or fun - one could even argue it hurts more than it helps. Technology is rarely the bottleneck of making good games.
I doubt you will create the next Gears of War with it, but XNA works fine for many types of games. Most (all?) of the Community Games on XBox Live are created using XNA.

Resources