Argl
63 posts
|
Topic: Game Programming /
Optimize Publication Time
I use FlashDevelop already, but I didn’t know we could code Flash games in AS3 with Flex as well. Haxe is actually appealing, yet mysterious for me :)
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Optimize Publication Time
In the Flash Publication settings => ActionScript Settings (the wrench), there are two boxes : “Strict Mode” and “Warnings Mode”.
If you disable those two boxes, Flash actually compiles WAY faster. On a little project, you don’t see the difference, but I used to wait 4min for my game to compile… Now I wait 10s!
Of course, the Strict mode and the Warnings mode are useful to debug, etc. But I think i’m gonna use them just once, at the end of the day :)
Just wanted to share in case some of you are in the same trouble as I was.
Good day
EDIT : after looking around, I found this article which confirms my post : http://www.bytearray.org/?p=931
|
|
|
Argl
63 posts
|
Topic: Collaborations /
voice actor looking for projects!!!
Hey, I like your sounds library. I’ve no project requiring voice acting right now, but I will definitely keep you in mind too.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
How would you do this
I’m far to be good in algorithmic but i think we could imagine a kind of loop in an loop which would start from a certain tile, then look for a 1 on each tiles around (including diagonals), if there is a 1 in those tile, then the function go on starting with this tile, and still go on until there is no more 1. However, if there is nothing around but 0, the loop stops.
Does it sound possible ?
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Funny bugs in your games
When I was working on Rogue Soul I had this bug : I paused the game while my little rogue was on a zip-line and he basically fell down, all frozen, in a stupid way, going even through the ground.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Garbage Collector Enigma
Thanks you, it was very helpful.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Garbage Collector Enigma
Hi there,
I’ve read a few stuff about garbage collector. If it’s now clear for me that every event listeners added somewhere has to be removed elsewhere, it’s not as clear for objects : should I set any object I don’t need anymore on “null” ? Or maybe the object is automatically removed after a while if it has no references left ?
I try to prevent my games from lags and memory leak but it’s tricky. It would be nice if you guys would like to share your habits about optimization.
Thanks for reading
|
|
|
Argl
63 posts
|
Topic: Game Programming /
SharedObject : flush() or not ?
I’m gonna do that. Or more simply just flush() when player pause, back to menu, or loose.
Thanks everyone for the answers.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
SharedObject : flush() or not ?
Thanks, I will now be careful with flush().
However, the lag doesn’t come for a EnterFrame flush.
Actually it’s very punctual :
function _increase (e:Event):void {
_current ++
_save.data.current = _current;
_save.flush();
}
|
|
|
Argl
63 posts
|
Topic: Game Programming /
SharedObject : flush() or not ?
Hi,
I have some data I want to save during the game. My dilemma is very simple :
If I use flush() during the game I have a lag which is a bit annoying. But if I don’t, I’m afraid to loose the data I’ve just stored.
Can I trust that everything will be flushed automatically if the player closes the browser during a game ?
If you would like to share your experience
Thanks for reading.
|
|
|
Argl
63 posts
|
Topic: Collaborations /
Collabs Problems
Hi,
I have some trouble in add collaborators to my project. Currently they appear in the game profile as ‘Not Approved’. But they haven’t received any messages which ask them to approve my collab offer. I can’t figure out the way to make them accepted. Does anyone have encounter this kind of problem ?
Many thanks
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Debug a lag problem [solved]
This is interresting, I will use it for sure.
Meanwhile, I’ve applied the Drakim’s advice and just discovered my bug ! In fact, there were not so many thing to remove :)
Thanks all
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Debug a lag problem [solved]
Originally posted by Senekis93:
Also make sure to test on debug mode.
In fact, to test my project from FlashDevelop, I press F6. If I click on the button ‘Test Project’ it just does nothing.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Debug a lag problem [solved]
@Drakim : That’s a solution… But I’ve so many things to remove !
If nobody else has a solution, I will try that way.
Thanks for your answer.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Debug a lag problem [solved]
Hi,
My problem is “simple” : sometimes, whenever it want, my game starts to lag horribly (15 fps instead of 30) during a while, then it comes back to 30. Independently of what happening on screen. So I don’t ask you to solve this problem, which is clearly due to a lack in my code, but you could help me by indicate me a good way to debug it. By example I don’t know if there is a way to see the object in memory, the variable values, etc. If I could identify the memory peak, I could understand the bug. Does the Flash debugger could be useful ? I also use FlashDevelop but can’t manage to access a debugger from it.
Thanks by advance
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Increasse the Popularity of a Game
While developing your game, take a break, forget the code line, become a player, play to your game and then analyse : is it enjoyable ? If not, what is frustrating ? Is there anyway to improve it ? The more you will be objective, the more you will be efficient. Also ask to as many people as you can to test your game. That’s really the key.
Your game is not bad, but there so many way to make it better ! Just be patient, work hard, and you will be rewarded. I’ applied that advice to my game, it’s rated 3.94/5, 567 000 plays ==> I’ve been rewarded.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
[AS3] Create my own Component [SOLVED]
Actually, I’m on flash CS5.5, so yes it works. I don’t know why the metadata is on the Flex livedocs.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
[AS3] Create my own Component [SOLVED]
UPDATE :
Finally, it works :)
In fact the ADDED_TO_STAGE event was misleading, I suppose this event is dispatched BEFORE the inspectable properties are read. I’ve just checked with a ENTER_FRAME, and my popRate’s value have been traced.
To all those who ask HOW BOUND A CLASS PROPERTIES TO A COMPONENT PARAMETER :
don’t forget to stick together the medata and the properties declaration (or get/set) :
[Inspectable (name = 'popRate', variable = 'popRate', type = 'Number', defaultValue = '100')];
public var popRate:Number;
http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html
|
|
|
Argl
63 posts
|
Topic: Game Programming /
[AS3] Create my own Component [SOLVED]
Originally posted by vesperbot:
you have to initialize that variable right after you have created the object, or right after it ahs beed added to stage. Or, provide a default value right there, like: public var popRate:Number=100;
No, what I do is retrieve the popRate’s value defined manually on my component…
|
|
|
Argl
63 posts
|
Topic: Game Programming /
[AS3] Create my own Component [SOLVED]
@skyboy : thanks for this answer. I added the ADDED_TO_STAGE function and also the Inspectable line to make the link between the component parameters and the class.
public class EnemyBox extends MovieClip {
[Inspectable (name = 'popRate', variable = 'popRate', type = 'Number', defaultValue = '100')];
public var popRate:Number;
public function EnemyBox():void {
this.addEventListener(Event.ADDED_TO_STAGE, _createEnemy);
}
private function _createEnemy (e:Event):void {
trace(popRate);
}
}
but still, it doesn’t work… my trace display NaN. I’m getting crazy !
|
|
|
Argl
63 posts
|
Topic: Game Programming /
[AS3] Create my own Component [SOLVED]
Thanks for your answer MoolaugnMaster, but be sure I made something like 20 google search before posting on the programming forum. I’ve find many tutorials but not this one.
|
|
|
Argl
63 posts
|
Topic: Game Programming /
[AS3] Create my own Component [SOLVED]
Great thanks for your answers guys. But I misspoke : I want to drop “manually” my component on the stage. And then define “manually” again some parameters on every specific instance. So I have a MovieClip in my library called enemyBox, I right click on it and click on Component Definition, then I add some parameters, like popRate. After that, I select my instance and set the parameters popRate on 15, and export.
Here is the code of my EnemyBox class :
package src.characters.enemies {
import flash.display.MovieClip;
public var popRate:Number;
public class EnemyBox extends MovieClip {
// TRACE : NaN instead of 15
trace(popRate);
public function EnemyBox():void {
}
}
}
Why the class don’t retrieve the value I’ve put in the parameters ? That what I don’t understand.
Thanks for your encouragements !
|
|
|
Argl
63 posts
|
Topic: Game Programming /
[AS3] Create my own Component [SOLVED]
Hi Kongregaters,
I’m in trouble, trying to create my own component. I just want to make a component called “EnemyBox” that I could drop anywhere in my levels with some parameters, like the pop rate, which kind of enemy are allowed to pop there, etc.
Then, when I play the game, the EnemyBox is replaced by a real enemy, chosen randomly according to the parameters.
Currently, I have created the component in my library, defined his parameters and bound it to my class EnemyBox. My problem is that I don’t know how to retrieve IN my EnemyBox class the values of the parameters I’ve set manually on my component’s instance. I think I’ve mess something important but … what ?
I’ve looked around on the web, and found only complicated tutorials, incomprehensible for me.
Thanks for reading
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Huge Exportation Time : Fatality ?
Thanks for you answers guys.
@ lucidius : by placeholder you mean, a hugly graphic just there waiting for the good one ? If it what you mean, it would make me lots of trouble as my game (especially this one) have a gameplay realy based on the graphics animation. But I will think of it, thanks. By the way, I can’t draw the art I’m using by code… Just impossible !
@ GameBuilder15 : Glad to learn that. So you suggest to select only the characters I need ? Or just not embed at all, and wait for the last minute to do it ?
|
|
|
Argl
63 posts
|
Topic: Game Programming /
Huge Exportation Time : Fatality ?
Thanks for you answer, in fact, I use FlashDevelop but it doesn’t compiles… So I came back everytime to my .fla and make a normal export, which is truly a mess. (it’s a SDK error so I’m gonna try to download the good one).
So if I get the Flex compiler, I’ll be able to export my game ? Sounds strange, I used to think that Flex was for another type of application.
|