Forum

psp engine stuff

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

psp engine stuff

Postby sniperz227 » Sat Dec 17, 2011 6:56 pm

hey sniperz227 here, i was looking in the engine and was trying to find the function where it deifnes the players speed(im writing a sprint function) and was wondering how would i start off with the psp controls so like if i wanted a function called when i hit a certain button(ex. up arrow to call sprint function).
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: psp engine stuff

Postby Baker » Sat Dec 17, 2011 9:00 pm

sv_maxspeed on server side, cl_forwardspeed and such on the client side.

[The rest of the stuff in your post is QuakeC stuff. Any question like "If I'm in the game and I want X to happen when Y happens" is QuakeC and doesn't have anything to do with the engine.]

sniperz227 wrote:start off with the psp controls so like if i wanted a function called when i hit a certain button(ex. up arrow to call sprint function).


Are you familiar with the bind console command and server impulses?
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: psp engine stuff

Postby sniperz227 » Sat Dec 17, 2011 9:37 pm

im familiar with impulses and i was taught how to bind but i forgot :P
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: psp engine stuff

Postby Baker » Sat Dec 17, 2011 9:48 pm

sniperz227 wrote:im familiar with impulses and i was taught how to bind but i forgot :P


Open config.cfg and look in there. It defines what each key does, even with a PSP. The key binds are stored in config.cfg. When a key is pressed, it does what the bind function indicates (bind k "impulse 13" sends impulse 13 to the server if you press k, where on the server in weapons.qc and/or client.qc take the server impulse and do something with it (see ImpulseCommands in weapons.qc. This stuff is all QuakeC.

You should look at this: http://quakeone.com/navigator/

And especially this:

http://www.quakewiki.net/archives/console/

And mess around with some mods and do some tutorials:

http://www.gamers.org/pub/idgames2/quakec/

And do it on Windows for starters and then try to apply it to the PSP. The PSP is a terrible, terrible beginners platform because typing with the onscreen keyboard is snail pace and it is difficult to browse files, etc. Deciding to use a PSP to try to learn is going to take 10 years to figure out how to do anything meaningful. It is easier to use Quake on Windows and then apply it to the PSP occasionally. I'm just saying ...
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: psp engine stuff

Postby Baker » Sat Dec 17, 2011 10:09 pm

Note:

#ifdef PSP
{"TRIANGLE", K_JOY1},
{"CIRCLE", K_JOY2},
{"CROSS", K_JOY3},
{"SQUARE", K_JOY4},
#else
{"JOY1", K_JOY1},
{"JOY2", K_JOY2},
{"JOY3", K_JOY3},
{"JOY4", K_JOY4},
#endif

#ifdef PSP
{"LTRIGGER", K_AUX1},
{"RTRIGGER", K_AUX2},
#else
{"AUX1", K_AUX1},
{"AUX2", K_AUX2},
#endif

^^^ The key names for the triangle and circle and so forth and ltrigger on the psp are ... well ... ^^ those. "circle", "square", "ltrigger" etc.

So: bind circle "say hello"
So: bind ltrigger +attack

etc ...
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: psp engine stuff

Postby sniperz227 » Sat Dec 17, 2011 11:05 pm

ahh i get it now and how would you bind to keys for an impulse example(square and ltrigger) or double tab up. would it be bind "SQUARE" "LTRIGGER" "impulse10" ? and "UPARROW" "UPARROW" "impulse 11" ?
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: psp engine stuff

Postby Baker » Sat Dec 17, 2011 11:34 pm

sniperz227 wrote:ahh i get it now and how would you bind to keys for an impulse example(square and trigger)


bind square "impulse 13"

double tab up. would it be bind "SQUARE" "LTRIGGER" "impulse10" ? and "UPARROW" "UPARROW" "impulse 11" ?


Quake doesn't have double tap support.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: psp engine stuff

Postby sniperz227 » Sat Dec 17, 2011 11:35 pm

Baker wrote:
sniperz227 wrote:ahh i get it now and how would you bind to keys for an impulse example(square and trigger)


bind square "impulse 13"

double tab up. would it be bind "SQUARE" "LTRIGGER" "impulse10" ? and "UPARROW" "UPARROW" "impulse 11" ?


Quake doesn't have double tap support.


huh im using kurok and nzp did it for psp:P
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: psp engine stuff

Postby Baker » Sun Dec 18, 2011 12:37 am

sniperz227 wrote:huh im using kurok and nzp did it for psp:P


This isn't surprising that NZP added that feature.

But since you now know that configs save into a config.cfg, you should be perfectly able to open your NZP config.cfg and answer the how to bind a double tap mystery.

[But no that is not a feature of the Kurok engine ...]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: psp engine stuff

Postby Jukki » Sun Dec 18, 2011 7:21 am

we jus used impulses and time in qc to see if you have pressed the impulse twice ;)
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Re: psp engine stuff

Postby sniperz227 » Sun Dec 18, 2011 10:11 pm

Jukki wrote:we jus used impulses and time in qc to see if you have pressed the impulse twice ;)


ahh ok smart jukki
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: psp engine stuff

Postby sniperz227 » Wed Dec 28, 2011 12:47 am

Baker wrote:sv_maxspeed on server side, cl_forwardspeed and such on the client side.

[The rest of the stuff in your post is QuakeC stuff. Any question like "If I'm in the game and I want X to happen when Y happens" is QuakeC and doesn't have anything to do with the engine.]

sniperz227 wrote:start off with the psp controls so like if i wanted a function called when i hit a certain button(ex. up arrow to call sprint function).


Are you familiar with the bind console command and server impulses?


hmm i could find sv_maxspeed in the config file but i couldnt find cl_forwardspeed anywhere in the enigne or qc?
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: psp engine stuff

Postby Baker » Wed Dec 28, 2011 1:12 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: psp engine stuff

Postby sniperz227 » Mon Jan 02, 2012 3:29 am

yes i know its there but i need to use the function in qc and it wont work
sniperz227
 
Posts: 112
Joined: Sat Apr 09, 2011 3:19 am

Re: psp engine stuff

Postby Baker » Mon Jan 02, 2012 1:13 pm

"Bob has a problem requiring him to do his first game modding project. He decides he will do his first modding project on a PSP. Now Bob has two problems."

Sincere advise: if you really are having problems grasping modding Quake for your purposes, you couldn't compound your problem worse than by learning on a PSP. You are having "I could solve this myself in 5 minutes on a desktop issues" but instead you are using a platform with no console that requires maybe 3 or 4 minutes to do even the slightest tweak. You'll never make any progress at that rate.

I would suggest splitting your efforts into a learning phase using FitzQuake 0.85 and then applying what you have learned to the PSP after you have figured out how it works.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest