Author Topic: using mouse like cursor and diablo style interface in Qauke 2.  (Read 3661 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:

 

RyU

September 03, 2024, 05:15:49 PM
And wow Derrick is still playing lol
 

RyU

September 03, 2024, 05:15:15 PM
Just know yesterday is gone and soon tomorrow will be gone too  :)
 

Lejionator

August 08, 2024, 07:28:01 PM
It's tiem to QuakeCon!!!  ;)

https://www.youtube.com/watch?v=ThQd_UJaTys
 

ImperiusDamian

July 26, 2024, 09:34:53 PM
In nomine Quake II et Id Software et Spiritus John Carmack, Amen.
 

QuakeDuke

July 26, 2024, 05:10:30 PM
Hey, shout, summertime blues
Jump up and down in you blue suede shoes
Hey, did you rock and roll? Rock on!!  ...QD
 

Yotematoi

July 24, 2024, 01:31:20 PM
Ayer me mato 5 veces para robarme en la vida real hará lo mismo? [img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&amp;show_text=true&amp;width=500
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&show_text=true&width=500" width="500"
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text
 

-Unh0ly-

July 05, 2024, 05:20:36 AM

Show 50 latest
Welcome, Guest. Please login or register.
September 20, 2024, 06:22:36 AM

Login with username, password and session length