Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dincicode

Pages: 1 2 3 ... 12
1
@Merrak, yeah the backgroud ovals are there jsut for oriantation. Originaly they were there so I can make sure things were rotating correctly. But I find them usful for centering things so I eft them in.

@Mdotedot, thanks :).

2
Video 4 : 1 new feature in the level editor, better enemy unit AI, a new infintry unit plus its special attack type, improved targeting system, basic loadout room for customizing player's units and a new menu.

https://www.youtube.com/watch?v=oLwXc48fZ4M
<a href="https://www.youtube.com/v/oLwXc48fZ4M" target="_blank" class="new_win">https://www.youtube.com/v/oLwXc48fZ4M</a>

3
Extensions / Re: External Data Extension [2.0.0]
« on: May 30, 2018, 10:46:11 am »
Well I did say change the top part not the whole file.

4
Extensions / Re: External Data Extension [2.0.0]
« on: May 28, 2018, 11:18:36 am »
I think also the top of "FileSave.hx" should look like this.

import com.stencyl.Engine;
import com.stencyl.behavior.Script;
import com.stencyl.behavior.TimedTask;
import com.stencyl.models.Font;
import com.stencyl.graphics.G;
import com.stencyl.utils.Utils;

import nme.display.BitmapData;
import nme.utils.ByteArray;
import haxe.io.Bytes;
import openfl.Assets;

#if (openfl >= "4.0.0")
import openfl.geom.Rectangle;
import openfl.display.*;
#end

#if !flash
import sys.*;
import sys.io.*;

#if (openfl >= "4.0.0")
import lime.system.System.*;
#else
import nme.utils.SystemPath.*;
#end

#end

5
Extensions / Re: External Data Extension [2.0.0]
« on: May 28, 2018, 11:14:30 am »
Change the contents of "DataUtils.hx" to the text below. I think that was all. Can't remmemebr any more. I know there is 2 lines to change but I'm not sure if they were bot in the same file or not. Let me know if it doesnt work I'll look deeper.

import com.stencyl.graphics.G;
import com.stencyl.Engine;
import com.stencyl.models.Sound;
import nme.display.BitmapData;

class DataUtils {

   public static function getTextData(file:String):String {
      file = "assets/data/" + file;
      #if (flash || js)
      var text:String = nme.Assets.getText(file);
      #else
      var text:String = FileSave.getText(file);
      #end
      if (text == null) text = "";                  // if something goes wrong, return blank text
      text = StringTools.replace(text, "\r\n", "\n\r");   // swap double line breaks (Windows-style line breaks)
      text = StringTools.replace(text, "\n\r", "\r");      // replace all double breaks with single breaks
      text = StringTools.replace(text, "\n", "\r");      // make all line breaks the same type
      return text;
   }
   
   public static function getImageData(file:String):BitmapData {
      file = "assets/data/" + file;
      #if (flash || js)
      var image:BitmapData = nme.Assets.getBitmapData(file);
      #else
      var image:BitmapData = FileSave.getImage(file);
      #end
      if (image == null) image = new BitmapData(1,1);      // if something goes wrong, return blank image
      return image;
   }
   
   /* Takes a file path, gets rid of all illegal characters, and splits into a path and a filename. */
   public static function subfold(file:String):Array<String> {
      for (a in [':','*','?','"','<','>','|'])
         file = StringTools.replace(file, a, "");   // remove all illegal characters from path/filename
      file = StringTools.replace(file, "\\", "/");   // swap backslashes for forward slashes
      file = StringTools.replace(file, "//", "/");   // change double slashes to single ones
      while (file.charAt(0) == "/")
         file = file.substr(1);                  // remove leading slashes
      var n:Int = file.lastIndexOf("/");
      if (n == -1)
         return [".", file];
      else
         return [file.substr(0,n), file.substr(n+1)];
   }
   
   public static function appendLine(path:String, content:String):Void {
      #if flash
      trace("ERROR: File IO cannot be accessed on Flash.");
      #elseif js
      trace("ERROR: File IO cannot be accessed on HTML5.");
      #else
      var file = getTextData(path) + "\r" + content;
      FileSave.saveText(path, file, null);
      #end
   }

   public static function drawList(g:G, list:Array<Dynamic>, x:Float, y:Float):Void {
      for (i in 0...list.length) {
         g.drawString("" + list[Std.int(i)], x, (y + (i * g.font.getHeight()/Engine.SCALE)));
      }
   }
   
