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 - Bombini

Pages: 1 2 3 ... 73
1
Extensions / Re: Custom Controls Extension
« on: Today at 01:07:52 am »
Tested and works!
Thanks a lot Justin!

2
Windows / Mac / Flash / HTML5 / Re: Space Pirate
« on: Yesterday at 11:55:57 pm »
Thanks a lot both of you!


3
Extensions / Re: Custom Controls Extension
« on: Yesterday at 11:40:03 pm »
Hi Justin,

thanks for the update. I am getting compilation errors now.
I dont understand what to do. I Havent changed the blocks too much from earlier this topic. Logs attached.
Do you knwo whats going on?

Cheers!

Quote
import com.stencyl.Input;
import openfl.ui.Keyboard;

class CustomControls
{
   public static function setControl(control:String, keyCode:Int)
   {
      trace("Set control " + control + " to key code " + keyCode + ".");
      Input.define(control, [keyCode]);
   }
   
   public static function setControlByName(control:String, key:String)
   {
      trace("Set control " + control + " to key " + key + ".");
      if (Reflect.hasField(Keyboard, key))
      {
         var keyCode:Int = Reflect.field(Keyboard, key);
         Input.define(control, [keyCode]);
      }
      else
      {
         trace("Failed to set control " + control + " to unknown key " + key + ".");
      }
   }
   
   public static function addKeyToControl(control:String, keyCode:Int)
   {
      trace("Add key code " + keyCode + " to control " + control + ".");
      Input.mapKey(keyCode, control);
   }
   
   public static function addKeyToControlByName(control:String, key:String)
   {
      trace("Add key " + key + " to control " + control + ".");
      if (Reflect.hasField(Keyboard, key))
      {
         var keyCode:Int = Reflect.field(Keyboard, key);
         Input.mapKey(keyCode, control);
      }
      else
      {
         trace("Failed to add unknown key " + key + " to control " + control + ".");
      }
   }
   
   @:access(com.stencyl.Input._controlMap)
   public static function getControlConfig():Array<String>
   {
      var controlConfig:Array<String> = new Array<String>();
      var controlMap:Map<String,Control> = Input._controlMap;
      for (control in controlMap.keys())
      {
         controlConfig.push(control + ";" + controlMap.get(control).keys.join(","));
         trace(control + ";" + controlMap.get(control).keys.join(","));
      }
      return controlConfig;
   }
   
   public static function applyControlConfig(config:Array<Dynamic>)
   {
      for(i in 0...config.length)
      {
         var controlKeys:Array<String> = cast(config, String).split(";");
         var control:String = controlKeys[0];
         Input.unmapControl(control);
         
         var keyStrings:Array<String> = controlKeys[1].split(",");
         for (j in 0...keyStrings.length)
         {
            Input.mapKey(Std.parseInt(keyStrings[j]), control);
         }
         
         trace("Set control " + control + " to keys " + keyStrings + ".");
      }
   }
}

4
Extensions / Re: Custom Controls Extension
« on: December 14, 2018, 07:59:49 am »
Hi Justin,

i tested the new version a lot and cant get it to work.
Setting a new control.

It worked fine before.
Did you test it? I am a bit helpless.
Cheers!

5
Ask a Question / Re: Certain text characters do not draw
« on: December 13, 2018, 08:36:03 am »
Difficult to say from here.
Try a different font (embed a font from your system) and see if this one works. Peoblem might be how tou imported your font.

6
Ask a Question / Re: Certain text characters do not draw
« on: December 13, 2018, 07:22:51 am »
Hi,
does the font have those characters initially?

7
Windows / Mac / Flash / HTML5 / Re: Space Pirate
« on: December 13, 2018, 04:46:51 am »
Hi Space Pirates!
i wanted to give you a tiny update and let you know that all levels are done and i am now pulling it all together. Embedding all texts, connecting the levels and making it basically all work.
I will add the sidestories once the main game works fine.

Some mutation going on:


Take care!


8
Journals / Re: Merrak's Isometric Adventures -- Alpha Release 1
« on: December 11, 2018, 11:43:05 pm »
This sounds all great!
Let us know when we can test :)

9
Windows / Mac / Flash / HTML5 / Re: Nature is Harsh (Ludum Dare 43)
« on: December 11, 2018, 12:25:10 am »
Very cool!
I cant play it unfortunately any longer because i dont want to sacrifice baby monkeys  ;)

10
Ask a Question / Re: [Solve]How to make a laser effect when shooting?
« on: December 03, 2018, 06:54:22 am »

11
Windows / Mac / Flash / HTML5 / Re: Space Pirate
« on: November 28, 2018, 11:50:20 pm »
My advice to anyone working on large scale projects is to invest some time predicting all the things that can go wrong and checking for them in each critical function/script you write. The extra time spent doing this early on will pay off in improved sanity later

Thanks for the comment!
I will keep this in my mind more going forward and apply it. I started implemented tiny checks like this which help already:


But having almost like a console or error messages might eb a very good idea.
I have no clue thought how to adress problems like the sound issue because i dotn even know how to measure it.
Thanks!

12
Windows / Mac / Flash / HTML5 / Re: Space Pirate
« on: November 28, 2018, 05:50:57 am »
Thanks for the comment!
I was not aware that "Run > Run App in Debug Mode > Windows (Debug)" could give me better picture. So thanks!
I am of course aware that only the first compile takes that long and i already changed my workflow. I used Flash because it takes 20 seconds instead of 30 seconds for Desktop after the first compile.

