ActionScript 3.0 :: Improving The Script Interpreter?

Nov 6, 2011

So i'm building a plugin system for my game, and i need to know actively what objects each plugin wants to use. For this, i have made a simple String interpreter. What it can do so far is separate id's and get whether a required input uses all of that kind.

my input format is like this:

Code:
IA:[param];IA[param];NN

IA is the index of all objects matching the parameter to the right of it. A is replaced by A if you want all those objects with the ID of param, or a number for a specific index.:[] tells the interpreter that what is inside the ['s is the param.the param is the string identifier that it looks for when finding objects.NN is the end sequence. this tells the engine that it doesn't need any more params.so say i had a plugin that uses the string

Code:
I2[player];IA[world];NN

the engine will loop through all objects with the ID "world" using them as the second param for the plugin's behavior, and the first will always be the 2nd "player" in the list.I can currently detect whether it wants all of a certain parameter, and what the parameter is. Now, i need to be able to find the index each param requires if it is not all. And i've tried multiple ways of doing this, but none so far have worked. What method would i use? Also, if you see anything that would kill performance in the interpreter, i would love to know, as this is called every frame.

My current code is a class with static methods called StringInterpreter, with the below code:

Code:
package Utils
{
public class ScriptInterpreter
{

[code]...

View 6 Replies


Similar Posts:


Actionscript 3 :: How To Write A Lisp Language Interpreter

Mar 23, 2010

I know there is one, but it's not easy to implement the way I want. I would like to know the steps to interpret the lisp language and what functions are essential to be implemented.

View 5 Replies

ActionScript 3.0 :: Create A Python Interpreter Inside

Dec 14, 2011

Would it be difficult to create a python interpreter inside actionscript 3? Would it be impossible, or extremely slow?

View 1 Replies

ActionScript 3.0 :: Make A Visual Novel Engine Script Interpreter?

Oct 17, 2011

I am trying to make a Visual Novel engine script interpreter. What it does is, it reads simple instructions from a source like: "DISPLAY_TEXT: Hello world", "SHOW_IMG: scene.png".

I figured:

while(read_next_instruction())
{
handle_instruction(instruction);
}

This looks fine so far. If next instruction is DISPLAY_TEXT, handle_instruction() will display the given text on the screen, and then the while loop will keep on reading. The problem is, some instructions will have to wait for the user to click on screen so it can jump to next instruction, but how can I do this, if the while loop won't wait for the user to click on the screen?

View 14 Replies

Improving Flash Slideshow?

Aug 12, 2009

So I have made a basic slideshow on flash for a website. Nice but simple, 3 images fading in and out. But I want to make a slideshow that moves either vertically or horizontally, but most likely at an angle. I also want some text to either fade in or move as well. So I have a few questions.1) What is the best way to get th pictures to move at an angle? I have read some xml options for editing in dreamweaver, can't seem to find one for moving the picture.I would imagine you have to edit it in flash? Yes I'm new to flash!2) I take it you edit the text in flash, could it be dynamic text and what is the best way to move it?

View 4 Replies

ActionScript 3.0 :: Improving The Rendering Performance

Apr 26, 2011

rendering performance when scrolling some content. I have a large sprite with a lot of content that I need to scroll and the problem that I am encountering is that when scrolling this big sprite, the rendering of the Flash Player seems to slow down and the movement is choppy. I wrote a custom scrollbar class that simply updates the target sprite y or x properties on an enter frame event. The large sprite that I am scrolling mainly contains other sprites that have drawn shapes, loaded bitmaps and text fields.

Considering that I am simply moving the sprite, there are no other animations happening, nor other intensive processes at the same time, I do not think that it should be that resource intensive as to slow down the Flash Player that much. What can I do to improve the performance when scrolling the sprite? (Just to give a rough approximation, the sprite that I am scrolling contains around 20-30 sprites with drawn shapes, 2-5 loaded bitmaps, 5-10 text fields.)

View 3 Replies

ActionScript 1/2 :: Improving Performance With Overlapping MCs?

Oct 29, 2009

I'm having some performance issues in certain areas of a flash game Im making.
 
Here's the situation: I have big movieclip containing a map that can be scrolled and scaled. There are some pannels with a bunch of MC buttons, controls, etc. on the right side of the stage. These are seperate from the map and stay in the same place.
 
Everything runs fine untill the large map is  zoomed in and/or scrolled such that the right side buttons and stuff are overlapping them map. Then the framerate jumps down from a nice smooth 30 fps to about 3 fps while the map is moving. There are no issues with the map moving when they don't overlap.
 
Now the thing is, is that's there's no real interaction between the buttons and the map. No transparency or anything, in fact I'm perfectly happy with the map dissapearing behind a side pannel. There are only about 3 pannels that the screen drawing routine would have to worry about, as all the buttons rest on top of the pannels, so why is my performance taking such a hit?
 
(Hmmm. Actually I do have a lot of transparency, but each is on top of a solid background, and none interact with the map.)

View 8 Replies

ActionScript 3.0 :: Improving Workflow With The Drawing API?

Nov 12, 2009

I'm used to the drawing tools within CS3/CS4, but i tend to draw from with AS3 using the drawing API, this is because I tend to want to programmatically animate the drawing parameters.Is there some solution whereby you can use the drawing tools within flash CS3/4 but then 'capture' the drawing information so you could then draw the same line/curve/ shape from within AS3?So a pentool could then give a code output like:

lineStyle(..)
moveTo(...)
lineTo(...)

[code].....

View 4 Replies

ActionScript 2.0 :: Improving Smoothness On Site?

Nov 5, 2002

Notice the animated "I"s in the top right... this is an MC with different instances of an I with a code in each one that animates it then resets it at a random size and alpha.If you scroll over the main menu buttons of the site and watch the animation sometimes it pauses for a bit. I have even removed many of the "I"s I had origonally and it still slows up a bit. This became more noticable when I added sound to the menu buttons.

View 5 Replies

Professional :: AS3 - Improving Printing Quality Of Pages

Aug 21, 2010

I am making a flip book in flash. I am using swf files as individual pages. User have the option to print pages. I am converting the swf into a btimap using bitmap data but when I print the test is not clear and all pixelated. Is there any way to improve the printing quality of pages?

View 8 Replies

ActionScript 3.0 :: Flash Improving The Rendering Performance?

Apr 26, 2011

I am working on a large project and I would like some advices about improving the rendering performance when scrolling some content.I have a large sprite with a lot of content that I need to scroll and the problem that I am encountering is that when scrolling this big sprite, the rendering of the Flash Player seems to slow down and the movement is choppy.

I wrote a custom scrollbar class that simply updates the target sprite y or x properties on an enter frame event.The large sprite that I am scrolling mainly contains other sprites that have drawn shapes, loaded bitmaps and text fields.

Considering that I am simply moving the sprite, there are no other animations happening, nor other intensive processes at the same time, I do not think that it should be that resource intensive as to slow down the Flash Player that much. What can I do to improve the performance when scrolling the sprite ?(Just to give a rough approximation, the sprite that I am scrolling contains around 20-30 sprites with drawn shapes, 2-5 loaded bitmaps, 5-10 text fields.)

View 6 Replies

Professional :: Improving Script Processing And Ensuring Completion?

Jan 7, 2011

I have a program in which I am running a number of for loops which are doing a number of different things.I pull in data from an xml file and then step through that data to dynamically create arrays, populate the arrays, and create and modify movie clips.

The program I'm building is similar in scope to one I developed in Director many years ago, and in that environment we had to actually put breaks in using timers to ensure that the data would be processed and that the system wouldn't choke.

What I'm seeing with this flash version of the application is similar and I suspect the same.  Basically, when navigating from the frame where the scripts are processed to the frame where the movie clips are displayed, there are times when it works perfectly and times when things are out of whack.  I put in a 5 second delay (arbitrarily) to see if this would resolve the issue and on my system at least it does.  But I need some advice on coming up with a real solution.

View 25 Replies

Flex :: Coding Tools Do You Use For Improving Effectivness Of Programming?

Nov 6, 2011

What coding tools do you use for improving effectivness of programming in FLEX?I found Tr.ace() AS3 Debugging Utility whichme a lot with working in a team of programmersframeworks like RobotLegs and others.

View 3 Replies

ActionScript 3.0 :: Flash Improving Time Taken To Open Swf's In Webpage?

Nov 25, 2010

I have an html website that displays still photographs contained in a swf built in flash. I refer in particular to the images in the rectangle window on the right. [URL]As you can see the swf starts with a % preloader. The images are fairly high resolution, 14 in total (each embedded into movie clips and not dynamically loaded)I just wish to know if there is a way of SPEEDING up the time it takes for the swf to load and open in the web page, to aid users with a slower connection.I understand that if my host server is reaonably fast (which I believe it is) then the problem lies with the users connection speed, but IS THERE ANY ADD ON ACCELERATOR or CODING I can apply from my side of things ?

View 4 Replies

ActionScript 3.0 :: Drag And Drop Multiple Objects / Improving Code Suggestion

Feb 25, 2010

i want to improve my code for drag drop seven different or multiple objects to be moved in any three of target places then target value will be search by category or feature wise,[code]

View 3 Replies

Actionscript 3 : :Improving Slow Performance Of Drawing Application Using BitmapData.draw()?

May 27, 2011

I am using a custom Flex skin to create an active blur/frosted glass effect on the background of floating Panels, TitleWindows, and other containers (similar to http:url....). There is a background image in the Application skin, and potentially any number of other components above and below the active blur component. Here's some relevant code within the skin:

public static const BLUR_FILTER :BlurFilter = new BlurFilter(16, 16, BitmapFilterQuality.HIGH);
private var _bitmapFill :BitmapFill = new BitmapFill;
private var _matrix :Matrix = new Matrix;[code]....

Unfortunately, the performance of this when the component is being resized, and especially when moved, is poor. There is noticeable drag delay and overall slowdown, and this is with only one popped-up TitleWindow in the test application. There is especially poor performance when components inside the TitleWindow are changed (button hover states, etc.)I've attempted to optimized a little bit by avoiding reinstantiation of the blur filter, bitmap fill, and matrix, but this has had little or no effect. I removed the blur at one point, just drawing the Application to a bitmap, and the performance is still poor, so it's clear that it's mostly the BitmapData.draw() call.

I've read about using scrollRect and cacheAsBitmap, but I'm not sure where to apply these properties (or other optimizations I'm not aware of) within the Application or its components.

View 2 Replies

Performance :: Optimization - Improving Performance With Large #'s Of Objects

Jan 11, 2011

I'm devloping some library classes for flocking/steering behaviours on large numbers of objects (2000+). I'm finding that at < 500 instances, performance is reasonable. As the numbers increase, framerate bogs down.

I've seen remarkable performance with libraries such as Flint or Box2D with ridiculous #'s of particles / objects, so it should be possible to optimize / refactor my code to be a bit better.

I'm aware of the basic optimizations, such as bitwise operations and optimized for loops. Are there any more fundamental approaches I should be considering? For example, currently each instance is a vector-based MovieClip. Would working with BitmapData be more efficient?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved