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

Pages: 1
Ask a Question / A problem of Turrets
« on: December 16, 2015, 11:07:56 am »
So, I'm working on a boat game from a top down perspective.  Right now, it's in it's simple stages. The boat moves at preset speeds you increase by pressing up and decrease by pressing down (So pressing up once sets the speed to 1, which the boat gradually speeds up to 15, then pressing again moves it up to speed 2 speeds up to 25, etc.).  To turn, pressing left and right rotate it.

The ships have a turret on top, which is mounted via a script on the boat.  The script basically says create turret, save turret as variable, and then always keep turret at XCenter and YCenter of the boat, minus offsets so that it can be on the front of the boat or back of the boat. 

The problem is when I rotate it.  If the turret is not in the dead middle of the boat, when you rotate, the turret starts to take a different position.  After several tests, I figured out that this is because when rotating, the X and Y corrodinate of the boat are not changing, so therefore the turret remains at the same place

I made a picture below to demonstrate. I used the battleship Yu from 1944 because all my boats right now are boxes.

1 is the Boat and the two turret models being used.
2. Is it in a verticle possition and everything is fine
3. Is when it faces horizontal, and the turrets remain where they are
4. Is what I think I have to do.  I have to make a script so that when the boat rotates, the turrets follow a circular path from a radius that is the X Center and Y Center of the boat to where the normal offset is.  How to do this, I'm not sure of yet. Trig was never my strong suit, and I think that's what I'll need.

However, I'm not sure how intensive all of these calculations will be.  I plan on having several turrets on several boats, so the solution can't be super memory intensive.   If there's a simpler way to do this and I'm being a dumbass, I'd appreciate if anyone has any leads.

Thanks :D


On yoplalala's suggestion, I used the image API.  Mounts good on ship, and I can control it.  But......

Don't have the absolute position of the turret during rotation, which screws up the targeting of the Atan2 function.  Also how to fire from the turret while making it look realistic is an issue that'll come up).  Get X and Get Y for the image are static (and the numbers there are...weird.  X is 0.5 as you can see in the middle of the boat).

Archives / A few other suggestions from teaching Stencyl
« on: January 27, 2013, 04:48:20 pm »
I started using Stencyl a year ago. I teach game design with it now. I like it because it's simple to use, but powerful when you need it to be. I've taught class, demos, workshops, all sorts of things with Stencyl, and I've seen some pretty interesting things. I made a suggestion about workspace management about an hour ago a while ago, but I thought dropping common problems and a few suggestions might be helpful.

Some background:
My first lesson I teach to people about Stencyl, in both class and workshops, is the Stencyl crash course. I've done it fifty times and I could recite it in my sleep. I modify a few things, but it's Mambo and Prongers basically.  Though I know the crash course is also available in a kit, I usually have them download it from Stencylforge to get used to it.  It also emphasizes to people skeptical of 2D games, who have tried Unreal, Unity, or other 3D engines, how easy it is to start with absolutely nothing and they can have a game in 20 minutes.   (Some audiences are really impressed I can make a game from scratch in under five minutes).

I try to teach them to be careful what they download, to look for featured assets and to check the ratings and comments. But at least two people out of a class will have something go wrong while collecting assets.

They downloaded the wrong resource kit, or they get impatient at the download screen and hit download twice, or my personal favorite, they start downloading each of the behaviors one at a time.  All of these end up becoming amusing errors. There's usually at least one person, when they call me over, that I just have to perk a brow and ask "How the heck did you do that?".  and they don't know, naturally. They're in front of it for the first time.  I have them start downloading their resources again, which Stencyl makes easy so I don't have to worry.

This is more complicated later.  When we move the Run and Jump kit, someone will just go onto Stencylforge and searches "run and jump", download anything with that name. Or they see an asset they like and download it, not realizing, even though I told them, that actors can have behaviors attached to them.

I don't fault them. They're learning. And because Stencyl is so easy to use I just have to take five minutes to get them situated right in class.  But later on down the line, when I set them out on their own to make a game, it generally involves me debugging their projects trying to figure out where they downloaded things from.  For some, who have "downloaded themselves into a hole" so to speak, I might have to tell them to export their art assets and start again with run and jump, because it could take me longer to sort out their projects than it would for them to start over.

I've encountered problems like this as an advanced user too, or at the very least, when I was starting out. So here are some small suggestions that I could help both the beginning user, advanced user, and me teaching class.  If a few of them have been implemented, I apologize. I've tried to check each one as best I can.

The Suggestions:

Download log: A log that is kept with the game locally, or with the program, that logs what you downloaded or imported into a game.  Not just a system log, but like a download tab that you can pull up in a browser.  Downloaded resources list the author it was downloaded from, and imported resources list the file name.  In this way, if you have to reimport an asset, you can figure out where it came from.   And when I can figure out where Steve got that Walking script from quicker.  I'd also like them to start making a bibliography/credits page for downloaded assets, and this would go a long way toward that.

