Jump to content

  • Log In with Google      Sign In   
  • Create Account

prototypical

Member Since 04 May 2011
Offline Last Active Nov 09 2013 01:48 PM

#5081854 Web game: flash or unity?

Posted by prototypical on 30 July 2013 - 10:16 PM

It's important that you think about the monetization side of things. There are far more flash game sites than unity or HTML 5 game sites. So unless you are funded upfront to make a HTML 5 or Unity based game, you might be limiting yourself a bit in terms of monetization.

 

If you are doing 3d, you can do it in either flash or Unity, although I'd say that Unity is probably the better choice.  So to some degree, what type of game you are making is important in deciding.




#5072118 Why does ActionScript uses a .fla file to run its .as file?

Posted by prototypical on 22 June 2013 - 07:38 PM

Also should be noted that you can take the CS6 IDE out of the picture by using the flex compiler with Flash Develop, Flash Builder, or various other IDE's out there. But as explained by previous posters, you have to realize that your target is the flash player with it's graphics rendering and animation system - thus the Sprite/MovieClip requirement for the stage.




#5044774 ActionScript 3: Why is it not removing the movieclips?

Posted by prototypical on 19 March 2013 - 09:42 PM

So you have no enemies spawning, and only a ship or something ? What graphical elements are active ? 

 

Is there a scrolling background ?

 

here's a performance stats monitor that can possibly give you a hint as to what is going on :

 

https://github.com/MindScriptAct/Advanced-hi-res-stats

 

I'm assuming if you are experiencing lagging, you'll see the framerate drop, but take note of your memory consumption as well to see if it's fluctuating large chunks.

 

Also, do you have anything text based on your screen ? Large amounts of text on the screen can hurt performance.

 

oh.. last one.. Are you tracing any output ? If you are tracing things constantly, that can cause a lag as well.

 

If you have a background, is it bitmapCached ? 

 

Something like this is really hard to troubleshoot without knowing more about what's going on in your code. I'd try to isolate it by disabling aspects until you see the problem go away.




#5044420 ActionScript 3: Why is it not removing the movieclips?

Posted by prototypical on 18 March 2013 - 06:41 PM

Are these enemies animated ? Removing a enemy from the stage, doesn't stop the movieclip from animating. So if you have enemies that are animated via tweens, they are likely still doing so if you haven't stopped the animation. That would explain the lagging over time.

 

Do the enemies have any event listeners attached to them ? That might be a reason why they are not being garbage collected.

 

But it's easy enough to test my theory if you have animated enemies, by just stopping the animation when you remove. We are theorizing at this point that they are not being removed. (good theory)




#4975246 AS3.0 Using arrays for game inventory and how to track objects?

Posted by prototypical on 31 August 2012 - 04:06 PM

I think it'd be helpful to have a post for each individual issue, as opposed to a "How do I design and code my inventory system and integrate it into my game? and... now lets talk about animation system after that... " in one thread.

The current subject of this thread, in many ways does not resemble it's contents. In my opinion, development via this process results in frankenstein code. :)


#4974319 AS3.0 Using arrays for game inventory and how to track objects?

Posted by prototypical on 28 August 2012 - 10:47 PM

Not sure what you mean by a function with properties. Do you mean you are creating a class ?


#4973176 AS3.0 Using arrays for game inventory and how to track objects?

Posted by prototypical on 24 August 2012 - 08:45 PM

I don't understand what you are asking.

I just suggested not using a multidimensional array to track inventory, but instead to use a single dimensional array containing objects.


#4973114 AS3.0 Using arrays for game inventory and how to track objects?

Posted by prototypical on 24 August 2012 - 02:43 PM

I'm not sure that I am completely understanding what you are trying to do, specifically in regards to a 2D Array.

Just create an GameObject class or object and push that into the single dimensional array.

for example :

var item:Object = {id:124, name:"axe"}
inventory.push(item);

** using the squiggly braces "{}" is shorthand for creating a new object.



I used an object, but I'd think that you'd want to have a class for all game/inventory objects that would include any information about that object.


#4971968 AS3 Collision Issue

Posted by prototypical on 21 August 2012 - 02:30 PM

I believe your issue is a misunderstanding of how to use getRect()

you should try :

var blockRect:Rectangle = theBlock.getRect(_Level);


the parameter for getRect is -- targetCoordinateSpace:DisplayObject — The display object that defines the coordinate system to use.

The parent of the object is what I believe you should intend to use to define to the coordinate system. I'm assuming that is _Level in this case based on the code I see.


#4967980 Which Flash SDK to use

Posted by prototypical on 09 August 2012 - 10:51 PM

You would use Flex in order to compile for free, and there is an option to automatically download/install it when you install the Flash Develop IDE. You can also compile with the flash authoring software, but I don't recommend that IDE for programming as it's horrible in comparison.

But as the previous poster mentioned, sounds like you are talking about an IDE.

