Actionscript 3 :: Game Development - Embed External Data Files For Run-time Retrieval?
Jul 30, 2011
I'm writing a Flash game where the game levels are saved in small plain-text files, which I want to embed in the swf file. My current solution has a distinct code smell in its repetition, and I'm certain that there is a better way. My code is basically: In a LevelLoader class, embed all the levels
There are a couple of problems with this approach: I have to add a line for embedding each level. Optimally, all files in a folder would be automatically embedded.A level can't be "prepared" from a string. I'd like to be able to pass LevelLoader a level number or level name as a string.I think that all strings are stored in memory rather than on disk.How could I program this "correctly"?
The game will be on a school VLE (virtual learning environment) like 'Moodle'. Can you export to email? Spreasheet? Or can it only be done with php? Do not want to be spending weeks on it!
I'm designing a website aiming to provide visual coverage of surfing locations across the UK through the use of webcam images. Each of the images themselves will be retrieved externally,with permission, from various hotels over-looking these locations.I have spoken to someone who has completed a similar project,a widget which retrieves and displays webcam images, which can be viewed here:
Question: How do I create the ability to load a xml file from another domain?
For example, I am creating an embeddable video player that will play on the domain which the xml file resides and also embedded on other sites. I am to the point where the video player completely works on the domain that the xml file resides and when I embed it on another domain, the .flv plays but the xml data will not pull.
FYI, I have complete access to the domain where the xml file resides.
Here are some snippets of security settings that I have been trying to get to work:
Code from Player: System.security.loadPolicyFile(domain + "data/crossdomain.xml"); Code from "data/crossdomain.xml": <?xml version="1.0"?>
Does anybody use bare .SWF files as webpages? I know it's possible; it seems to work fine for me. Why would I embed a SWF inside an HTML page if it's just going to be full screen (I mean the size of the browser's normal viewable page area, not COMPLETELY fullscreen)?
Is there a lack of browser support? Or is this functionality determined by the browser's Flash plugin?
It's about the "Game Character Dialogues", It is used to instruct the user what to do, like what you see in BookWorm or Diner DAsh.I used dynamic text fields to generate these dialogues,but as I continued doing it. I found myself stuck.I have no idea on how to change the words when the "next" button is clicked. there will be no previous button. but the dialogue will replay when the character is clicked.
I am developing a non-real time browser RPG game (think Kingdom of Loathing) which would be played from within a Flash app. At first I just wanted to make the communication with server using simply URLLoader to tell PHP what I am doing, and using $_SESSION to store data needed in-between request. I wonder if it wouldn't be better to base it on a socket connection, an app residing on a server written in Java or Python.
The problem is I have never ever written such an app so I have no idea how much I'd have to "shift" my thoughts from simple responding do request (like PHP) to continuously working application. I won't hide I am also concerned about the memory and CPU usage of such Server app, when for example there would be hundreds of users connected. I've done some research. So, considering the fact I don't need real time data exchange, will it be wise to develop the server side part as socket server, not in plain ol' PHP?
The component itself receives all its parameters from a .txt file. The editor is a read/save form that initially loads the parameters into it's form fields, and then overwrites the .txt file when the user hits submit. You then refresh the component on whatever website you have it to see the changes.Here's the php code that I found to get me going:
<?php //Capture data from $_POST array $title = $_POST['Title']; $comments = $_POST['Comments']; $image = $_POST['Image'] //Make one big string in a format Flash understand $toSave = "Title=".$title."&Comments=".$comments."&Image=".$image;
I am a web designer and have a client who is interested in having a game application created similar to farmville or mafiawars on facebook. This is outside of my realm of Flash for sure and would have to be handled by someone else.I realize there are many factors that affect this question but could anyone give me a ballpark cost of creating an application like that? My client is just curious as to the realistic possibility cost wise?
I'm trying to use a loadMovie function inside a loop to load external PNG files when my game is loaded. Unfortunately, I can't get even a single loadMovie to work correctly, much less execute a bunch of them.The code is on the root time line, and is targetting an empty movie clip that is nested inside about 3 levels. There is a button, with a movie clip on it, and the empty clip I'm trying to load into on that.so the full target path is myBox_00.smallBox.myLogo(myBox_00 is the button, smallBox is the movie clip, and myLogo is the empty)[code].I even tried using a JPG image instead of a PNG and still no luck. The best I could do was number 4; and that didn't work, all it did was SOMETHING instead of NOTHING... unfortunately that something was to make the button (myBox_00) disappear entirely T_T.I've never had much luck with loading external images. What am I missing here?
I am working on 2 projects at [url]... (an "easy" to use rapid data collection and processing app), and Space Out (a space shooter game with minion ships and systems/galaxies that expand as you explore).Are there any popular communities that handle both game and more serious-oriented app development? Is there some forum here at adobe? I've been working on them for a while,at least space out, but don't know what to do about getting feedback/users to try them.They use php and mysql to act like a server, and are written purely in as3.Space out has had more functional versions that were based on a development kit, which I am trying to move away from now. I'm not a business, just one person trying new things, new to me at least.
I started off game development on Android about a year ago and want to expand to developing browser games as well. Is flash worth learning? Or should I go for using an engine like Unity and learn game development in c#. Mostly I'm just worried that I would be wasting my time learning flash if I'm not going to get much use from it.
I need to develop a isometric game on facebook like farmvillie, barnbuddy or etc. I found couple of frame works (link is here) to develop it, but they not simple as isolib.So I decided to go with as3 isolib. Google project for that is here.
But I could not find a A-Z tutorial for as3 isolib, except basic (adding scenes, adding map and etc). I want more stuff. So Can you please suggest me a advance as3 isolib tutorial (I googled it 100 times) ?
Anyway if you have suggestion for frame work except isolib to develop isometric game,let me know it also.
I need a framework that would ease n modularize game development.I am also searching through web,but the reason I posted this query is that ,there are lots of great game developers out there who have been actively involved in game development.And they know what framework is right for game development purpose.This is for the facebook game similar to [URL]..
I've got a swf which uses AS 3 to load separate audio (mp3) and video (flv) files. The reason they're separate is because the audio is just background music while the video is navigatable. The video kinda goes along with the audio, but it's not imperative that the two sync perfectly. However, the audio always starts playing before enough of the video has loaded to begin streaming.I'm at a loss as to how to get the two to at least START at the same time.
I'm able to create the basic structure but I'd like to add some transitions between frames when a player makes a choice. I want to make it look like one frame slides to the left followed by the next frame sliding into view.
There's clearly a bunch of new stuff in Flash 10, I'm seeing a bunch in the Graphics class so far. Struggling a bit to reconcile it with what I know already but it looks useful - render lists and 3D transforms, etc - however I wondered if there are good arguments for targeting Flash 9 since I can definitely manage without all the new stuff I don't know. Like support on non-Windows devices, wide adoption of Flash 9 Vs 10, etc.
I have been thinking of trying out component based architecture for game development. I have read some blog posts and articles about it but I have a few things I have not sorted out yet. When I say component based I mean that you can add components to a ComponentManager that updates all components in its list. I want to try this to avoid getting classes that inherits variables and functions that they don´t need. I really like the idea of having an really simple entity class with a lot of components working side by side without getting bloated. Also, it is easy to remove and add functionality at runtime wich makes it really cool.
This is what I am aiming for.
// this is what the setup could be like entity.componentManager.add(new RigidBody(3.0, 12.0)); entity.componentManager.add(new CrazyMagneticForce(3.0)); entity.componentManager.add(new DrunkAffection(42.0, 3.0)); // the game loop updates the component manager which updates all components entity.componentManager.update(deltaTime);
Communication: Some of the components need to communicate with other components I can´t rely on the components to be self-sustaining. Sometime they will need to communicate with the other components.In Unity 3D, you can access the components using GetComponent().I was thinking of doing it like this, but what happens if you have two components of the same type? Maybe you get a Vector back.
var someComponent : RigidBody = _componentManager.getComponent(RigidBody);
Priority: Some components need to update before others
Some components need to update before others to get the correct data for the current game loop. I am thinking of adding a PRIORITY to each component, but I am not sure that this is enough. Unity uses LateUpdate and Update but maybe there is a way to get an even better control of the order of execution.
I've recently tried FlashPunk for game development and it seems to be easy enough to comprehend, however, when me and a friend tested simple apps coded in it on the iPhone, it seems to be acquiring an unnecessarily large amount of memory plus dropping framerates.
Are there any other choices for game development with ActionScript 3 with frameworks that are optimized for mobile gaming?
I've been working for a month on a flash game, which should be manageable to play in a browser (light computation). This being said, I've noticed that in some browsers the game runs at what looks like 15 fps (the game should run in 80fps). This has been known to happen in IE9, and the quick fix was to add this line to the top of the html: <meta http-equiv="X-UA-Compatible" value="IE=9"> This was a quick-fix that forces IE into compatibility mode and greatly improved the fps (to about... 60, let's say). Still, I believe that the game is running slower than it should in every browser, which is evident when the html version is compared to the swf.
I am kind of new to Flash and only really know really basic stuff. (Scenario) I have made a local game in Flash CS3 Professional for my Advanced Higher Computing project for school which is almost completely glitch free. But my teacher says it needs a file handling feature, such as a high score feature in it to make it AH standard. I want to make a simple high score feature where it takes the final score, asks the user to input their name, and add it to a .txt file. Since the computers at my school are very limited, I cannot use programs like Adobe AIR or PHP or anything like that so I need it to be simple. (Question) So I really need a full tutorial (where to put the coding, layout and everything) to:
Check if there is an existing .txt file called (for example) "High Score.txt" If there is, load it. If not, create a .txt file called (for example) "High Score.txt" to the desktop. Take the users input and place it with their final score after it. (Optional but not required) Arrange the scores in order of highest to lowest or display the top 5.
Since Apple loosened their terms again, is it posible to develop a game in FLash CS5 and publish it on the Apple App Store? Are there actually any real apps / games on the App Store that were build on Flash?
I have been requested to make a port of an iOS game for Facebook.The game itself is fairly simple, it is a puzzle game using a 2d array for a grid with XML passed from a server for loading objects onto the the grid, to create levels.The game will ask questions at stages which will be passed to my server and stored for research purposes.Some questions for those with experience.What front-end options do I have with Facebook? I have looked into both Flash and HTML5/js both of which i have little to no experience in (I'm experienced in Java/C#/Ruby + Rails).Javascript seems like a nightmare from what I have read, even looking into javascript game engines, but at least it is free. My backend will most likely be rails for handling server logic.Summary(because I ramble too much)
-Is javascript for programming games really a problem for simple games on Facebook?
-Are js game engines worth using? Does anyone have any experience with them?
-Would prevention of cheating be possible with a js/rails game, do server side checks work?
-Are there any alternatives for a front end for someone with C#/Java/Ruby background?I've never seen any Unity or Java apps on Facebook(I don't use it much) and I don't know if the licensing will be an issue for this research project.
How can I save some text information in local hard-disk with out the server support. I know shared object, but i dont use this. I need to save all these function in anther external file as text.
Is there any way to do that in AS3.0.
I don't prefer Flex, am working in Action Script 3.0 & Flash IDE
EDIT:
My swf is saved in a local machine. So no server interaction or browser interaction. the swf is running a local folder and read txt files from local folder, and save once press the save button.
I would like to create a multiplayer online game (tic-tac-toe/chess) and i am not sure which language to use. I am familiar with JS/PHP and heard about comet Does comet stand a chance against Flash, if yes whats the limitations except the lack of smooth animations like flash allows? What are the differences regarding resources and memory needed? SECURITY: Is it possible to create Flash-games without any chance to modify (flash-)cookies etc... for cheating? i know lot of questions, i do hope for your recommendations into the reight direction.
I'm converting some old RealMedia audio-only files to use with the SWFOBJECT Flash player on the web. What's the best container/format to use for the files? I think AAC is probably the best format, but then can you play a *.aac file in the Flash player?
Does anyone know of a site where I can download temporary SWF files to use as placeholders during web development? I've searched a lot on Google and can't dig anything up like this?
Was wondering if there is something similar to what http://placehold.it is for PNGs, but just need soemthing for SWFs.
I'd like to just grab one and use it to drop into my code, so all the Flash designer has to do is just replace the temporary SWF with the one that's going to be used on the live site.