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.


Topics - Guzzz

Pages: 1 ... 4 5 6 7 8
76
Ask a Question / Music tracks are overlapping
« on: January 13, 2016, 03:54:36 pm »
Hi!

I have a few music tracks that I want to play randomly (but without repeating) in my game. So, I wrote code (see attachment), not very elegant one but it works. I tested it by clicking on a button in the game which forces the code to run again. Everything seemed to work fine until I tried to run this code automatically. I used Event "When channel is done" and as result I have the code running and executing these random without repeatings tracks, but they are overlapping! It feels like this code wast trigged a few times at once. The oddest thing is, when I start the next scene I use command "stop sound on channel" before switching the scenes, and I have a stroke in the new scene which does "stop all sounds", but the music is still playing! How is this even possible? I used "stop sound on channel" and "stop all sounds" but it's still playing!
 

77
Ask a Question / How to use collision on a tile in Tile API?
« on: November 30, 2015, 03:12:51 pm »
Hi!

I'm using Tile API and some of the tiles with collisions I'm using as obstacles for actors (means their physics). I also have bullets. Right now they fly through these obstacles. Is there any way to make them stop and die after they hit collision of the tiles? I don't want to use physics for bullets though.
The problem is that I have a lot of tiles with different Collision Bounds and I want these bullets to die when they hit these collisions, which is not the edge of a tile. In other words, a bullet should be able to fly to inside of a tile and die only after it reaches the collision of a tile. 
I can see some collision blocks in Tiles API section in Palette but I cannot figure out how to use them for my purpose  :(

78
Ask a Question / How to center text in HUD?
« on: November 15, 2015, 02:41:46 pm »
Hi!

So, I'm working with the HUD and I have some questions...
In my game I have 3 numbers that I want to show in the HUD. Every number is centered in it's own rectangle. Its kinda hard to write code that makes these number centered. I used to write like "if number =/>10 but <100 set x -(the wight of one digit/2)" etc.
So, recently I found the way to use the width of an actor to make sure that number is centered relatively to its actor. The formula is ((the width of self - get width for text using font) divide by 2) as x . The new formula works perfect in most cases. However, a problem rises when an actor where text should be drawn is anchored to the screen. I don't know why, but if I put Draw block inside of an actor that anchored to the screen the text ends up under this actor.  The only solution is to use Draw-block in scene not in an actor. But I desperately need to use this block inside of an actor. So, what should I do?

79
Resolved Questions / [SOLVED] How to make center-aligned text?
« on: November 08, 2015, 11:33:53 am »
Hi!

Every time when I need to align any text in game I have to measure the length of the text and put the right X position for this text. But. Is there any more efficient way to align the text? Maybe I can write something like "take the wight of the actor (where text is written) minus the wight of the scene, divide by 2 and add this as X position for the actor with the text"? Does it make any sense?   or maybe there are other ways to do this?

80
Ask a Question / How to test on several devices?
« on: November 08, 2015, 11:19:55 am »
Hi to everyone!

I want to test my game on another iphone. How to setup everything so I can easily test on two (or three) devices?
I added new device into Apple Developer page, but I don't know what to do next? Should I make new certificates?
I couldn't find any step-by-step instructions for my case. Even google was useless here :(
I would very much appreciate any help!  Thanks!

81
Resolved Questions / [SOLVED] How to use effects with the fonts?
« on: October 26, 2015, 03:21:19 am »
Hi there!

I'm trying to use some effects with the fonts.
For instance I have an actor with the code (attached here) and I want to use block "fade out" or "fade in" upon this actor. Right now this block works for every graphics inside this actor except the font itself. In other words this actor becomes transparent but not the font inside this actor. How to use block "fade out" or "fade in" for actors with fonts?
 

82
Ask a Question / Performance issue with dungeon crawling game
« on: October 13, 2015, 02:07:21 am »
Hi!

I'm struggling  with the performance issue in my dungeon crawling game. It's not huge, but still some lagging is quite noticeable. I've red all the articles here about Optimizing Performance and I think I have two main problems:
1. My dungeon is almost predefined, except some tiles are randomly placed under the Always event block. Its like when the Player X and Y are these, change one tile onto another one etc.
2. The enemies are attacking the player so they have to follow the player. Therefore the trigonometry calculation under the Always event block is used.

So. What options do I have to improve the performance?
I suppose enemies are not always needed in trigonometry calculation. Maybe I can send them where the player is every 1 or 2 seconds? They wont move smoothly, but at least this expensive calculation wont be executing constantly. Make sense?

 With randomly placed tiles I can use collision with regions in order to know X and Y of the player and execute changing tiles code after Player in region.  So I would rid of a lot of Always event blocks, but would get a lot of regions. Make sense?

I would need any suggestions or tips, or links ;)

Thanks!

83
Resolved Questions / [SOLVED] Failed to run iOs test
« on: October 11, 2015, 01:50:35 pm »
I couldn't make a test on my device.
There is something with bitcode or something... please help me.

84
Hi!