Download Actor from Stencylforge without Behaviors:  I think it's great that Stencylforge allows people to download actors that are ready to use in a game. But more often than not, it doesn't work out like that.
Usually when someone finally finds that actor they want, they just want the animations. But what they get is usually broken. At best, the behaviors they come were designed with the game they come from in mind, so they aren't a good fit. Usual case, the actor's behaviors are missing pieces of their code from either game attributes, custom code blocks or worse. These behaviors (like shooting) will reference actors that aren't even there (like bullet).  But the biggest mess is that these behaviors then go side by side with all the rest of the behaviors, resulting in two Walking, two Jumping, another animation manager and so on.  And this is if they're lucky and download one thing. Not like five to experiment. 
After they hit a programming error (this is Game Design 101. They don't understand programming yet), they generally remove the behavior from the actor, believing that will solve their problem. This actually makes it worse.  Unattached behaviors still compile, so it still errors, but now they have no idea which Walking script is the bad one, because it's no longer attached to an actor.
I'm going to list my problems with duplicate behaviors in another thread, because it is a huge problem. But for this suggestion, I think the ability to download an actor without behaviors would help immensely and immediately.  I try to teach people to make a separate game to strip assets, but they don't quite get it.

Put "Don't remove" on the right hand side on the Mac:  Not sure why.  We're used to Yes being on the left and No being on the right in most instances.  But when you remove something in Stencyl on the Mac, "Don't remove" is on the left and remove is on the right.  This usually results in three minutes of comedically trying to figure out why it won't go away.

Undo Delete animation: I have a problem with this every once and a while. Someone deletes animations without thinking. If they're lucky, they only deleted the one side, so the simple fix is duplicating it and then reversing it.  But worse case, it's reimporting everything about the animation.  If there was a way to, I don't know, flag deleted animations, backgrounds, and other assets until the next restart, it would help a lot of people starting out I think. Perhaps

Copy behaviors to actor: Never fails. Someone gets their actor finally imported into their game. They're happy, similing. Milestone uncovered. Then I have to tell them they have to put all the behaviors from Jumper onto them, directly as they came in.  Smile fades.  I made a pack that has all the defaults done, but it doesn't work if they were prototyping with Jumper and changed his settings.  The ability to copy behaviors and configurations from one actor to another, even if it causes some kerfuffle with animations, would be a big help.

Copy Scene settings:  When creating new scenes in the beginning, people forget to put gravity on all the time. That's no big deal. But later on down the line when they have 10 scene behaviors with setups, it becomes more complicated. When I made my first game, I got my first scene done and then just kept duplicating it, deleting everything inside the scene, resizing it, and then starting over.   I kinda like the idea that you have to set it up each time for the control, but full length games could be easier if you could set up "Default scenes have these settings in this game".

Right click erase in Scene Appearance.  We all screw up while putting down tiles. It happens.  I used to just choose a blank square from the tile set and then erase with it. Found out the hard way that if you expand a tileset and add to it that everything becomes that tile. (Also amusing),  I teach now to use the selection tool, and I have no problem with it.  But if the users could right click to erase, they might appreciate it.  Right now, it just comes up with a menu you can't do anything with without selecting anyway.

I've got a few more. I'll come up with them as I come along.
Sorry so much text. I'm occasionally wordy. Thank you for your time in reading if you made it this far

Archives / Games separation at Welcome Screen
« on: January 27, 2013, 01:44:14 pm »
I love Stencyl. I really do. I started using it to make video games about a year ago, and now I use it to teach video game design.  People are really taking to it, both because it's so simple to use and because it's so complex when you get all the way down.  It's really catching on.

But there's a problem. The games are piling up.

Two sections of the class this year as well as last year's class are making the welcome screen a minefield of the controller pad icon. With each lesson usually comes another game to start from scratch, and I actively encourage students to version their games during development, so if something goes wrong they have something to move back to. They back them up to flash drives and use Stencyl Forge, but I think it's important to keep the games on the computer still in case one of the other two fails.

So every computer is full of past versions of games, test prototypes, and projects of users who travel from seat to seat. Most of them usually get the controller icon logo so they become undifferentiatable. And some people modify the examples games (purposefully or by accident) so that they can't be pointed to in class for demos.

Teaching good naming techniques and organization is a part of the course, but it's hard enough having to learn about game design itself without that.

Stencyl does a great job of organizing assets in game. I'd love to see that level of organization at the welcome screen as well. I know Stencyl wasn't design for multi-user, and frankly I don't mind that. But I think this problem also affects the normal user.

In my first game, I had almost twenty versions, Save game As every time I reached a milestone, along with several test workspaces for when I needed to try something without effecting the main game.  Didn't know how Melee worked? Make a new game and download someone else's. See how they got it going.  I easily had 50 games my first time out, and  I can't imagine how confusing it would be if someone ELSE was working at my computer doing the same with their games.

So, I have a few suggestions:
1. Game Separation.  Something as easy as being able to make folders on the welcome screen would be a huge help in organizing people's projects. A drop down tab on the left hand side, similar to how behaviors are done in game,  would be awesome.  I don't think they have to be account bound or anything.  Just so when Steve walks in, he has a folder for his game he's working on, a folder containing all his labs so he can reference them, and when Jerry sits down, he can access his own folder without having to see all of Steve's stuff plastered all over the main screen.

For the normal home user, I think this would allow people to better manage their game workspaces, making a folder for each of their game projects, so I know that "Flight Test" could into the folder with that flight game I was working on.

2.Demos as kits:  Adding Demos into kits (or something like it) would allow people to feel free to experiment with them. And if they screw them up, get a new one.  I know you can download them from Stencyl Forge, but that is just another step.

3. Lock game/Archive game:  Basically, you can right click on a game and hit lock, and it becomes read only. It remains that way until it's unlocked in the same fashion, or when the user tries to save they're warned and are given the option to unlock it.  This is mostly to protect projects from the occasional mouse click which could pull out code or modify a scene.  The biggest thing to protect against is the inability to undo deletes from the dashboard (I delete a background, it's gone) or animation screen (I delete an animation by accident, it's gone).  )

