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

Pages: 1
1
The code I attached was just my basic scanning and creating test. For my actual game I am going to use the List utility extension and save each possible list to a 2d list and then pick randomly from them. This you may have to manually copy and paste to the actual level creation screen, but all it will be is copying and pasting a string into a 2d list. Then your program can select a row from levels. (Sorry if that didn't make the best sence). Also great job reading through my code. The code blocks I used were just workarounds due to Stencyl being annoying.

The final block in the create world behaivour creates an actor based on its actor type id. I would've done it so that it creates it based on its actor type, however it seems that whenever you set a list to a list e.g. [1,2,3] it can only contain text and number values not actor values e.g. [1,2,Player,4] wouldn't work. Therefore I used the getactortype() block which returns the actor type by the actor's id.

Sorry for the late reply, I've been busy with work the last few days. Thanks for answering my questions. It seems like this is a viable solution but it's kind of unintuitive to make things in Scenes, then run the game to get the list for them, then use that list to recreate that scene in code so I never have to actually call upon the Scene itself. I guess it would work once I get it set up but I'm not sure it's worth all the hassle. I'm considering just using Unity or Flash since I know how coding and I'm already familiar with those programs. I was hoping Stencyl would be a faster way for me to develop or prototype but it seems limited to do things like this easily. Maybe I'll end up using it after all, I'm not sure yet.

I think Stencyl would benefit from having something like Unity's prefabs or Flash's symbols. Even letting you combine and nest actors would be good enough. Thanks for the help so far everyone, I'll post here again if I intend to use Stencyl after all.

2
You can make a behaivour that will add the actors x and y and type to a list. I made one before and I also made a behaivour to draw a scene from this, however when I did it I also scanned the tiles, but I can show you how I did it if you want (my code isn't commented)

Hey this is pretty neat! I'm a little confused at what's going on since the game doesn't seem to run properly for me, but looked through the code and gleaned some cool stuff. Let me try typing it out to see if I got it right.

So the "Scan World" behavior is a scene behavior that scans a scene and stores information into a list, "Scene Data"?  First, the width and height of the scene (in tiles), then it loops through each tile based on the aforementioned dimensions and stores the ID of each tile and it's tileset. Then you iterate through the scene's actors using the "Count" attribute and store the number of actors in the "Scene Data" list. Then for each actor you store their X,Y coordinates in the list, along with their Actor ID. Then at the end you get the length of the list and store it at the beginning of the list?

I understand parsing through the tiles and storing the info, and it's the same concept for the actors more or less. I also noticed that in the "Create World" behavior you have to jump through a few math hoops to figure out when the data for the tiles is finished and the data for the actors begins (basically using the # of tiles X the # of list items stored for each tile). It seems to me it would be easier to create 2 separate lists, one for tiles, and another for actors. I'm a little confused at the code for actually creating the actors (the final block in the "Create World" behavior) since it's such a long code block but I'm guessing it's just the math to find the relevant information for each actor (ID, X, Y) in the list.

So this seems like the best solution that I could employ so far but my main question is do I have to manually copy the list from the log and save it for each scene I create or is there a way I can have it save itself (inside Stencyl or as a txt/xml/json style file)? In the Create World script you have you have the "Scene Data" list hardcoded into the behavior (as worldScanned), I'd really like to be able to have it as a variable where I can just point it at a list that I've already saved.

TLDR: I understand the gist of your code, curious on how I can design my sections in scene view and have it SAVE out the lists so I can later use them to recreate the scene on an actor by actor basis.

3

Thanks for the reply! I like the idea, I didn't think about using events to spawn actors. But using this method I wouldn't be able to visually design the sections then right? If I have to say where to spawn everything with coordinate values in the create event it will be very annoying to design the level sections. It doesn't seem very intuitive.

I'm looking for a way to do this so I can lay out the sections visually, much like you would in the Scene designer.

The way I'd probably do it is visually design waves and then scan them by storing actor coordinates and types in a list. Then you can create the wave from the list.

Could you elaborate a bit? Do you mean design the sections in the Scene designer and then manually note down the types/coordinates as Callan suggested? Or is there a way to set up an event (does a Scene have a create event?) that'll scan all the actors inside and populate a list for me? If I could do that and have it save the list I think that would be a workable solution. I'm new to Stencyl so I'm not sure if this possible.

4
If you want to do it that way, why not make an actor which is invisible (and has no physics) which on its create event creates all the other actors for that section?

Then you only need to spawn that actor to spawn a set of others

Thanks for the reply! I like the idea, I didn't think about using events to spawn actors. But using this method I wouldn't be able to visually design the sections then right? If I have to say where to spawn everything with coordinate values in the create event it will be very annoying to design the level sections. It doesn't seem very intuitive.

I'm looking for a way to do this so I can lay out the sections visually, much like you would in the Scene designer.

5
Hey I want to make an endless runner game BUT I do not want the level to be totally randomly generated by placing various platforms (as tuo's demo does). Instead I would like to create little sections or patterns that I design myself, and then choose from them in a psuedo-random way.

For example I design a few sections with easy jumps and no enemies, and then some harder ones with tougher jumps and some powerups near enemies. Then the game randomly picks between them, so you get only easy sections at the beginning, but as you last longer you start seeing the harder ones. I want to be able to design them by hand, like you would in the scene editor, but be able to spawn them like actors off-screen since I don't think you can load in a scene without switching from the current one.

So the solutions that I came up with so far were to have these sections be actors that get spawned off stage, and put these actors into lists (easy, hard, etc) to randomly choose from. I think I can figure this out, but the part I'm stuck at is creating these sections. I want each section to have instances of multiple actors inside it. A section might have various platform actors, maybe an enemy actor, and a powerup or a collectable. How can I group or combine multiple actors together into a bigger actor? Is this possible in stencyl?

I come from a flash/unity background but I wanted to try stencyl out. In flash I would be able to make a symbol (a movieclip) with nested symbols inside. I could do something similar in Unity by making a section a prefab. Is it possible to nest actors inside another actor in Stencyl? If anyone has any advice on how to do this I would greatly appreciate it, Stencyl seems great so far. Alternatively if I can do this using scenes and loading them dynamically that would be fine too. Whatever works!

6
I too would really like an update. I want to use skeletal animation so I can have the player customize his character a little bit without having tons of sprites.

Pages: 1