Bionicle Game WIP

Talk about making games.

Bionicle Game WIP

Postby hawkjohenson » Sat Oct 22, 2011 1:44 pm

Hey, guys. I'm Hawk. I'm a bit of a noob when it comes to programming, so I had some questions I hope you all can help me with.

To put it simply, I'm making a Bionicle game based on the first iteration, with the original characters and stories. I've been working on it for a couple days now, and I've hit a bit of a block. You see, I used the anti-moonwalk tutorial to set up the walking animations, and I used a combination of two jumping tutorials to set up the jumping stuff. HOWEVER!

I found a couple problems that I can't find addressed anywhere. When the character is running, if ANY other button is pressed, he'll suddenly get stuck in a single image and keep moving in the same direction until I stop him, at which point he'll pop right back into how the anti-moonwalk programming is supposed to work.

The next problem is that I want to add jumping animations... but I can't figure out HOW. I can easily set it so that if I hit the jump button, he'll go into a pose and jump, but when he lands, he's stuck in that position. I've tried using a new variable to fix this using the "stringf" commands, but that had some weird graphical glitches to it.

Please, guys. I really need some help here, and possibly more later in the future with enemy AI scripting. How can I fix these problems? Oh, and BTW: "A" to move left, "D" to move right, and numpad 2 to attack. Attacking doesn't do anything yet, though... I have yet to set that up.

EDIT: Okay, I added the Data folder as well as the .ged file this time. Hopefully it'll work.
Attachments
data.rar
(1.17 MiB) Downloaded 98 times
bionicle.ged
(9.53 KiB) Downloaded 88 times
Last edited by hawkjohenson on Sat Oct 22, 2011 9:18 pm, edited 1 time in total.
hawkjohenson
 
Posts: 4
Joined: Sat Oct 22, 2011 10:04 am
Score: 0 Give a positive score

Re: Bionicle Game WIP

Postby SuperSonic » Sat Oct 22, 2011 2:11 pm

You have to upload your "data" folder as well as the ged or else we can't see what types of problems you're having :wink:
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Bionicle Game WIP

Postby hawkjohenson » Sat Oct 22, 2011 2:37 pm

Oh, crap... Sorry, didn't know about the data part. :/ I'm not entirely sure which file is the data file, though...

Is there someplace it's always loaded to? What exactly am I looking for?
hawkjohenson
 
Posts: 4
Joined: Sat Oct 22, 2011 10:04 am
Score: 0 Give a positive score

Re: Bionicle Game WIP

Postby lcl » Sat Oct 22, 2011 2:40 pm

Data is the folder where all your graphics are in. Game editor creates it automatically, it's in the same folder as your ged file. So, compress the ged + data folder and then send. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Bionicle Game WIP

Postby hawkjohenson » Sun Oct 23, 2011 10:57 pm

ALRIGHT, I posted up the Data file in a .rar archive. I'm still hoping for some help from you guys.

Lately, however, I've been working on the graphics, and making the whole level look much nicer.
hawkjohenson
 
Posts: 4
Joined: Sat Oct 22, 2011 10:04 am
Score: 0 Give a positive score

Re: Bionicle Game WIP

Postby Wertyboy » Mon Oct 24, 2011 2:59 am

Look cool but... that's it?
Press A and D to move is good... but don't you have "jump"
EDIT: oh i see, Numpad 2 to attack... but why Numpad? i don't have that button :(
User avatar
Wertyboy
 
Posts: 543
Joined: Tue Jun 15, 2010 12:38 pm
Location: HCM City, Vietnam
Score: 44 Give a positive score

Re: Bionicle Game WIP

Postby Jagmaster » Mon Oct 24, 2011 3:42 am

Ah, I have always liked Bionicles. Looking through the sprite sheet brings back memories!
(It's kinda scary, but I still know the names of most of those characters. :lol: )
But now they all sit in my closet, all in pieces in a bucket. :cry:

I looked at your script, and I'd say the easiest way to fix moonwalking is to hold the Player's direction in an integer variable.
you could start out by making a global integer variable using the variable tab in the script editor or global code. Call it Player_dir or something like that.
Then simply assign a different value to each key down and key up event.

Key Down: d -> Script Editor -> Player_dir = 2;
Key Down: a-> ' ' -> Player_dir = -2;
Key Up : d-> ' ' -> Player_dir = 1;
Key Up : a-> ' ' -> Player_dir = -1;

You don't have to use those values, just use ones that you can remember easily. I like to use positive for right and negative for left, but you don't have to.

Then on draw actor -> Script Editor:
Code: Select all
//Insert gravity here :)
switch(Player_dir)
{
case 1:

if(jump==1)
{
ChangeAnimation("Event Actor", "Stand_Right", NO_CHANGE);//You can assess the changeanimation box useing the variables and functions tab so you can   
}                                                                                           //easily add the real animation names.
else
{
ChangeAnimation("Event Actor", "Jump_Right", NO_CHANGE);
}
break; //<-These breaks are important!

case -1:
if(jump==1)
{
ChangeAnimation("Event Actor", "Stand_Left", NO_CHANGE);
}
else
{
ChangeAnimation("Event Actor", "Jump_Left", NO_CHANGE);
}
break;

case 2:
x = x + 5;
if(jump==1)
{
ChangeAnimation("Event Actor", "Walk_Right", NO_CHANGE);
}
else
{
ChangeAnimation("Event Actor", "Jump_Right", NO_CHANGE);
}
break;

case -2:
x = x - 5;
if(jump==1)
{
ChangeAnimation("Event Actor", "Walk_Left", NO_CHANGE);
}
else
{
ChangeAnimation("Event Actor", "Jump_Right", NO_CHANGE);
}
break;

}


Now, this may look confusing, but the only thing that's happening is the actor is waiting for Player_dir to equal something. That's what the switch and case do.
Then the actor checks if you are jumping or not. (I assume that you have jump=0; on your jump script and jump=1; on your landing script.)
Then it changes the actor's animation and moves the actor based on what that information is equal to. If you have more movement, simply add more cases and breaks within your switch bracket.
I recommend you try to do this piece by piece so you can understand it. You need to enter in your own animation names and variable names as well. If you need further help ask away.
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score

Re: Bionicle Game WIP

Postby hawkjohenson » Mon Oct 24, 2011 4:45 am

Oh, WOW!

Thank you so much! This code will make it so much easier to add actions and animations! Now I just have to work on adding all the combat systems into it, and making sure it all looks nice before I post up the next edition!

New question, though. How do I add a fancy picture to the thread on the main page? I'd like to keep you guys informed on how this game is coming along as I go, and ask for help if I ever need it. I'm also looking for some custom background sprites, if anyone here is a skilled sprite artist. :)
hawkjohenson
 
Posts: 4
Joined: Sat Oct 22, 2011 10:04 am
Score: 0 Give a positive score

Re: Bionicle Game WIP

Postby Jagmaster » Mon Oct 24, 2011 1:09 pm

You can post a jpg or a png (no bmps allowed) using the upload attachment tab. :)

Here is a fighting demo you might find helpful.
http://game-editor.com/forum/viewtopic.php?f=6&t=8223&p=57232&hilit=fighting+demo#p57232

I might be able to help with backgrounds at some point, but I have a lot of stuff in my queue right now. Good luck for now! :D
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest