Jump to content


  • Posts

  • Joined

  • Last visited

Koshmaar's Achievements


Newbie (1/14)



  1. Ok so LoaderMax has nothing to do with embeds? Too bad. From my experiments I noticed that things like: public static var base_path = "../../assets/"; [Embed(source = base_path + "mapCSV_Level1_Sky.csv", mimeType = "application/octet-stream")] public var skyCSV:Class; [Embed(source = base_path + "mapCSV_Level1_Map.csv", mimeType = "application/octet-stream")] public var mapCSV:Class; ... are also not possible. I'm just looking for a way to make it a little more flexible and managable - so there's no hope? no secret trick, library or compile time switch... I was also going to ask abour preloading, but found very nice articles: http://active.tutspl...ingle-swf-file/ and http://gamedev.micha...ame-tutorial-8/ Perhaps they will help someone.
  2. Hey What is the best way to load and store data? I've been using Embeds for sprite graphics, tilemaps and sounds, and they're easy, they're fast and no problems with them... apart from flexibility: public class Level1 extends LevelBase { [Embed(source = "../../assets/mapCSV_Level1_Sky.csv", mimeType = "application/octet-stream")] public var skyCSV:Class; [Embed(source = "../../assets/mapCSV_Level1_Map.csv", mimeType = "application/octet-stream")] public var mapCSV:Class; [Embed(source = "../../assets/backdrop.png")] public var skyTilesPNG:Class; [Embed(source = "../../assets/tiles.png")] public var mapTilesPNG:Class; [Embed(source = "../../assets/levels/level1_path1.txt", mimeType = "application/octet-stream")] public var paths:Class; [Embed(source = "../../assets/levels/level1.xml", mimeType = "application/octet-stream")] public var enemy_zones:Class; I'd rather define level name in base class, that would be prepended with all assets names, ie. var level_name : String; level_name = "level1"; var base_path : String = "../../assets/"; LoadSomeResource( base_path + level_name + ".xml"); // pseudo-code LoadOtherResource( base_path + level_name + "_path.txt"); I could to that with loaders, either Adobe or GreenSock flavours, but there's one thing that bothers me: how to create single .swf file that can be distributed without any references on directories. Embeds are good in that they automatically are embedded in the final swf. Is there any system that takes all the dynamic assets you want and packages them to swf? Perhaps LoaderMax can perform such a feat? Sorry I'm new to flash platform, and my google fu didn't help with this What I'm aiming at, is a flash Flixel game that can be distributed globally and sold to FGL. I heard it has to be delivered as a single swf file. Fair enough. Is going with Embeds the only way? I'm using latest FlashDevelop.
  3. Thanks for the answer. Unfortunately currently I'm creating my first commercial game, and before it proves that it can pay for itself, I won't be buying any software. Also, I'm using TweenLite exlusively, because file size is very important to me ( yes, I know, 4kb is very little, but still I want to keep down unless absolutely no alternative ). If it's impossible to hack TweenLite, I'll have to hardcode this by myself not that difficult. Btw, one more question... if I may. Is it possible to create a tween between 2 values that is not based on time ? I mean, instead of always tweening ie. for 2 seconds, the tween would take amount of time depending on the distance of those values. An example would be, again a shuriken that is flying with constant speed, regardless of the distance. Is it possible to create a tween like that?
  4. Hey I have a shuriken class which needs to fly to enemy, and this enemy is moving. So the target position needs to be updated in real time. I tried something like this: TweenLite.to(this, 0.35, { x: target.x, y: target.y, onUpdate: CorrectTargetPosition, onUpdateParams:["{self}"]} ); public function CorrectTargetPosition( tween : TweenLite ) : void { tween.vars["x"] = target.x; tween.vars["y"] = target.y; } Unfortunately it doesn't work Values are changed, but it doesn't affect shuriken.