Help with some issues for fighting game
Author |
Message |
berrberr

|
Posted: Fri Nov 03, 2006 9:14 pm Post subject: Help with some issues for fighting game |
|
|
Hey Im currently attempting to create a fighting game in turing, something like streetfighter. I have a few issues with my current program however (attached at bottom) The first one being I want to display the standing still animation (sRight and sLeft) only when no keys are being pressed. The way I have it set up now is it draws then clears the standing still animation behind the movement animation and as you can tell it really slows down my program. The second issue is if you jump and hold down a right or left arrow key then the character goes upwards and sideways and seems to be floating kinda. During a jump sequence I dont want to cut out left and right movement completley, but I want it to be able to move left and right in very small increments in the air while not modifying the x and y velocittys. Thanks for any help you can offer
Description: |
|
 Download |
Filename: |
wolverine.zip |
Filesize: |
69.17 KB |
Downloaded: |
85 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
xHoly-Divinity
|
Posted: Sat Nov 04, 2006 12:58 pm Post subject: (No subject) |
|
|
Well, just to inform u, u can't use .gif pic extensions. They must be in .bmp or jpeg/jpg
|
|
|
|
|
 |
neufelni
|
Posted: Sat Nov 04, 2006 1:45 pm Post subject: (No subject) |
|
|
He can if he has Turing 4.1
|
|
|
|
|
 |
berrberr

|
|
|
|
 |
DemonZ
|
Posted: Sat Nov 04, 2006 3:20 pm Post subject: (No subject) |
|
|
First of all I would like to congratulate you on making one of the most greatest looking fighting games, even though it isnt done, now lets look into some of the things u can do to make the game a bit better and smaller.
Issue 1: the hundreds of pictures
instead of having thousands of these pictures for the motion, get the original gif file of these wolverine pictures and use sprites commands to move it, Sprite.Animate is a way of animating a gif file with no problem, but u have to have the newest version of turing installed, now about your jumping issue, it seems that when you jump with your character and you move with either left or right to turn while jumping, it appears as if it is checking the if statement that says if the control is left or right then it will walk, but if you are jumping and you press the left or right, it will execute that if statement, making him walk in mid air. To fix this problem you should make yourself an if statement that checks when the wolverine is jumping , and if he is then when you move with the left or right, it will just make the character turn accordingly to where you want it to like so.
To do this here is some Pseudo that will help you:
PSEUDO
code: |
var jump : boolean % This will be used to see if the character is jumping
if control (up) then
jump := true
% make character jump
end if
% if character is jumping, then move accordingly
if jump true then
if control (left) then
% make character turn when jumping
elsif control (right) then
% make character turn when jumping
end if
% If the character is not jumping then move normally
elsif jump false then
if control (left) then
% make character move normal
elsif control (right) then
% make character move normal
end if
end if
if control (left) then
% move |
|
|
|
|
|
 |
DemonZ
|
Posted: Sat Nov 04, 2006 3:31 pm Post subject: (No subject) |
|
|
First of all Id like to congratulate you on making such a nice and entertaining looking game, even though it isnt done.
Now lets first look at all those pictures.
If you want to use the gif files of those pics then you will need to know a little about sprites, Sprite.Animate can animate gif files no problem, but you need to have the newest version of turing installed
Now about your jumping...
It seems that you have confusion with the if statement that when you move with left or right then he will move normal, but you dont have anything checking whether or not he is jumping, so he moves normally even when you are jumping, making him walk in mid air. What you need to do is make a variable that is boolean that will check whether he is jumping or not.
Here is some PSEUDO-CODE to help you out
code: |
var jump : boolean
% this will check if he is jumping
if control (up) then
jump := true
end if
% These are the new movements when he is jumping
if jump = true then
% make character jump
if control (left) then
% make character move according to the jump
elsif control (right) then
% make character move according to the jump
end if
end if
% These are the regular movements when he is not jumping
if jump = false then
if control (left) then
% Move character normally
elsif control (right) then
% Move character normally
end if
end if
|
This way, it will actually check if the he is jumping, and will assign the movements according to whether jump is true or false
Hope this helps, if u dont understand than just ask
|
|
|
|
|
 |
DemonZ
|
Posted: Sat Nov 04, 2006 3:32 pm Post subject: (No subject) |
|
|
whoops sorry about the double post, never mind the first one and concentrate on the second post I have.
|
|
|
|
|
 |
berrberr

|
Posted: Sat Nov 04, 2006 3:47 pm Post subject: (No subject) |
|
|
Hey thanks for the help. I must not have been thinking while I was writing this . I got it working now, basically I jsut added parameters that made it impossible to use the arrow keys if a jump was happening. Not perfect, but it will do for now.
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
DemonZ
|
Posted: Sat Nov 04, 2006 3:48 pm Post subject: (No subject) |
|
|
No Problem what so ever, if u need help than we are always here to help
|
|
|
|
|
 |
xHoly-Divinity
|
Posted: Sat Nov 04, 2006 5:14 pm Post subject: (No subject) |
|
|
Looks pretty good, can't wait till u finish it. There are a few issues though....... if u make some your Input.KeyDown elsif statements as opposed to if, it'll prevent from doing left and right at the same time (in which he walks in one place), might also make it easier when ur jumping. When you jump and move left/right, he goes at a crazy fast speed. Also do if x < 10 for left and if x > maxx - 10 (this is so he can't walk off the screen). Nice start
|
|
|
|
|
 |
|
|