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

Pages: 1 2 3 ... 30
1
Ask a Question / Re: Problems with pixel-snapping
« on: January 10, 2018, 01:08:21 pm »
Quote
If you move the camera using a tween, (by using the change value block), it will actually move the camera through all the actual pixels.
Thanks! This solves my first problem then. Any ideas about the other two?

2
Ask a Question / Problems with pixel-snapping
« on: January 10, 2018, 03:48:08 am »
Project settings
  • 256x128 canvas
  • 3x scale
  • pixel-snapping
  • flash

Problem #1
My current camera behavior is a regular smooth lerp, but due to the small canvas size, it simply can't be enjoyably smooth. Is it possible to render the scene pixel-perfect and then scale that up, so that the game canvas is nice and pixely, and then move the camera on the finished product for a smooth, lovely result?
Solved

Problem #2
I'm rendering text on actor loops that are, for example, above certain actors. When the camera is moving, the drawn text is "moving" slightly off where it should be drawn, does not snap to grid, and looks bad. What is the cause and can I do anything about it?

Problem #3
I'm not sure if it has anything to do with my project settings, but I'll bundle it in. Sometimes the camera, for a single frame, offsets by a lot resulting in a jerky movement. It happens with my lerp camera, with static set camera center to actor etc. Is this a known bug? I haven't encountered this before.

Thank you in advance :- )

3
Ask a Question / Re: Multiple sprites per actor?
« on: December 02, 2016, 07:17:53 am »
Hi, image api is def the way to go I've used it extensively in my game, you can attach multiple images to an actor and they stay attached and scale, rotate etc to match the actor.  Only things to watch - you need to either scale the attached image, or better, make multiple resolutions for each device scale your game will be used on otherwise they attach at the wrong size, also, if you change animations, the images move behind so you'll need to bring them to the front.  Other big issue forma with images attached to actors is that when you use any of the effect blocks, like tint or hue, on IOS the actor tints but the images don't (though they do on flash).

I'm trying to solve this last problem by changing the actors sprite itself, merging the image rather than attaching it.

Once i've found a solution, I can post how it works.
Thank you, good stuff! Fortunately I'm working with 1:1 pixel junk, and it has no effects apart from tweens.

4
Ask a Question / Re: Multiple sprites per actor?
« on: December 01, 2016, 01:28:13 pm »
Although I haven't really used it much myself, I'm sure that the Image API will help you.

http://www.stencyl.com/help/view/image-api
I guess this is the way to do it. Am I missing something obvious, or can you not add images just like actors or backgrounds? If I understood correctly, you need to read it from disk?

5
Ask a Question / Multiple sprites per actor?
« on: December 01, 2016, 10:53:28 am »
Quick question: Is it possible to layer multiple sprites to act as one actor?
Example: a dirt block, some pebbles in it, roots sticking out the bottom, and grass on top. All of these elements are a separate sprite.
Right now I'm doing this using multiple actors per block to have procedurally generated graphics. Needless to say, it's powerhungry. Especially on big maps.

6
The way I do this is I have a list. Each item in the list is a single letter. For example, I can have an actor that is a text box. When that box is active (a boolean that triggers when it's clicked), all keys pressed add to the list. I'm sure there are easier ways to do this, but this is how I roll.

7
I think OP wants to make, say, a box that can be stood on by the player. The box is affected by gravity but cannot be pushed by the player. I'm actually interested in this as well. Removing collision shape or making it a sensor is an answer to another question.
@MichaelPel, you could read the question correctly before discarding any response:
   
I need it so that the enemies cant be pushed but they are still affected by gravity.
He says "enemies". A box is not an enemy.

@MermaidMan, this info can help you: http://www.stencyl.com/help/view/collisions-and-groups/

"Say, a box" was an example. I'm sorry if I offended you in any way. I have to admit I did misread the question. However, doesn't removing the collision shape or making it a sensor effectively make it fall through everything?

8
I think OP wants to make, say, a box that can be stood on by the player. The box is affected by gravity but cannot be pushed by the player. I'm actually interested in this as well. Removing collision shape or making it a sensor is an answer to another question.

9
Ask a Question / Re: Question about masks
« on: May 05, 2016, 03:34:22 am »
Hey,  thank you! Interesting read

10
Ask a Question / Re: Question about masks
« on: May 03, 2016, 02:43:35 am »
It's been a while. I hope I'm allowed to bump this.

11
Extensions / Re: External Data Extension [1.6.1]
« on: May 03, 2016, 02:42:42 am »
I honestly don't know what will happen if you save a non-string attribute with the "save text" block. I think it'd need to be converted to a string first, and of course, the loaded result will also be a string. If you're using a Map attribute, you could try saving it in this format:
Code: [Select]
key1:value1
key2:value2
key3:value3

You could then reconstruct the map by splitting each line at ":", and setting the corresponding key to the corresponding value.

I could make a couple of blocks to make it easier to save and load data types other than text. Would that be useful to you?
I would love you even more.

12
Extensions / Re: External Data Extension [1.6.1]
« on: April 27, 2016, 10:46:59 pm »
Oh, that makes sense. This would be possible, but you'll need to save all necessary data into text files with the extension's "save text" block (not the built-in "save game" block). Then you will need to build a system to load the files with the extension's "load text" block, and use the data to dynamically change the game (set game attributes, for example). Now the data files can be freely copied from one device to another, as long as the other device has the same game installed. (It may be easiest for the player if everything is stored in one specific file or folder.)
Yes, of course. I already have a simple system that saves game data to a listmap (don't remember what they're called), and is also able to load from it. It works flawlessly, so can I simply save that maplist as is?

13
Extensions / Re: External Data Extension [1.6.1]
« on: April 26, 2016, 10:23:16 pm »
@MichaelPel: On mobile, the "save text" and "save image" blocks save the data to the app's folder in the user's directory (the same place where assets from the "extras" folder are stored). It can be loaded with the "load text" and "load image" blocks even after the app is shut down and restarted. I'm not sure whether the data is deleted even when the app is uninstalled.

But the reason I'm asking is, I want to be able to copy a save file on anoher non-mobile project I'm working on.

I'm not sure I understand. Do you have saved data on a non-mobile device and you want to move it to a mobile device? Can you please elaborate?
Ah, sorry for being vague! I was hoping to be able to save the game progress to something like a .txt so it can be edited by a player or transfered from one computer to another. Examples include settings and preferences.txt, procedurally generated world data.txt and player save.txt

14
Extensions / Re: External Data Extension [1.6.1]
« on: April 26, 2016, 08:23:57 am »
why don't you use the save and game blocks ?
I actually have no idea how they work and when they should be used : D
But the reason I'm asking is, I want to be able to copy a save file on anoher non-mobile project I'm working on.

15
Extensions / Re: External Data Extension [1.6.1]
« on: April 26, 2016, 04:14:47 am »
If I wanted to save a game on mobile, and load it after completely shutting the app down, how should I go about it?

Pages: 1 2 3 ... 30