Secondarily, archiving the game could allow only active versions of games to be displayed on the main screen, so the welcome screen only has seven or eight games rather than 50.

But for us it's mostly about keeping people from fiddling with some projects (or having an extra layer to it).  Every suggestion post has to have one in left field.  This is that one.

4. Choose/Add Game folder: Our classes are taught in mac labs, but I know most students have PCs at home. I can tell them the file path on the mac, but then they are confused when they try to find it on their PC. The ability to change what folder you're pointing to for Stencyl games, or adding additional ones (via suggestion 1) would help with backup purposes and workspace management. 

The ability to choose their games folder and/or adding additional game folders to be displayed at the welcome screen would allow people to keep track of their games.  Not working on that project anymore?  Take it off your workspace list, not displayed anymore.  Need to back it up? You put it on the desktop, so just copy and paste.  Also, if the computer uses accounts, it would allow the folder to be aliased to a network drive.

I think these would help us as well as normal users of Stencyl, even if some were just implemented. I appreciate your time to read all this, and thank you for making such a great software

Ask a Question / Logging out
« on: April 04, 2012, 11:16:00 am »

We're using Stencyl in our intro to game engines class, and things are going well.  But, I can't seem to find a logout feature for when we get students year.   

They're all up to date as of today and are using the on Macs.  I haven't found the option on PC either though.

Ask a Question / Punching problem (project due tomorrow!)
« on: December 13, 2011, 03:41:47 pm »
I'm my college project using Stencyl, making a game with it, and I could really use some help. Project is due tomorrow and I've hit a snag that I think worked before.

In my game, the main character has a punch weapon,a nd I'm having a bit of trouble.  I think it worked before the last update, but I was prototyping at that point and may have been mistaken.

I'm currently using 1.3.2.  Mostly because I've heard of the problems some had,a nd since it's due tomorrow, if I can't work on it, well, its gonna ruin my night, and my semester.  Before updating, I wanted to see if I could debug this out.

The basic jist of it is this.  When a key is pressed, the punch is spawned as a separate object outside the actor, stays for a second and then is killed (I know I should recycle, but I'm worried about that later).  That script is attached to the main player.

The punch has a script on it that when it collides with something, it sends the message punched to the colliding actor Punched into the hurt enemies script, and then that enemy is supposed to die. 

The problem as far as I can tell is that the collision isn't occurring.  I checked the collision group, the punchable categories, but low and behold nothing.  The punch itself doesn't seem to be landing on anything. 

I've attached the scripts that I think are pertinent and an example here.  I'll try to move onto other things for now.  If anyone needs more, lemme know

Ask a Question / Slope Animation
« on: December 05, 2011, 09:55:08 pm »
Hi everybody,

I'm working on a standard side scroller.  I'm using the standard Platformer movement along with it, and it's going along pretty well.

However, I want to animate my character sliding down slopes with a specific animation, but after trying to add some custom jump animations, I gotta say the animation manager has me a bit scared.  I ended up freezing up all animations.

Making matters worse is that when I have slope detection activated on the character (and slope is set to 20), going down a 30 degree slope, the character animator freaks out like it's going down a bumpy hill, and it keeps changing between falling and standing animations when still, instead of sliding automatically. 

All I'd like to do is that when on a 30 degree slope (only kind in the game), player moves down smoothly, and the appropriate animation plays.

Anyone got any ideas where to start on this?  I'll admit freely that I'm a bit clueless.  I'll post up any behaviors people ask for, but for the most part, haven't modified any of the standard moves

Pages: 1