I know that I cant draw a rectangle on a layer in Stencyl... but... Is there any chance to control where a rectangle could be drawn in terms of its position in layers?
I'm asking because I have a situation when sometimes I have a build where every next rectangle is drawn beneath the previous one and sometimes when it's above it.
In other words. I have a Hit Points bar which is drawn by block "draw rect". I have a moment (a player gets a buster) when I need to draw a rectangle beneath this HP bar. So I use "draw rect" for this buster as well. Both two rectangles act separately: HP bar getting shorter as live of a player is getting shorter, and a buster lasts for a few seconds. 
Despite the fact (as I've been told here) every next rectangle is always appears above the previous one, I got my rectangle beneath the old one. Which is good! Apparently this effect didn't last for very long. Now I have rectangle of a buster above HP bar.

So, is there any chance to control the disposition of rectangles?

85
Ask a Question / Is build 8281 suddenly become very buggy?
« on: April 12, 2015, 09:23:00 am »
Hi!

For the last couple of months Stencyl  has been working very bad. Sometimes I can't open a scene, it just shows "opening" message and actually freezes. Sometimes I can't open a tab Actor Types in the main window. Sometimes it shows an error message (see the log in the attachment) but mostly it just freezes on some stage of "Opening", "Saving" or "Compiling".
Is something wrong with the latest update?

86
Ask a Question / Failed to make a build.
« on: April 09, 2015, 01:16:49 pm »
Hi!

I 've got this error
Quote
Level:     ERROR
When:      2015-04-09 22:05:15:728
From:      stencyl.sw.io.write.resource.HXWriter

Source '/Users/guzboroda/stencylworks/games/Dungeon/resources/11@3x.fnt' does not exist

Throwable: java.io.FileNotFoundException: Source '/Users/guzboroda/stencylworks/games/Dungeon/resources/11@3x.fnt' does not exist
   at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1074)
   at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1038)
   at stencyl.sw.io.write.resource.HXWriter.generateFont(HXWriter.java:2179)
   at stencyl.sw.io.write.resource.HXWriter.write(HXWriter.java:889)
   at stencyl.sw.io.write.resource.HXWriter.access$200(HXWriter.java:74)
   at stencyl.sw.io.write.resource.HXWriter$2.doInBackground(HXWriter.java:285)
   at stencyl.sw.io.write.resource.HXWriter$2.doInBackground(HXWriter.java:277)
   at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at javax.swing.SwingWorker.run(SwingWorker.java:334)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

and also something about... joystick?

Quote
Level:     ERROR
When:      2015-04-09 22:05:14:560
From:      stencyl.sw.io.write.resource.HXWriter

Could not copy joystick images.

Throwable: java.io.FileNotFoundException: Source '/Users/guzboroda/stencylworks/games/Dungeon/inner-joystick@3x.png' does not exist
   at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1074)
   at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1038)
   at stencyl.sw.io.write.resource.HXWriter.copyScaledFiles(HXWriter.java:2520)
   at stencyl.sw.io.write.resource.HXWriter.write(HXWriter.java:748)
   at stencyl.sw.io.write.resource.HXWriter.access$200(HXWriter.java:74)
   at stencyl.sw.io.write.resource.HXWriter$2.doInBackground(HXWriter.java:285)
   at stencyl.sw.io.write.resource.HXWriter$2.doInBackground(HXWriter.java:277)
   at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at javax.swing.SwingWorker.run(SwingWorker.java:334)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

Whats the problem? and how to solve it?
See the log in the attachment

87
Hi!

I cannot make a test on my iOs device. In the log window I can see only
Quote
Level:     ERROR
When:      2015-04-09 07:09:35:413
From:      root

Unexpected problem on thread AWT-EventQueue-0: null

Throwable: java.lang.ArrayIndexOutOfBoundsException
This line repeats by dozens. It actually doesn't show anything in the end of Compiling phase. I also cannot exit Stencyl properly, only via Force Quit.
I attached the log file.

88
Resolved Questions / Error: unexpected problem
« on: April 08, 2015, 12:49:36 pm »
Hi there!

When I test the game in the log window I can see the error:

Quote
Level:     ERROR
When:      2015-04-08 21:11:19:421
From:      root

Unexpected problem on thread AWT-EventQueue-0: null

Throwable: java.lang.ArrayIndexOutOfBoundsException

the test goes well though, without any problems, but this line ( 6 lines, actually) kinda bothers me.
Do you know what this error is about?

89
Resolved Questions / [SOLVED] ERROR: Unexpected else
« on: March 16, 2015, 03:33:06 pm »
Hi!

I'm trying to fight to this very strange bug. For some reason today Stencyl is trying to find the same error everywhere and I feel it does it by random. I tried to restart the computer, to undo all the changes I've made today or to delete all the blocks he marks with red color. But it still shows new random blocks with the same error: Unexpected else.

For instance he found
Quote
Events for '02 room':  Unexpected else
   from scripts.SceneEvents_9
   line: 3150
   columns: 24-28
here (see attachment).


Please, help me.

90
Ask a Question / Can I draw a rectangle above the other one?
« on: March 15, 2015, 09:16:59 am »
I Have "When drawing" block with a big rectangle inside of the Actor and other "When drawing" block with a small rectangle inside of a behaviour of the same Actor. I want to use one small rectangle above the big one. Sometimes I get the test when small rectangle is above the big one, sometimes the other way around. Is there any chance to use "layers" and define which rectangle should be over the other one?

Pages: 1 ... 4 5 6 7 8