Xonotic Forums
Paid work to help demo an integration into Xonotic - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12)
+--- Thread: Paid work to help demo an integration into Xonotic (/showthread.php?tid=8237)



Paid work to help demo an integration into Xonotic - stuart - 01-30-2020

**HELP NEEDED, WILLING TO PAY**
I'm working with a company where we would like to demonstrate our high score system working with an FPS and Xonotic looks a perfect match.  This is an optional add-on feature we want to make to help demonstrate our tools at events/investors and possibly see if there might be some interest in using the mod in the community in future too.
Rather than trying to do it in-house I'd rather find an expert Xonotic developer who loves doing this stuff already and who'd [Image: heart.png] to get paid at the same time.

What's involved is the following
  • Focus on a deathmatch game    
  • Making some API calls to our server (simple JSON POST requests)
  • Changing some UI components and textures at the start of the game to show it's a modded version.
  • Ideally display a users' name above their head if we can.
  • Some ingame UI to show live highscore table pop up.
  • We have a helper log-in system that can be done via a web interface if it helps but expect native is going to be slicker and easier to do.  So integrate directly into the app using QuakeC/script.   Big Grin
  • Modify a server to submit the scores of players.
  • (Basically calls user/login/join game/submit score api calls and can give docs on this)
  • When the game completes we need to show our high score table for that game

E.g.
  • Integrate our log in system
  • Modify game textures to design (you will be provided the modified textures)
  • Modify some UI elements to show case our leaderboard requirements
  • Create a UI element to show our highscore at the end
  • Ability for the user to navigate to our website via a button at the end of the game.
  • Build release linux/windows versions of the game.



If this is something you think you could help with please send me a PM.  
As a guide we are looking to spend around ~$2,500 on the integration but can be flexible depending on the scope of the work.  If the work is incredible and there is community interest we can spend longer on it and do a more comprehensive integration for other game modes.

I'd like to believe it's pretty straight forward stuff if you know how to mod Xonotic already and a way to get paid for doing what you love anyhow.
  • Generally pretty flexible on how to do the integration but must be done well.
  • The code is intended to be open source after it works and payment to you will happen before we make the code public.
Time frame to complete this is end of March so keen to start as soon as we can.

PM me for the API info and specific details.


RE: Paid work to help demo an integration into Xonotic - Lyberta - 01-30-2020

This would definitely require modding the engine because afaik QuakeC part can't do raw sockets. Which means most devs who only touch QC part are excluded. Also, the engine is raw C (which sucks a lot) so it would require C developer to integrate everything, including JSON.


RE: Paid work to help demo an integration into Xonotic - Freddy - 01-31-2020

It seems like there already is a json parser in QuakeC: https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/json.qc
https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/urllib.qh has a function for PUT, but not for POST.


RE: Paid work to help demo an integration into Xonotic - morosophos - 01-31-2020

(01-31-2020, 08:33 AM)Freddy Wrote: It seems like there already is a json parser in QuakeC: https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/json.qc
https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/urllib.qh has a function for PUT, but not for POST.

Looks like the url_fputs function is just a generic function to send data to the server, like fputs writes data to a file. So you can perform whatever HTTP request you want using it.


RE: Paid work to help demo an integration into Xonotic - stuart - 02-03-2020

(01-31-2020, 12:40 PM)morosophos Wrote:
(01-31-2020, 08:33 AM)Freddy Wrote: It seems like there already is a json parser in QuakeC: https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/json.qc
https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/urllib.qh has a function for PUT, but not for POST.

Looks like the url_fputs function is just a generic function to send data to the server, like fputs writes data to a file. So you can perform whatever HTTP request you want using it.

Thanks for the reply, that sound promising.  Forgive me as I'm not familiar with xonotic source base yet but given we would only need the xonontic server making the requests does this make it any easier?

I was thinking that perhaps libcurl might be suitable?


RE: Paid work to help demo an integration into Xonotic - morosophos - 02-04-2020

(02-03-2020, 05:52 AM)stuart Wrote:
(01-31-2020, 12:40 PM)morosophos Wrote:
(01-31-2020, 08:33 AM)Freddy Wrote: It seems like there already is a json parser in QuakeC: https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/json.qc
https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/urllib.qh has a function for PUT, but not for POST.

Looks like the url_fputs function is just a generic function to send data to the server, like fputs writes data to a file. So you can perform whatever HTTP request you want using it.

Thanks for the reply, that sound promising.  Forgive me as I'm not familiar with xonotic source base yet but given we would only need the xonontic server making the requests does this make it any easier?

I was thinking that perhaps libcurl might be suitable?

the mentioned functions are wrappers around libcurl. Xonotic is written in QuakeC, so you can't use C libraries directly, unless you write a darkplaces primitive to expose that library. That's done for libcurl already and used to submit scores on stats.xonotic.org. So the task you mentioned looks very much doable.


RE: Paid work to help demo an integration into Xonotic - stuart - 02-04-2020

(02-04-2020, 04:57 AM)morosophos Wrote:
(02-03-2020, 05:52 AM)stuart Wrote:
(01-31-2020, 12:40 PM)morosophos Wrote:
(01-31-2020, 08:33 AM)Freddy Wrote: It seems like there already is a json parser in QuakeC: https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/json.qc
https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/urllib.qh has a function for PUT, but not for POST.

Looks like the url_fputs function is just a generic function to send data to the server, like fputs writes data to a file. So you can perform whatever HTTP request you want using it.

Thanks for the reply, that sound promising.  Forgive me as I'm not familiar with xonotic source base yet but given we would only need the xonontic server making the requests does this make it any easier?