   public static function printList(list:Array<Dynamic>):Void {
      for (item in list) {
         trace(item);
      }
   }

   // EXPERIMENTAL
   public static function removeSpecial(text:String, char:Int):String {
      var special:String = "";
      if (char == 0) {
         special = "\n";
      } else if (char == 1) {
         special = "\t";
      }
      return "abc" + special + "def";
   }

   public static function getSoundData(filename:String):com.stencyl.models.Sound {
      var ext:String;
      #if(mobile || desktop || js)
      ext = ".ogg";
      #else
      ext = ".mp3";
      #end
      var file:String = "assets/data/" + filename + ext;
      var nmeSound:flash.media.Sound = nme.Assets.getSound(file);
      return soundToStencyl(nmeSound, filename, ext);
   }

   public static function soundToStencyl(sound:flash.media.Sound, filename:String, ext:String):com.stencyl.models.Sound {

      var stencylSound = new com.stencyl.models.Sound(-1, filename, true, false, 0.0, 1.0, ext #if (openfl>="6.0.0") , 0 #end);

      stencylSound.streaming = false;
      stencylSound.src = sound;
      return stencylSound;
   }
}

6
Ask a Question / Re: Make actors as simple as possible?
« on: May 26, 2018, 04:37:02 pm »
Can this thing "Engine.engine.allActors.clr( a.ID );" be set to on and off as needed?

7
Ask a Question / Re: Make actors as simple as possible?
« on: May 26, 2018, 04:22:54 pm »
Yes all tiles are actors. I don't use animations however I attach images to them. I have figured out a groolingly hard way around the problem. I jsut need to see if there is a better way around it before I commit to a solution.

You see I need behaviours in the tile acotors only to keep 3 atribues and 2 mouse events. However I can also jsut store all their info in a scene behaviour and control the tiles from there. I already tried a simple version of this and that lets me use over 1000 tiles. With each individual tile having their own behaviours that cuts it down to 600 tiles max.

The problem with controling all tiles from a scene behaviour is the amout of work its going to take for the saving, loading of levels that I already have implimented. Not to mention some other things that I can't forsee at the moment.

A tactics game levels need to be atleast 400 tiles big on avarage. But I wanted to have much much bigger Boss fight levels. 

8
Ask a Question / Re: Make actors as simple as possible?
« on: May 26, 2018, 12:34:23 pm »
Oh thats good, I guess.

9
Ask a Question / Make actors as simple as possible?
« on: May 26, 2018, 11:02:59 am »
Is there a way to get actors to cost even less.
I already set Actor Mode to simple on all my actors and set my game to have Simple Physiscs.
But is there some trick to get actors to have even less cost but still have the ablilty to use behaviours.

Is there perhaps a way to use simpler behaviours. I'v noticed htat in every behaviours stencyl imports 60 + things. Like "com.stencyl.models.actor.Collision", "com.stencyl.models.Region", "box2D.dynamics.B2Body", etc. How much cost does this incur on the game, can it be taken out?

10
Chit-Chat / Re: How to change the names of global attributes.
« on: May 23, 2018, 10:29:32 pm »
Damn, took forever to change 1 custom block.

11
Chit-Chat / Re: How to change the names of global attributes.
« on: May 20, 2018, 08:54:23 pm »
Amazing.

Now if only someone could let us know how to change custom block details.

12
The rotation code. Mid X and Mid Y are just the coords of the point you would want your actor to spin around.

13
Video 3 : New features in the level editor. Basic enemy unit AI, different attack types, a new mech unit, plus a partially fleshed out turn base system.

https://www.youtube.com/watch?v=yBYiQdxPYgM
<a href="https://www.youtube.com/v/yBYiQdxPYgM" target="_blank" class="new_win">https://www.youtube.com/v/yBYiQdxPYgM</a>

14
Extensions / Re: External Data Extension [2.0.0]
« on: May 12, 2018, 03:49:49 pm »
Second one works fine.

15
Chit-Chat / Re: Screen Capture / GIF software for OSX
« on: May 04, 2018, 06:12:31 pm »
"Microsoft Expression Encoder 4 Screen Capture" Its free, captures high quality video. You can chose the part of screen you want to capture, etc.

It has a 10 mins max recording time than you have to click record again. But that shouldnt be a problem for you since you want to make Gifs out of the vids. Once you record your video, you have to encode it, than simple go to goole and searh for sites that conver videos to Gifs there is about a million of them. Or if you have photoshop you can do it there.

Pages: 1 2 3 ... 12