Forum

Building mod downloader/installer/menu

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

Moderator: InsideQC Admins

Building mod downloader/installer/menu

Postby Baker » Sat Sep 25, 2010 4:14 am

I'm going to draft up quickly a blue print for writing a mod installer for the Quake engine here and post the code as I implement it.

I have this all written in my head and in notes, but I won't have the kind of free time to code it until Monday or Tuesday.

Features:

1. Basic GUI menu system with a basic graphical interface. To keep this simple, we will use hotspots and just track the mouse release event and feed it to the menu system.

2. We will use R00k's HTTP Download which was derived from Warsow. Ironically, the code is going to resemble FitzQuake's SCR_ModalDialog in many respects. Unlike R00k's server implementation, to keep this simple we will have mod downloading have exclusive control of Quake while it is occurring, with a cancel button.

3. We need to draw the menu and allocate the textures because I think it is important to keep interfaces graphical. So we will be using external media (similar to JoeQuake-like engines that reserve a few texture slots for, say, QMB water caustic textures and such).

Since I want to keep this initial version simple:

1. No scrollbars in the GUI. It isn't that scrollbars are hard, they aren't. I always screw up and write them 1 pixel off somewhere in 3 different places and spend the next 24 hours combing through to figure out where I foobared it.

An additional reason, the simple implementation in my head clearly has the currently selected mod visible on-screen. With a scrollbar, the selected mod might be moved off the visible portion of the screen.

2. Let's keep it to a finite set to mods. I'm going to draw the arbitrary line at 30. We will need a simple "database" to tell the engine certain characteristics about the mod. Like gamedir name, startup parameters.

Now since we will need to store that, we might as well make it fun by keeping track of the number of times it has been played. I think would also be cool to keep track of completed mods ... but that can't really be achieved correctly in engine code unless you want to track when a changelevel is called from whatever the final map of a mod is.

This will require an existing implementation of gamedir switching in an engine.

Finally, we'll need a way to unzip the downloaded mod archive and install it. I'm going to opt for using the method JoeQuake uses to play Dzip demos ... which I have modularized into some system code (which happens to be Windows only, which I hate, but reality is that most users are using Windows by far). This is the sole operating system specific Achillies heel in this and I wouldn't mind any good suggestions that don't require a complete memory system rewrite. (Does EZQuake's zip support work on compressed .zip files or just uncompressed ones? I'll have to check).
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

Postby gnounc » Sat Sep 25, 2010 4:40 am

Waiting with anticipation...this will be a very welcome feature.
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Postby dreadlorde » Sat Sep 25, 2010 12:24 pm

What's wrong with Quake Injector for downloading and installing? Also, have you looked at how DirectQ handles changing gamedir? I've been playing with DirectQ since I've got my new laptop and I really like it.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Postby Baker » Sat Sep 25, 2010 3:22 pm

dreadlorde wrote:What's wrong with Quake Injector for downloading and installing?


What's that say about the Quake engines out there?

If engines need a launcher to provide a quality user experience, there must be something wrong with the engines.

Anyway, the advantages of an engine based launcher?

I could list 4 or 5, but the only one that matters to me is the graphical presentation; with OpenGL you can make the presentation nice looking and inside an engine you can use with sound effects.
Last edited by Baker on Sat Sep 25, 2010 3:29 pm, edited 1 time in total.
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

Postby leileilol » Sat Sep 25, 2010 3:27 pm

Baker wrote:If engines need a launcher to provide a quality user experience, there must be something wrong with the engines.


No one said engines should have mandatory front-ends.


NOTE: Half-Life did have this same feature. Mods were determined by liblist.gam files, and in the earlier WON days there was a system to download and install mods.
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Ranger366 » Sat Sep 25, 2010 3:45 pm

leileilol wrote:
Baker wrote:If engines need a launcher to provide a quality user experience, there must be something wrong with the engines.


No one said engines should have mandatory front-ends.


NOTE: Half-Life did have this same feature. Mods were determined by liblist.gam files, and in the earlier WON days there was a system to download and install mods.