I was thinking that perhaps libcurl might be suitable?

the mentioned functions are wrappers around libcurl. Xonotic is written in QuakeC, so you can't use C libraries directly, unless you write a darkplaces primitive to expose that library. That's done for libcurl already and used to submit scores on stats.xonotic.org. So the task you mentioned looks very much doable.
That's fantastic to hear and thank you for taking the time to explain about the darkplaces primitives, I'm keen to learn.  
Also good to hear stats.xonotic.org is already receiving messages in this fashion so the hardest parts may be already done.

Guess it's just finding some people who could help do the UI work to let people log into our system (can we show an HTML page by any chance or would you recommend we do it natively?) and tap into the server part to submit the scores.

Basically they need to know where we can 'log a player in' before playing with a 

1. xonotic client show a 'ask username' panel.  Send this username to our server (via the client libcurl darkplaces component?).  Obtain our playtoken string.
2. xonotic client show the 'ask password/2fa code' panel.  Send this playtoken string+pw to our server to activate the playtoken.
3. xonotic client to set the player's avatar to our avatar image.  (We have a URL to the image returned in the above step).
4. xonotic client to show success or error page on logging in.
5. xonotic client to send this playtoken associated to the player to the xonotic server showing the player has joined.
6. xonotic server send a message to our server of 'game started' when the deathmatch begins.
(users play game)
7. xonotic server send a message of player scores when the round ends.
8. xonotic client show our highscore table results.


I think these are the key steps.  There are bound to be a few extra caveats to consider but I believe this is the jist of it.  

Anyone interested in trying it out?  Happy to pay for steps completed along the way rather than an all or nothing approach.


RE: Paid work to help demo an integration into Xonotic - morosophos - 02-04-2020

(02-04-2020, 05:24 AM)stuart Wrote:
(02-04-2020, 04:57 AM)morosophos Wrote:
(02-03-2020, 05:52 AM)stuart Wrote:
(01-31-2020, 12:40 PM)morosophos Wrote:
(01-31-2020, 08:33 AM)Freddy Wrote: It seems like there already is a json parser in QuakeC: https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/json.qc
https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/qcsrc/lib/urllib.qh has a function for PUT, but not for POST.

Looks like the url_fputs function is just a generic function to send data to the server, like fputs writes data to a file. So you can perform whatever HTTP request you want using it.

Thanks for the reply, that sound promising.  Forgive me as I'm not familiar with xonotic source base yet but given we would only need the xonontic server making the requests does this make it any easier?

I was thinking that perhaps libcurl might be suitable?

the mentioned functions are wrappers around libcurl. Xonotic is written in QuakeC, so you can't use C libraries directly, unless you write a darkplaces primitive to expose that library. That's done for libcurl already and used to submit scores on stats.xonotic.org. So the task you mentioned looks very much doable.
That's fantastic to hear and thank you for taking the time to explain about the darkplaces primitives, I'm keen to learn.  
Also good to hear stats.xonotic.org is already receiving messages in this fashion so the hardest parts may be already done.

Guess it's just finding some people who could help do the UI work to let people log into our system (can we show an HTML page by any chance or would you recommend we do it natively?) and tap into the server part to submit the scores.

Basically they need to know where we can 'log a player in' before playing with a 

1. xonotic client show a 'ask username' panel.  Send this username to our server (via the client libcurl darkplaces component?).  Obtain our playtoken string.
2. xonotic client show the 'ask password/2fa code' panel.  Send this playtoken string+pw to our server to activate the playtoken.
3. xonotic client to set the player's avatar to our avatar image.  (We have a URL to the image returned in the above step).
4. xonotic client to show success or error page on logging in.
5. xonotic client to send this playtoken associated to the player to the xonotic server showing the player has joined.
6. xonotic server send a message to our server of 'game started' when the deathmatch begins.
(users play game)
7. xonotic server send a message of player scores when the round ends.
8. xonotic client show our highscore table results.


I think these are the key steps.  There are bound to be a few extra caveats to consider but I believe this is the jist of it.  

Anyone interested in trying it out?  Happy to pay for steps completed along the way rather than an all or nothing approach.
You can forget about HTML/CSS and other modern UI technologies. I never worked with menu code, so can't tell you how exactly it's done. You can check it here https://gitlab.com/xonotic/xonotic-data.pk3dir/-/tree/master/qcsrc/menu


RE: Paid work to help demo an integration into Xonotic - stuart - 02-04-2020

Thanks, certainly looks do-able.
So just to be clear in my mind, can we make external server http calls from BOTH the client and server by using qc?  
If I search http in the source I guess I will find some examples, will try to get around to it today if I can but ideally would love to hire someone to help as already got loads to do Smile


RE: Paid work to help demo an integration into Xonotic - morosophos - 02-04-2020

(02-04-2020, 06:18 AM)stuart Wrote: Thanks, certainly looks do-able.
So just to be clear in my mind, can we make external server http calls from BOTH the client and server by using qc?  
If I search http in the source I guess I will find some examples, will try to get around to it today if I can but ideally would love to hire someone to help as already got loads to do Smile

I think it's better to keep all HTTP requests on the server, it will be easier to do and more reliable (for example, if all login flow goes through the server it will be easier to reject unauthorized clients to join, makes circumventing authorization almost impossible).

Your post was already forwarded to the xonotic team channel, so all active developers know about it.


RE: Paid work to help demo an integration into Xonotic - stuart - 02-04-2020

Thanks, much appreciated.  Will try to look tonight or tomorrow now.