Cheers!

13
Windows / Mac / Flash / HTML5 / Re: Space Pirate
« on: November 28, 2018, 05:31:14 am »
Hi Space Pirates,

today i want to talk about the challenges of making a game because the last 2 weeks have been some of the worst in my whole time working on the game. I thought that i would stop developing this game.

Let me explain why:

I am usually using the Flash exporter to test the game because its usually faster compared to the Desktop export. The Flash version runs a few FPS slower but i take this into account. This is really about testing new features and levels on the fly all the time (into the hundred a day). This is how i work. I advance the game, add features and new content and it in Flash. Every few weeks i compile a Desktop version which i use for play testing with testers. So far the Flash and Desktop (PC, Linux, Mac) version always behaved the same. Three weeks ago i had a fully running Flash version, compiled a Desktop version and this Desktop version would crash&close after a while playing without any error message.

Oh boy!

Well, cant be that hard to fix i thought...but i could not find the problem. I started to get very very nervous. Usually i would get an error message while compiling but i never ever (in 5 years using Stencyl) had a Desktop version crashing like this without any hint what it was. The game is very complex. Trying to find the problem seemed to me like an unrealistic task. I was down. Really down. I tried to find the problem. And the more i tested the worth it got. The game would crash sometimes after a few seconds. Sometimes after 30 seconds.
I was afraid that it had to do with the newest Stencyl version (i keep updating weekly because some of the new features in 3.5 are just too cool). Especially because i could not recall a bigger change i made since the last stable Desktop version from 7 weeks ago. Also...i was missing this "oh i am so stupid" moment discovering that the mistake was on my side.
I thought, ok that's it. 4 years of work gone. I will upload the stencyl file to this blog and call it a day.

What did i do?

After feeling helpless for some days i started to test and test. Take stuff out of the game and see if it works. What a task. Why not use a a back up you ask? Well, i could not find the problem and there for not understand the problem.
Could it be the tile API? I am using it a lot. Could it be some performance thingy because i let the player destroy the level literally till it gone (if the player wants to). Could it be actors with unassigend collision groups? Could it the be "for each actor type" because there are too many of some kind?

All of a sudden "sound bugs" appeared. I would get distorted sounds after 5-10 seconds playing. Sounds would play instead of assigned ones (like shooting a gun would play the door opening sound), crashing the game. It felt like a virus which is slowly destroying the game. I felt helpless.
And just to put it in context: It was working all the time fine on Flash.

So?

i tested for days, deactivating system after system, hitting the compile button thousands of times, thinking that i found the issue but realising more and more that this was broken beyond repair.
And then it dawned on me...that the problem was directing to one actor i use very often in the game. The standard explosion which interacts with almost everything in the game (also tile API).
But what was wrong with this actor? I could not figure it out.

I took everything out of the blocks and code. Everything...(i thought) and the crash was still there.
I just left the sound file in for days, starting to qustion myself.................the sound file..........
Could it be the problem? NEVER, had this before.

I checked the sound file. No meta data, sample rate and resolution problems. That could not be it. I re-imported the audio mp3 and ogg replacing the sounds.
Crash still there.

Problem ONE:

Again testing testing..."Argh this stupid sound file...i start hating you so much...cant hear you anymore...delete you know".....Problem gone (for the moment). The game keeps crashing after 20 seconds but not after 5 seconds anymore and the sound problems are gone.

Wow...i still cant explain what happened, especially because i have not touched sound in months but this was ONE of the problems crashing the game. The sound had to be deleted put of the library and it was messing up almost all sounds. No clue how this can happen. Again, working fine on Flash. And this is scary.

And i start to understand that i seem to have two problems causing a crash.

Problem TWO:

After more exhausting testing (checking collissions and everything) i found a line somewhere where a (deleted) actor was not created anymore. This was causing the crash after 20 something seconds. It was very very deep in some sub block. But...i always got a compile error before in my game when that was the case. Always! Thats why i did not consider it.

Conclusion:

I have a working behaviour (the way i work) which worked for 4-5 years with a fixed rule set (for example: "if not actor assigend in create actor" i would get a compile error. Or game works in Flash like on Desktop which is not that case anymore) but i have to question it and adjust. What drove me crazy is that i cannot explain this sound bug. Thinking outside of the box might help sometimes but there is nothing preparing me for something like this (because its not logical and i didnt had this "oh my fault moment" which is so important to learn).

Seems like i have a working version again which is positive because then you will get to see the game but i need a few days of a break from this game and topic.

See you soon,
Bombini









14
Journals / Re: Merrak's Isometric Adventures -- Alpha Release 1
« on: November 28, 2018, 01:01:19 am »
Wow, the new gif looks awesome!

15
Journals / Re: Merrak's Isometric Adventures -- Alpha Release 1
« on: November 25, 2018, 11:14:21 pm »
And one small comments on the "z" key :)
This is a german keyboard (attached).
You see the x, z and aroows are ste in a way that it can hurt ;)

I would ignore this though because i dont hink that the game will be targeted at the German market.
Just wantes to explain ;)

Pages: 1 2 3 ... 73