Author Topic: using mouse like cursor and diablo style interface in Qauke 2.  (Read 3750 times)

Offline hensoup

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
using mouse like cursor and diablo style interface in Qauke 2.
« on: January 04, 2011, 01:18:30 PM »
okay I finally got this to compile and working around with the code but I cannot seem to find any tutorial or figure out the code how to get the mouse cursor to work in quake 2 like a  MMO or even Diablo would.

Two questions about this:

could a simple mod to the game dll would work or do I need to compile the EXE and or C game project folder.  I assume I would have to write my own mouse command. but I'm worried rewriting it might screw things up.

if I have to mess with the client code should I have to make a copy of the UI_Cursor or UI to make it work like how I wanted too.  Rarely coded in quake 2 but I can see how this works.

and question 2 how would a Program a "ray" function that tells where my mouse is pointing.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #1 on: January 04, 2011, 03:31:16 PM »
I've never done this, but it is definitely a client side change.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline hensoup

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #2 on: January 04, 2011, 03:43:40 PM »
Interesting I think I'll have to create a second UI to do this. as me and ace are using EGL.  I've done game scripting and game programming but never coded with modifying with a  engine.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #3 on: January 04, 2011, 06:49:24 PM »
Interesting I think I'll have to create a second UI to do this. as me and ace are using EGL.  I've done game scripting and game programming but never coded with modifying with a  engine.

Talk to paril, especially if you are using EGL. He has an updated EGL client that has a whole UI system.

Best place to find him is here:
http://leray.proboards.com/index.cgi
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline hensoup

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #4 on: January 05, 2011, 02:37:57 AM »
thank you! :)

I think I got this figure out.  now the next step is the point to click. which should be last easier.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Ace

  • Full Member
  • ***
  • Posts: 143
  • Band, the MMORPGDM
    • View Profile
    • ACE Intergraphs
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #5 on: January 06, 2011, 08:18:13 AM »
bah we have more problems with the code pointing to correct dll and libs than anything....  its teadious, we both have been programming hard on this, but I think he is doing a better job than I can, I cna modify numbers, and values, and understand and read some of the code becuase I am familar with Q2.... but as for start from scratch, I would be totally lost.   Hopefully we can pull this off, so far so good though...  But lately we been doing the JOB shuffle, modeling one moment, scripting/coding the next, and interface/texture art the next, then mapping..... right now we decided to stick strckly on the models, coding, and game controls/interface for now...
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
~~Ace~~

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #6 on: January 06, 2011, 04:47:23 PM »
But lately we been doing the JOB shuffle, modeling one moment, scripting/coding the next, and interface/texture art the next, then mapping..... right now we decided to stick strckly on the models, coding, and game controls/interface for now...

I think that that is the most fun time

When it gets down to a well oiled machine is when it becomes tedious and boring, IMO
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline Ace

  • Full Member
  • ***
  • Posts: 143
  • Band, the MMORPGDM
    • View Profile
    • ACE Intergraphs
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #7 on: January 06, 2011, 10:11:39 PM »
I posted in the wrong spot sorry.... but yeah, its fun but tedious when stuf don't work right....  :dohdohdoh:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
~~Ace~~

Offline hensoup

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #8 on: January 10, 2011, 06:13:07 AM »
I think I got it all I need to do now is read offsets from player's mouse  :headbang:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Ace

  • Full Member
  • ***
  • Posts: 143
  • Band, the MMORPGDM
    • View Profile
    • ACE Intergraphs
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #9 on: January 19, 2011, 04:55:08 AM »
If you want to call it that, guys I need some advice, and good advice this time..... how would you treat the targeted location or pos as a movement or attack point in Q2's Engine?  In EGL I am coding this, but the case wont work properly, becuase I have not identified them or included them into the code just yet.   So what I am asking is how would I improve the code to allow mouse click to move and attack and pick up stuff rather than arrow key movements?

Here is the code tidbit:

Quote
void CG_MoveMouse2 (float cx, float cy)
{
cursorX += cx * ui_sensitivity->floatVal;
cursorY += cy * ui_sensitivity->floatVal;
cursorX = clamp (cursorX, 2, cg.refConfig.vidWidth - 2);
cursorY = clamp (cursorY, 2, cg.refConfig.vidHeight - 2);
}

Now thats for the mouse movements, I tried to add a case and stuff, but I do not know what I am doing....    I understand this about coding, you must declare or identifiy, the variable, intager, or what ever first, then if using a case, you would have to have everything identified first, I can not compile the dll becuase when I tried to do exactly that, it still insists I did not identified it...

One clue to me is this tidbit code here for flashlight:

Quote
//Flashlight code may prove usefull for mouse movement Ace, Look here for awnsers to mouse problem
   case TE_FLASHLIGHT:
      cgi.MSG_ReadPos (pos);
      ent = cgi.MSG_ReadShort ();
      CG_Flashlight (ent, pos);
      break;

However above it I did not know the declarations that was being used untill I checked....  at the following identifiers

Quote
void CG_ParseTempEnt (void)
{
   int      type, cnt, color, r, ent, magnitude;
   vec3_t   pos, pos2, dir;

   type = cgi.MSG_ReadByte ();

   switch (type) {

now those tell it stuff about the pos, and axises, and what not I know, I am not that dumb, but I want to do the same for the mouse, I tried to impliment the same thing, and it still gave errors in compile becuase I was trying to use it in a fashion different than what it was supposed to, I even tried to include cl_input.c at the begging of the code with no luck!

the dll wont compile, I scrapped my code, and willing to start over with your guys help and advice....

Basically I was trying to use K_MOUSE1 in a case, to identify if the mouse had been clicked or not....

So please help me guys! <3
« Last Edit: January 19, 2011, 05:15:28 AM by Ace »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
~~Ace~~

Offline Th0m@s29

  • ShortBus
  • Sr. Member
  • *
  • Posts: 470
  • Stay Fit, Eat Healthy Die Anyways, Smoke Some Bud
    • View Profile
  • Rated:
Re: using mouse like cursor and diablo style interface in Qauke 2.
« Reply #10 on: January 20, 2011, 09:05:36 AM »
Sounds very weird IMO at least.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
If I don't smoke some bud I'll shrivel up and die like a beautiful flower without water.

 

El Box de Shoutamente

Last 10 Shouts:

 

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.
 

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM
 

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 26, 2024, 01:17:56 PM

Login with username, password and session length