I remember that when my brother downloaded Team Fortress Classic over it after one patch. I already got one FrontEnd for my Engine to work using HWND, but it sucked in someway, i wanna have a Quake 3 like Menu more (haha, try that in VB6 without BitBlt and DXSDK, in Quake its better thought)

anyways, an engine with this download feature is very special.
User avatar
Ranger366
 
Posts: 203
Joined: Thu Mar 18, 2010 5:51 pm

Postby Baker » Sat Sep 25, 2010 3:46 pm

@leileilol

I'm not saying an engine *has* to have a mod installer to be a good engine.

My motivation is more than I am disappointed how many players have not played Zerstorer or Hellsmash or custom maps.

I'd like to build in an achievement system eventually also.

(All of this stuff will be clearly #ifdef'd so such a build is entirely optional. Like many others, I don't really believe extraneous things should be mandatory. I kind of like the DarkPlaces philosophy of a standalone game-neutral engine.)

All this being said, all the modern Quake engines have gamedir switching so it might as well be exposed to the user.
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: Building mod downloader/installer/menu

Postby leileilol » Sat Sep 25, 2010 3:50 pm

Baker wrote:2. Let's keep it to a finite set to mods. I'm going to draw the arbitrary line at 30.


This is the top 30 i've determined, I tried to leave my personal slant out of it so the majority of this list isn't really my favorites.


Quakeworld
Darkplaces

1. Pain Keep
2. Nehahra
3. Zerstorer
4. Thunderwalker CTF
5. Prydon Gate
6. Quoth
7. Team Fortress (Vanilla 2.8 client)
8. FrikBot X (with a crapload of waypoints)
9. DPMod
10. Threewave CTF
11. Soul of Evil
12. Conquest
13. The Ascension of Vigil
14. Target Quake
15. GenClasses
16. Rocket Arena
17. Beyond Belief
18. Insomnia
19. PerQuake
20. Quake Rally
21. Future vs. Fantasy
22. Fantasy Quake: Rise of the Phoenix
23. Prodigy: Special Edition
24. Navy Seals 3.01
25. Slide
26. X-MEN: Ravages of Apocalypse
27. Killer Quake Pack v2.20z
28. Bloodmage
29. After The Fall
30. RuneQuake (mandatory for your group of pals otherwise there will be blood)
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby r00k » Sat Sep 25, 2010 4:16 pm

So, the idea is that, you connect to a new server, but wait this server is running MODx. So your engine creates a new folder called /quake/modx, then downloads all media pertaining to that mod from the web (or maybe the server itself), and adds the name MODx to the MODS menu structure. All configurations for that mod are written to /modx gamedir so bindings dont get overwritten between mods.
On the other hand, you see on a website that there is a new mod and install it externally, into /quake/newmod. Now loading up the engine it checks each subfolder under /Quake for a progs.dat or maybe even a .pak file (incase it's just a media modification), and then updates the MODS menu option.

Just rambling options...

I'm all for simplicity, but I think when things become to easily handed to people (this could be taken to global over generalization etc..), it becomes less meaningful. I believe there is a responsibility to the end user to some degree to learn some part of how-to with the game, not only to learn something new, but to appreciate things in general. I'm old school, where you had a computer because you liked to figure out how to make things work. Now most just want to double-click and play. I get frustrated when no one wants to play CTF because they dont know how to install the paks, let alone how to bind the hook! :P
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: Building mod downloader/installer/menu

Postby Baker » Sat Sep 25, 2010 6:24 pm

leileilol wrote:
Baker wrote:2. Let's keep it to a finite set to mods. I'm going to draw the arbitrary line at 30.


This is the top 30 i've determined, I tried to leave my personal slant out of it so the majority of this list isn't really my favorites.


Quakeworld
Darkplaces

1. Pain Keep
2. Nehahra
3. Zerstorer
4. Thunderwalker CTF
5. Prydon Gate
.
.
.


Thanks for your list. Your mod lists always include things no one thinks of, is forgotten, stuff others more narrow interest hasn't tried etc.

r00k wrote:So, the idea is that, you connect to a new server, but wait this server is running MODx. So your engine creates a new folder called /quake/modx, then downloads all media pertaining to that mod from the web (or maybe the server itself), and adds the name MODx to the MODS menu structure.


Actually, I am exclusively thinking of single player usage.
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

Postby Error » Sat Sep 25, 2010 7:54 pm

leileilol left out Air Quake... amazingly fun online.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Postby gnounc » Sun Sep 26, 2010 3:57 am

The question was raised "whats wrong with Quake Injector".

Nothing's wrong with quake injector, except quake injector is for maps not mods. It has an exhaustive list of maps, but no mods except the ones that can be considered far reaching dependancies.

However if a mod list is made accessible to Engine X and others, then its more likely Quake Injector would support mods as well in the future. Especially since Quake Injector is open source : ), although spirit has said he has no interest in doing so himself.
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Postby Baker » Sun Sep 26, 2010 8:45 pm

The prototype is nearly complete and it is almost embarrassing how easy this is to make with all the other pieces mentioned above in place.

This has been needed for ages and makes life so simple. It is nice just to pull up a menu, pick a mod and start playing.

No doubt most of the remaining time will be spent not on actual coding but more on the presentation so it looks nice and shiny.
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

Postby mh » Sun Sep 26, 2010 10:10 pm

dreadlorde wrote:What's wrong with Quake Injector for downloading and installing? Also, have you looked at how DirectQ handles changing gamedir? I've been playing with DirectQ since I've got my new laptop and I really like it.

There are a few things wrong with how DirectQ handles this, most specifically the reliance on cvars for handling "mission pack" type mods (totally unnecessary in retrospect), the lack of autocomplete for multiple mods in the console (you can still specify multiple mods though, but you need to type the full names for any after the first), and the inability to select more than 1 (or 2 including a "mission pack") mod from the menu (again, this works from the console by just giving all the mod names in the desired order separated by spaces). But overall I think the separation of mods into "mission packs" and other mods is fundamentally sound.

For "mission packs" I deliberately restricted it to Hipnotic, Rogue, Nehahra and Quoth as these are either used to add to ID1 content or as a basis for other mods to build on. I can see RMQ being added to that list.

The Quake Injector is a neat piece of work for sure, but I think it represents step 1 along the route to the most desirable place to be, which is integration of Quake Injector-like functionality into the engine itself. As things stand now, you still need to exit Quake (or Alt-Tab away), launch the Injector, download to the correct location (which may be problematic if you have more than 1 Quake installation on your PC) and there remains margin for user error in the case of new players who may not be familiar with directory structures and the like. True, the Injector handles a lot for you but you still need to know some stuff yourself.

The dependency on Java is also another potential limitation, although in fairness it's difficult to see how it could have been done otherwise. But it will be another barrier to entry for new players who may not have Java installed; not that it's difficult to install Java, but it only takes one barrier to kill accessibility.

The Injeector approach will always suit some people better and that's cool - it's a big world and there's room for many different kinds of person in it - but I think the objective should be to remove all barriers to entry for newer players. So the desirable objective is to enable them to browse available mods directly from the engine itself, and let the engine handle the task of downloading them to the correct location (which it already knows), resolving dependencies and automatically switching to the mod and launching the start map when done. (Some of these may require additional data that's not currently on Quaddicted.)

Of course it would be optional and the more hands-on approach should be retained for those who prefer it, but if Baker's thinking what I think he's thinking (and I think he is) then this is going to be something of worthwhile and genuine benefit. :D
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby dreadlorde » Sun Sep 26, 2010 11:57 pm

mh wrote:There are a few things wrong with how DirectQ handles this, most specifically the reliance on cvars for handling "mission pack" type mods (totally unnecessary in retrospect), the lack of autocomplete for multiple mods in the console (you can still specify multiple mods though, but you need to type the full names for any after the first), and the inability to select more than 1 (or 2 including a "mission pack") mod from the menu (again, this works from the console by just giving all the mod names in the desired order separated by spaces). But overall I think the separation of mods into "mission packs" and other mods is fundamentally sound.
What would be the point of specifying multiple gamedirs though? I thought quake didn't 'stack' like that, or does it? What progs.dat would be used, the one in the last gamedir? I'm not sure I completely understand what you're saying. :P
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest