Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,395 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Fighting Game #244008
01/02/09 05:32
01/02/09 05:32
Joined: Jan 2009
Posts: 6
C
Comatose Offline OP
Newbie
Comatose  Offline OP
Newbie
C

Joined: Jan 2009
Posts: 6
Hi all,

I'm completely new to this program but not to programming itself. A few years ago I was programming a little in C++ but now I stick mostly to php for my website.

I am going through the workshop tutorials (I have not gotten very far yet since I have only just started) but I was wondering what the best route would be to make a fighting game similar to the original Mortal Kombat game. Essentially what I'm looking for is a 2D game with 3D characters (if that makes sense).

Any help would be greatly appreciated. Thank you.

Re: Fighting Game [Re: Comatose] #244012
01/02/09 07:03
01/02/09 07:03
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
make it so your characters only walk on two axis' and keep track of what animation each player is doing, if an animation is an attack and the others isnt a block, then play a hit animation and take away health.

Re: Fighting Game [Re: lostclimate] #244029
01/02/09 08:17
01/02/09 08:17
Joined: Jan 2009
Posts: 6
C
Comatose Offline OP
Newbie
Comatose  Offline OP
Newbie
C

Joined: Jan 2009
Posts: 6
Thanks.

How do I make the characters move with each key press rather than just moving them after hitting it once? I don't seem to be able to find that in the workshop.

And how would I load different animations for each keypress (move, attack, jump, et cetera)? If something similar is in the workshops or a tutorial, could you point me to it?

Thanks again and forgive me for being so n00bish. :P

Re: Fighting Game [Re: Comatose] #244066
01/02/09 13:17
01/02/09 13:17
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
its fine, just look up the commands c_move, and the variables for key_1, key_2, etc.....

Re: Fighting Game [Re: lostclimate] #244125
01/02/09 19:58
01/02/09 19:58
Joined: Jan 2009
Posts: 6
C
Comatose Offline OP
Newbie
Comatose  Offline OP
Newbie
C

Joined: Jan 2009
Posts: 6
Thanks, I found the c_move command in the workshop but it seems to only deal with 3D environments. Since I just want 2D movement what do I do?

I can get the object I want to move onto the level but when I do anything with the c_move commands it doesn't work right at all. I tried just copying the code from the workshop example (the ball game) and replacing the ball with what I wanted to move and it worked a little, however it just caused my object to go off the level and get stuck.

When I tried to tweak it to not move like a ball (because the image I was moving was rotating like the ball in the example) it didn't move at all.

I just want the bloody thing to move left, right and jump when I press certain keys, is it really this difficult or am I missing something very simple?

EDIT: Ok, I figured this out. Now I want to add a sound when I press a key combination. For example, I want to press the buttons for down, back, and let's say 'a' and I want it to play a sound. I found threads and looked in the templates to find how to do this but it's not working for me. I even set it so that it would only take one button press just to see if I could get it to work in an incredibly simple way.

This is how I have it declared:
SOUND wakeupfever = "wakeupfever.wav"; <--everything I've seen has the file declared like this: SOUND wakeupfever = <wakeupfever.wav>; but the program won't compile if i do this.

I have the function called like this:
function wakeupfever();{

if((key_cud == 1)) {
wait(60);
ent_playsound(my,wakeupfever,200);
}
}
Keep in mind that I got this information from the template and looking on the forum and everything was for a 3D game, is it different for 2D?

Thanks for all the help.

Last edited by Comatose; 01/02/09 22:09.
Re: Fighting Game [Re: Comatose] #244144
01/02/09 22:40
01/02/09 22:40
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
What if you use a different name for the function and the sound?
And why do you use a wait(60) instead of a simple wait(1)?

Re: Fighting Game [Re: Pappenheimer] #244149
01/02/09 22:48
01/02/09 22:48
Joined: Jan 2009
Posts: 6
C
Comatose Offline OP
Newbie
Comatose  Offline OP
Newbie
C

Joined: Jan 2009
Posts: 6
the wait(60) was there when i copied, i think.

changing the names didn't seem to make a difference. I have to be missing something simple.

Re: Fighting Game [Re: Comatose] #244154
01/02/09 23:15
01/02/09 23:15

F
Fear411
Unregistered
Fear411
Unregistered
F



the name of the sound and the name of the function have not to be the same

SOUND wakeupfever_snd = "wakeupfever.wav";

function wakeupfever();
{
if((key_cud == 1)) {
wait(60);
ent_playsound(my,wakeupfever_snd,200);
}
}

Re: Fighting Game [Re: ] #244157
01/02/09 23:28
01/02/09 23:28
Joined: Jan 2009
Posts: 6
C
Comatose Offline OP
Newbie
Comatose  Offline OP
Newbie
C

Joined: Jan 2009
Posts: 6
Still not working. Here is all the code I've put together so far:

#include <acknex.h>
#include <default.c>


BMAP* backdrop_jpg = "stage1.jpg";
BMAP* player_pcx = "kiva3.pcx";
SOUND wakeupfever_snd = "wakeupfever.wav";

PANEL* backdrop =
{
pos_x = 0;
pos_y = 0;
layer = 0;
bmap = backdrop_jpg;
flags = VISIBLE;
}

PANEL* player =
{
pos_x = 104;
pos_y = 224;
layer = 1;
bmap = player_pcx;
flags = OVERLAY | VISIBLE;
}


function main()
{
video_mode = 6;

while(1)
{
if(key_cul) { player.pos_x = player.pos_x-1; }
if(key_cur) { player.pos_x = player.pos_x+1; }

wait(-0.01);
}

}

function finisher();{

if((key_cud == 1)) {
wait(1);
ent_playsound(my,wakeupfever_snd,200);
}
}

Maybe the error is somewhere other than the sound sections.

Re: Fighting Game [Re: Comatose] #244179
01/03/09 03:08
01/03/09 03:08
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
In your code the function finisher is never been called.
Place 'finisher();' in the main, for instance;

Page 1 of 2 1 2

Moderated by  checkbutton, mk_1 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1