There are a few out there, the free one - Flash Develop is actually a really good IDE and I would definitely recommend it.

Adobe has Flash Builder and there is another one called FDT and neither are free.

There are a few others out there, and I would recommend googling "Actionscript IDE" or something like that. I know there are quite a few, but the ones I suggested are quite popular.


#4967872 Wait to fully-init instances in AS3?

Posted by prototypical on 09 August 2012 - 01:03 PM

Greenvertex is spot on with one way this could be happening. But if that is not the case, you should verify your suspicions with some debugging techniques.

It's also possible that your process that initializes the mazes has simply not occurred yet. It's not far fetched that you might trigger something that relies on maze data before initializing the maze data. I've certainly done that type of thing before! :)

It's also possible that the initialization of the maze data has a bug, that leaves one of it's members null.

I encourage you to familiarize yourself with the debugger, and utilize traces/breakpoints in your code to track down issues like this quickly and efficiently.


#4967176 Starting a point-and-click game, moving a char in X-axis (AS3)

Posted by prototypical on 07 August 2012 - 04:27 PM

Depends on details of your control design.

But one distinct aspect is that with keyboard control you are basically checking every tick if a button is pressed and then moving the character or setting a flag for another part of the code to move the character/update the animation etc.

With the mouse control you suggest, you are clicking on a location and I'd assume that the goal is now to move to that location over a given amount of time.

Depending on the design of your animation/movement system, how you make that happen can differ.

Here is a great tutorial that I suggest you check out regarding vectors :

http://tonypa.pri.ee/vectors/start.html

It's not just about movement and this specific topic, but I'd suggest learning this aspect to better understand what you need to do.


#4967161 Statistics in games (AS3)

Posted by prototypical on 07 August 2012 - 03:48 PM

A SharedObject is for saving data client side.

For example if you want them to be able to save games and settings without the need of a database, that is a reason why you'd use a shared object.

The aspect of saving any data for your usage is the server side database part.

If your interest is tracking the data, you need to send it to the server database.


#4967101 Creating a Text Field for in-game dialogs as in WoW (AS3.0)

Posted by prototypical on 07 August 2012 - 12:59 PM

I don't know that I would have a queue of textfields. I would probably have just one textfield sized to the dimensions of the chat window and just update that with a generated HTML text string each time an update is needed. The source data might be stored in a queue/list/array. But before you even get to that, you need to think about what kind of data you are storing, and how it will be used.

I assume that you'll be storing what someone chats, and possibly other notifications as well. The type of message will most likely determine the color of the text. right ?

There are multiple ways you might approach this. One might be a simple array that stores strings. Each string would be an html encoded version of the text, with the appropriate formatting for color/font/bold.

But even with that approach, you might have to consider what other requirements your chat widget might have. For instance... What if it needs to filter messages ? Like you might have the ability to only see a certain kind of notification/message based on a criteria that might or might not even be "custom" based on user preferences.

You can see how that design aspect might completely change the data and the way you handle the data, to facilitate only displaying the ones desired. Because now you need to be able to make logical decisions and it might not be enough to just store a string, but you might also need to store other data defining the purpose of the string (chat message, notfication, npc message etc)

I say all this, because as you will learn, sometimes just deciding to do something by perceived steps without evaluating the full scope of your design goal... can lead to alot of extra work in redesigning to facilitate new functionality you introduce.

In terms of learning, I'd not focus on just FIFO. I'd suggest that you explore arrays/list to start and then move to different methodology in organizing them etc.

You can google "Arrays AS3 Tutorial" and maybe "FIFO AS3 Tutorial" to search for resources.

As a note, I think that these forums are of great use for specific issues, but am not a fan of threads where you have a goal of creating a widget and go through the step by step development and all it entails in a single thread. So I'd suggest that you post topics that are not so broad, and focus on the specific issue at hand. ie -- FIFO. That way someone looking for information on FIFO in these forums is likely to find a useful discussion on that topic with any answers someone might give on that topic (links to tutorials ect) and not the development of a chat dialog widget.

In my opinion, the topic of this thread has been resolved as it has given information on how to create a textfield with color formatting, a general suggestion as to using a queue for storing the data, and a note about the importance of design in what approach you might choose with a widget like this.

Hope that doesn't come across as rude! Posted Image Good Luck my friend.


#4967075 Statistics in games (AS3)

Posted by prototypical on 07 August 2012 - 12:00 PM

If I am understanding your goal correctly, you want users to be able to see the statistics of all players combined.

You could store the statistics in a database somewhere on a server. Update the database and retrieve the statistics from the database via script calls within your game.


Doing this requires more than AS3 obviously, as you will need to have an understanding of a server side scripting language like PHP and some database know how, MySQL for example.

You might choose another scripting/database technology, but in general you need to have a database server side that stores the statistics that the clients can interact with.




PARTNERS