Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
2.5D Game Creation #117319
03/14/07 08:24
03/14/07 08:24
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
I was just beginning another game and I have NO idea where to start. I am trying to make a 2.5D game like Small Arms (Video link below). I sorta kinda got a camera running, but I have no idea how to make an aiming function like small arms. When the player is not aiming with the right thumbstick, the character looks and aims in front of them. Then, once the right thumbstick has been pushed in a direction, the character looks in the same direction. Again, I have no idea how this would work, and I am using Bone animation for my characters. Any advice???

Small Arms Demo

Re: 2.5D Game Creation [Re: exile] #117320
03/14/07 12:37
03/14/07 12:37
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
You want some kind of 360° aiming using a gamepad?

Re: 2.5D Game Creation [Re: Xarthor] #117321
03/14/07 13:23
03/14/07 13:23
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
I know it is asking for much, but yeah. I am designing this game for console gaming, however, I will make a PC version later on. I dont need shooting or anything, just the aiming. I am trying to use bones to minimize the amount of animation for the characters. Perhaps a little but of movement as well, (just standard LEFT and RIGHT walking for now). I hope to finish the rest of my project by myself, but I need help to get me started off first.

Re: 2.5D Game Creation [Re: exile] #117322
03/14/07 13:27
03/14/07 13:27
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
console gaming?

Do you mean, for example, using a gamepad with the computer, because 3dgs doesn't port to console's...


xXxGuitar511
- Programmer
Re: 2.5D Game Creation [Re: xXxGuitar511] #117323
03/14/07 13:44
03/14/07 13:44
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Well one possibility I once thought about:
For the right analog stick you have:
joy_raw.z as x axis and joy_rot.x as y axis
(Hope I didn't mix them up)

So if you want to aim right up you have to push the stick fully right and fully up.
The value range of that stick is -255 to 255 for both axis
Now you could use them to determine the angle by the value of thoses vars:
var angle;
angle = atan(joy_rot.x / joy_raw.z);

Re: 2.5D Game Creation [Re: exile] #117324
03/14/07 14:53
03/14/07 14:53
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Quote:

Then, once the right thumbstick has been pushed in a direction, the character looks in the same direction.




That sounds like camera relative character controls. That is implemented below:

http://www.geocities.com/hainesrs/special_blending.zip

The camera probably isn't what you want, but you should be able to port the controls code to yours. There is also gamepad specific code in there, too.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: 2.5D Game Creation [Re: Orange Brat] #117325
03/14/07 22:29
03/14/07 22:29
Joined: Apr 2005
Posts: 795
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 795
U.S.A. Michigan
xXxGuitar511, Yeah, I know it sounds a bit unorthodox but I eventually plan to rewrite the whole game in C_lite so I can rebuild it using XNA. I know nothing about C_lite, so I am gonna stick with regular ol C++ until I can learn more about it. I am trying to get this game on Xbox Live Arcade, which is why I am building the game around the Xbox 360 controller.

Thunder, That is a great idea thunder, However how do I get that to work with bones animation? I need only the arms, head, and torso to move during aiming. The arms have a range of 1° to 269° facing right, and 359° to 271° using a Y axis. The head has the same range, and the torso has the same range using an X axis.

OrangeBrat, You are absolutely right! The movement is camera related, however I need only specific bones to look in the direction.

Re: 2.5D Game Creation [Re: exile] #117326
03/15/07 05:28
03/15/07 05:28
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I have a small snippet of code that makes a character's head pan and tilt toward a "look at" object when it comes near it. The "You" is the object (pointer name objPtr). The head bone will turn and limits are built in (the clamp lines) to keep it from turning all the way around Exorcist style. This code is at the beginning of my player animation file:

Code:

you = objPtr;
ent_animate(me,null,0,0); //Reset Bones
vec_set(my.skill63,you.x);//Stores the position to look at
vec_sub(my.skill63,my.x); //Not its relative
vec_to_angle(temp,my.skill63); //Temp stores the angles needed
vec_sub(temp,me.pan);
temp.pan = ang(temp.pan);
temp.tilt=ang(temp.tilt); //This works fine for me...
//me.skill15 -= (me.skill15-clamp(temp.pan,-70,70)*(abs(temp.pan)<105)*(abs(temp.pan)>30))*0.3*time_step;
//me.skill16 -= (me.skill16-clamp(temp.tilt,-25,25)*(abs(temp.tilt)<55)*(abs(temp.tilt)>35))*0.3*time_step;
my.skill15 -= (my.skill15-clamp(temp.pan,-70,70))*time_step;
my.skill16 -= (my.skill16-clamp(temp.tilt,-25,25))*time_step;
ent_bonerotate(me,"Bip01_Head",vector(me.skill15,me.skill16,0));



I don't know if this can help you get started or not. The two commented out lines are some kind of alternate version of the two lines after it. I don't recall what the difference was.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: 2.5D Game Creation [Re: Orange Brat] #117327
03/15/07 16:12
03/15/07 16:12
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Well, I've checked out XNA, but never got too far into it. However, don't forget that all of the nice functions 3DGS has will NOT be in XNA. Such as loading a level, animating, etc.

If you plan on "porting" it to XNA, I recommend that you start with XNA as well...


xXxGuitar511
- Programmer
Re: 2.5D Game Creation [Re: xXxGuitar511] #117328
03/15/07 18:54
03/15/07 18:54
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands
Well, as far as i know the XNA framework was only implemented in C# (could be wrong though) and it can only be implemented in managed languages (but here again there is also a managed C++ version)


BASIC programmers never die, they GOSUB and don't RETURN.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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