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

Pages: 1 ... 35 36 37 38
541
Shared Resources / Snake Engine kit! (previously: Snake Movement)
« on: July 24, 2011, 03:47:08 am »
Someone posted in "Ask a Question" forums that they need classic Snake movement, so here it is!

This kit contains:
 - four very simple animations for head and one for body
 - simple and, on the top of that, working tile-based snake movement
 - wrapping around the screen
- dying on contact with tail
 - growing after eating fruit

I hope you can understand the general idea behind this movement by looking at the behaviors: the one for head is responsible for changing animations and creating new body parts; another, which is for body, checks how much time body should be there before it disappears.

Also, pay attention to Tiled Collision System, because default collision detection isn't used here at all! [This screen] illustrates the general idea behind this system (shortly: comparing characters rather than coordinates). If you want to use functions contained in this behavior, you must attach it to the actor! In scene initialization behavior are blocks drawing collision map, move it from "when drawing" part to make it invisible!

If you want to use default collisions, remember to turn on collision detection for proper groups, because I turned them off (they're useless here, anyway)!

Unfortunately (or rather very fortunately for snake) I haven't managed to make dying at collision with body; apparently I'm not really experienced in collisions yet, after all. ^^'

Anyway, you can find it at Forge as: Snake Engine.
If you want to make your snake longer, increase the Length attribute.
If you want for snake to wait for pauses or something, check what you can do with Wait attribute.
If you want to make snake faster, decrease the StepTime game attribute (you can change it for adding bullet time or manipulate difficulty level).

542
Windows / Mac / Flash / HTML5 / Re: I Like Toast
« on: July 24, 2011, 01:46:12 am »
Well, about unlimited ammo: do you have ammo variable? If you do, then do something like that:

Code: [Select]
//when this shoots; it can be actually done in "when this hears [shoot]" block
set actor value [ammo] to [[get actor value [ammo] as number] - 1]
It's not actual code, but it shows the blocks you should use. Set/get actor value are to be found in Actor >> Properties, and difference in Numbers & Text >> Arithmetics.

543
Resolved Questions / Re: AS3
« on: July 23, 2011, 01:48:55 pm »
Just "Modify" your first post and rename the "Subject". ^^

544
Old Bugs (1.x/2.x) / Minus (and other symbolic keys) doesn't work!
« on: July 23, 2011, 11:44:54 am »
So, I was trying to make in my game some sort of text field. Not only to add letters and numbers, but also some more special characters, like periods, commas etc. So I added this all to Controls thingy (this was quite a bit of work, I must say O.o) and tried to test it.

When it's just about numbers or letters, everything works fine, however, minus (and probably other keys, like equality key) isn't registered. I mean, when I tried to use single key-getting function with minus (others where temporarily deactivated), the wall of errors saying "null object" appeared (well, probably because key check is done in "always" block ^^'). I was wondering if it has something to do with number of controls, however, when I tried to retrieve minus somewhere else, it didn't work, either.

I decided to write it in "Bugs" forum, because it doesn't seem that I was the one who did something wrong here (after all, I was just using key-checking function with key I had in Controls list). I hope you can fix this thing, as well as check all other symbolic keys (equality, slash & backslash, square brackets, semicolon and quote, period and comma). O.o

545
Toolset Extensions / Re: What Extensions would you like to see?
« on: July 23, 2011, 03:56:20 am »
Well, maybe something connected with module soundtracks? I mean, I think I've seen somewhere sites with Flash-made modules player, so it could mean that something like this exists (I'm not sure, though; it could be as well playing MP3s based on the track -. .-').
I like modules mainly because they're easy to control (you can jump to any fragment and you don't need to know particular time, like 47.395 second, because it's based on rows) and probably there isn't problem with annoying intervals between one loop and another (which occurs in one MP3 I checked).

However, anything which would let me jump freely around the soundtrack and get rid of those interval would be great.

546
Resolved Questions / Re: Randomly generated player actor appearance?
« on: July 22, 2011, 01:12:04 pm »
In fact it's even more simple. When you have actor, you can add more than one animation to it. So you can have actor "Wing", actor "Legs", actor "Spikes", actor "Ultra-h4x0ry device" and so on, and each of them would be responsible for each part. So if you have, let it be:
 - legs
 - body
 - hands
 - wings
 - head
This would mean 5 actors. If you wanted to have e.g. randomly generated eyes (except head shape), it would mean sixth actor and so on. Generally, the more parts are randomized, the more actors you would need, BUT even when you have 1000 animations of wings, they can be all contained in one actor.

I'd recommend you to choose any single randomly generated trait at first, and try to make some animations for it, but only within one actor. You have "Animations" tab in each actor, and you can have there as many animations as you want.

547
Resolved Questions / Re: Randomly generated player actor appearance?
« on: July 22, 2011, 12:50:42 pm »
Well, first of all, I see no reason for it to be buggy. I mean, Stencyl still has some issues (quite a lot, probably), but this particular matter should work OK. Also, if there's one pet for the whole game, it shouldn't cause great problems with performance. About the size of animations: well, the problem is how much animations to load, right? So it's up to you to decide which amount of animations would be problematic, would it be 10 MBs, 20 MBs or so. ^^'

If you worry about performance, size of animations is even less concern; after all, you're going to show only one animation at once, aren't you? And random generation of these shouldn't occur so often that it would make game unplayable (you aren't going to make it generate right when pet is e.g. jumping, are you?).

I'm not sure if my answer is appropriate, so if it is, sorry then. I'm just not sure if I really understood what you meant. ^^'

548
Ask a Question / Re: Is there a way to mass place ACTORS in a grid?
« on: July 22, 2011, 06:54:02 am »
Oh, I see. Well, if there won't be major performance problems, I think it shouldn't be a great problem, but if noticeable drop in FPS happened, you may use text instead of actors. Something like that (for 5x5 map):
Code: [Select]
AAWWA
AWWWA
WWWWA
WWWAA
WWAAA
where A is air and W is wood (newlines added for better illustration; normally this would be single line). I'm almost sure this would provide better performance, and if every single material graphic is assigned to this grid, you may try doing something like that. Again, it may turn out that it's not necessary at all.

---EDIT---
Well, I checked this game and maybe it's actually better to use actors here. I mean, with all those fancy scaling effects it's much easier to do it this way. Anyway, decision is up to you. ^^'

549
Ask a Question / Re: Is there a way to mass place ACTORS in a grid?
« on: July 22, 2011, 06:44:44 am »
Well, you can create them via Scene Behavior. Just place there something like:
Code: [Select]
repeat [WIDTH] times
  set CLC to [current loop count]  //CLC is hidden attribute holding count within first loop
  repeat [HEIGHT] times
    create actor [Air] at [current loop count]x[tile width], [CLC]x[tile height]
And that's all.
Of course, one could wonder if it's really necessary to fill entire level with grid actors. What do you want to do with them, anyway? O.o

550
Well, probably there is. Note that recycled actors use up some memory, too. Now imagine that you have an epic RPG where you don't create/remove actors that often (except some fancy effect during battle scene ^^), but you encounter different actors a lot. Now, when you play longer this RPG, memory will be used much more than it should. At least that's what I can imagine if my understanding of recycled actors is correct. Oh well... O.o

551
Game Ideas / [WIP][Puzzle] Unlock
« on: July 22, 2011, 04:34:14 am »
Title: Unlock
Genre: puzzle
Description:
Unlock is a puzzle game where you drag blocks (with mouse) in order to... achieve something. Objective may vary depending on the level, but generally it's something like:
 - moving block to certain position
 - moving block (or even all blocks) away from the map
 - place block at a certain place at least once during playing level (for example, if there are two such places, you can move one particular block to first place, and then to another)
 - and so on... (sometimes it may be combination of previous ones)

Blocks in general can move in all 4 directions, but some of them may be unmovable (and be a wall in fact), or e.g. move only horizontally or vertically (but every single of 16 four-directional movement combinations is possible). Also, there would be fields with different kinds of reactions and conditions for reaction to occur (it's a bit complicated, so I'd better leave it for tutorial ^^').

Here's [LINK] to my WIP file. It doesn't contain much of the features from actual game, but at least this shows that the engine works... somehow. Also, you can press "d" to show the map as the grid of characters - it's made mainly for debug purposes.
Oh, you can try to make shape like the one in attachment. Note that when you cover the field in the middle with single block, the part being on this field is destroyed (though other parts won't became separated because of that, and it's intended).

Any questions?

552
Old Bugs (1.x/2.x) / Re: Stencyl wont upgrade
« on: July 22, 2011, 04:00:08 am »
Alright, now this is strange. When I try to check for upgrades, it shows me something like that:
Quote
1.0.2 (b402) is now available - you have 1.0.3 (b401). Would you like to upgrade?
Now it's looking like it's trying to... downgrade! I decided to choose "Remind me later" (for obvious reasons), but something with this upgrade system is definitely wrong, even after 1.0.3 update. >_<

553
Resolved Questions / Re: Getting colour from text/number
« on: July 21, 2011, 09:37:59 am »
Alright, it seems that I won't get away without coding (oh, how terrible, isn't it? :P ), but thanks, anyway. With that it shouldn't be hard to write a function coverting string such as "008080" to teal colour. ;)

554
Resolved Questions / [SOLVED] Getting colour from text/number
« on: July 21, 2011, 06:52:52 am »
Hello!
Is there any way to convert text or number to colour? (best in Design Mode)
I haven't found such function, and I would like to have a way to do something like that (for example, converting "654321" to such colour). I mean, having over 16 millions attributes isn't exactly the best thing. ^^'

555
Chit-Chat / Re: Games
« on: July 21, 2011, 03:46:23 am »
Well, I usually don't really care about the genre, but if I were to pick some, I would choose RPG and Puzzle (without randomness). First one, because it often contains an interesting story, and second, because it lets me think about things through without time limit and I can return to it at any time.

But generally it's not the genre which appeals me the most, but a good story. ^^
(also, that's a pity that some games claiming to be RPG base it on a technical side, with character stats, skills and such, rather than containing really interesting story -. .-')

Pages: 1 ... 35 36 37 38