PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

QuakeOn Development

Now we're starting to use mods and extra maps it would be a good idea to make QuakeOn for Pocket PCs.

I can send out the eVB version but it needs a few files to run and cant search pak files for maps (just directories) yet

Can ANYONE make this in C?
Any ideas on how to get the "Helping Head" working for newbies?
And what about searching Pak files for maps?
Hah, that's cool.

We could do one in flash and put it on the site :)

It'd be pocketPC compliant as well :D

Right, so it'll be done in flash... can we run Flash files in the program itself?
I have no idea.

I was simply referring to having that head walk newbies through the install process of PocketQuake and mods :P

Dan, whats the deal with accessing pak files in c? quakeon has a maps feature which scans pak files for bsp's with valid player start points - how do you think thats done?

i just remembered a while ago i uploaded this pic:
http://www.btinternet.com/~pocketquake/quakeon.gif
Last modification: Paul - 04/26/01 at 05:45:34
Now you're getting a lot more complex. :) The source file common.c in Quake contains the code to open a pak file (among a whole lot of other things). Your QuakeOn program will be further complicated by the fact that Pocket Quake supports gzipped pak files. When I add in more advanced pak compression for better performance (ala Pocket Hexen) then it will get even more complex. :)

Do you just need to find the existance of a particular file in the pak file, or do you need to open the file as well?

Dan East
well, i found the code i need in visual basic (the vb source to quakeon is available) i just need to convert it to c and add the front end

oh yeah, i need to check for .bsp files so they get listed in the maps listbox
Last modification: Paul - 04/26/01 at 07:47:13
Okay, so to search for .bsp files, you will need to examine:
[pre]
/quake/id1/maps/*.bsp
For each enumerated pak#.pak file:
 /quake/id1/pak#.pak/maps
For each enumerated pak#.pak.gz file:
 /quake/id1/pak#.pak.gz/maps
For each enumerated Storage Card:
 /Storage Card [#]/quake/id1/maps/*.bsp
 For each enumerated pak#.pak file:
   /Storage Card [#]/id1/pak#.pak/maps
 For each enumerated pak#.pak.gz file:
   /Storage Card [#]/id1/pak#.pak.gz/maps
[/pre]

Officially, Quake will stop searching for pak files in a particular directory if the numerical sequence is broken. For example, if you have the following pak files in a dir:
pak0.pak
pak1.pak
pak3.pak

the pak3.pak file will not be recognized by Quake since the pak2.pak is missing.

It would be far easier to reuse the C source for accessing pak files found in common.c, then to try and translate the VB back into C. After all, the Quake C source is where the VB author got the algorithm in the first place.

Dan East
one more thing. how could i add a memory bar indicator like the one on wisbar?

i have to keep adjusting my memory settings before i play quake so it'd be good to include a way of adjusting it from quakeon
Diego Cueva · 26 Apr 2001, 16:33 UTC
I don´t know not about programming :), but it would be great to have QuakeOn for PPC
What about nixing most of the bells and whistles and just making a simple launcher. Either one which can generate a shortcut for you, and add it to a pulldown list for future use, or one which comes with a base set of shortcuts listed. Users could then add future shortcuts to a defined folder and have it show up in the pulldown menu.

I mean if it's a matter of convenience, I'd settle for just the basics.

the problem is i have no idea how to make it in c, i'm just collecting info on what to put in it, i'm just waiting for one of you to actually offer to make it :)

my vb version could be modified to do that but you'll all need a few more runtime files to run the damn thing
How many files are needed when a vb prog runs anyway?

If i include the option to run quake with command line parameters i get a 'cant find pvbdec.dll' error (thats the declaration dll) i've tried copying it from my desktop pc but it still wont work
A dll is a library of functions that are processor/OS specific. So you can't copy it from your desktop PC and have it run. I'm sure you already knew this.

A plain VB app only requires two files- the executable and the VB runtime DLL. If you start using OCXs and other DLLs then you need to include those as well.

What does PVBDEC.DLL do specifically? I can't imagine a frontend like this would require anything more than the executable and VB runtime engine.
no i meant i copied the dll from the 'devctrl' folder (not my actualy win98 folder) in evb so it should be the right one

it needs to be used when i use the function for starting a program its something like...

CreateProcess("Filename", "Parameters",0,0,0,0,0)
Last modification: Paul - 04/27/01 at 01:29:11
Okay, that makes more sense. I figured you already knew that about the DLLs.
the problem is that to run any vb program you need a few files already installed

these arent present when you reset the device so i had to install pocketshortcut which copied some files over then i could use my program

there's got to be a better way, surely?
Moose or Chuck · 27 Apr 2001, 05:26 UTC
if you were to make the thing in evb, there'd have to be an installer to copy the correct files over, dll's and what not. It could be dun, just it may be alittle larger and slower, btw it is a launcher who needs speed.
what? I'm not following Paul.

I don't know why eVB would require a special DLL just to invoke and run another program. VB (win32) can do this natively or through the Win32 API. Of course Paul is entrenched in this so he knows a little more about what is going on.

Now, I am not sure which files your app needs, other than the executable, VB runtime [and pvbdec.dll?]. Those files will need to be installed like you said. But what does resetting the device have to do with it?

I'm so confused.

well when the device is reset the files needed arent included in the os itself (the eVC mfc30.dll (i think thats the name) is though isnt it?)

anyways, thats not important, what is important is the problem with running other programs from eVB. first i declared the function (this required the dll i mentioned) then i passed the fucntion some values (path and filename, parameters)

did you say theres a way to do it without using the dll file? i cant get it to work

basically this is the situation - i have a fully made version of pocketQuakeOn which is made in eVB - it runs if i remove the ability to run quake (ie - i remove the function and its decalration) and can still make configs okay BUT if i leave it in i cant run the prog at all as it errors and asks for the pvbdec.dll (i'll check the exact name later)

if you all think a .vb prog is okay then we can find a way to get it working properly and get all the required files in an install package or something, OR we can try and make a C version

my brain hurts
Last modification: Paul - 04/27/01 at 05:18:59
Option Explicit
Declare Function CreateProcess Lib "coredll.DLL" _
Alias "CreateProcessW" _
(ByVal lpApplicationName As String, _
ByVal lpCommandLine As String, _
ByVal lpProcessAttributes As Long, _
ByVal lpThreadAttributes As Long, _
ByVal bInheritHandles As Long, _
ByVal dwCreationFlags As Long, _
ByVal lpEnvironment As Long, _
ByVal lpCurrentDirectory As Long, _
ByVal lpStartupInfo As Long, _
ByVal lpProcessInformation As String) As Long

Private Sub RunQuake_Click()
Dim ret
ret = CreateProcess("\quake\pocketquake.exe", "+map dmmuseum", _
0, 0, 0, 0, 0, 0, 0, "")
End Sub
http://vbce.com/code/vbce6/api/

same thing, right?

- i just read that i need to use Regsvrce to register the controls.
Last modification: Paul - 04/27/01 at 06:10:31
If you hard reset the device, you lose everything. A soft reset doesn't result in lost files though, so I wouldn't expect the eVB files to get dumped during a soft reset.

I don't remember exactly how to run a program from VB, but it is something like:

v_handle = Shell("notepad.exe", 1)

The "1" at the end tells it to load the app full screen with focus. It loads the file handle into the v_handle variable (it's a LONG I think) which can be used for other API calls.

CreateProcess is a function within kernel32, I just assumed CE would have something similar within its structure. I guess I'm wrong and you have to include the DLL yourself.

I don't know anything about CE or eVB, unfortunately.

I think there are a couple other ways to run an app, but I am tired right now- it's 6:10am and I've been up all night.


oh, I didn't see that you posted again before me. That CreateProcess function is the same as Win32, though shouldn't the lpCurrentDirectory be a string?

It's not used anyway and would be set to vbnullstring.

Hell, I don't know. bedtime. :)
If you hard reset the device, you lose everything. A soft reset doesn't result in lost files though, so I wouldn't expect the eVB files to get dumped during a soft reset.


i meant a hard reset - liek when you get a clean device for the first time it cant run eVB apps... so i'll need to distribute them too

I don't remember exactly how to run a program from VB, but it is something like:

v_handle = Shell("notepad.exe", 1)


i tried that ages ago - turns out shell doesnt work in eVB - i cant get it to anyways...

oh, I didn't see that you posted again before me. That CreateProcess function is the same as Win32, though shouldn't the lpCurrentDirectory be a string?


i just copied that off a site - its not the one i used so it may have errors in it - i cant paste the one i use as i'm not at home at the moment
Last modification: Paul - 04/27/01 at 08:22:20
i've been messing with that post for ages and i still cant get the quotes to work properly
Good News. I opened the Project Properties and made it send the required runtime filrs to my device - it now works! Not sure how to pack them up so you all have them but I'm working on it.
If you're interested, here's the prog on my ppc:
Image
It runs fine on my ppc but as its still in eVB it needs a few extra files and that bumps up the space required to run it. I won't be realeasing this until its in c.
Moose or Chuck · 29 Apr 2001, 08:59 UTC
That's too bad. It looks EXTREMELY useful
Unless one of you wants to help make it in C?
Moose or Chuck · 29 Apr 2001, 13:10 UTC
I could try, I think that i know enough to make a front end like that. But don't count on me. If you feel like taking the time to send it to my email then go ahead. Don't expect anything back though, atleast not at first.
I learn programming languages better when i have a project anyway. That's how I learned PERL, by editting UBB.
Eh.. maybe you shouldn't send me the VB source. I don't know enough VB to know what's happening, really.
i can pretty much do the c code but i dont get visual c++ - like linking the button code with the actual button so it runs when the button is clicked...

are udt's available in eVC? they arent in eVB so i had to dump the pak searching code... thats the main reason for getting it in eVC, now that 999 has released all his maps in pak files
Paul:

How big is the eVB version?

I could care less about filesizes :)

its not just the file size though. thanks to evb not supporting certain features it stinks.

heres what it can do at the moment:
set basic options like name, colour, game mode, fraglimit, timelimit, maxplayers, network options, graphics mode, options to play/record demo on startup, map selection and patch selection. (i'll add bot support too, so you can set up a full RA match from quakeon)

you know you wanted the set of shortcuts in the pulldown list? thats kinda like 'quakesets' used in the desktop version of quakeon. the problem is i need user-defined types to do this and evb doesnt support them so if someone could collaborate - maybe one of you learning to use visual c++? (i can do the basic code i just cant link it all together the way i can in vb)
yargh...

Simplicity, that's the key :)

Couldn't you release a limited version and just add more bells and whistles as you progress?

i'll be back in about an hour, tidy it up and post it - just for testing though :)

Actually I think I'll rethink the code and release it tomorrow if you can wait that long. the interface is okay though isnt it?
Last modification: Paul - 04/29/01 at 13:32:06
Hey Paul, out of curiosity, do command-lines work with PocketQuake with the SH3 devices?

I'm having problems with the MIPS shortcuts I've made, they work fine on the iPAQ. Is it the same on the SH3?

Command-Lines *do* work on the ARM build, perhaps more debugging is needed.

The stupid problem i have is that i can only get pq to run within a few seconds of setting the program memory to the required amount (otherwise it snaps back to the 50-50 setting) so i need to put memory allocation on it too.

yes it does seem to work okay, i'll run a few more tests tonight.
Dan, i can use COM_FindFile for searching pak files for maps, right?

ah, i can use it to search for progs.dat too
Last modification: Paul - 04/30/01 at 04:18:52
anyone know how to get an icon in the bottom bar with the keyboard, battery, gamepad etc?
999, you're creating shortcuts manually, right? The syntax is:

nn#\This\Is\My\Shortcut

nn is a 2 digit number containing the number of characters after, and not including, the pound sign. Shortcuts also cannot be very long. 256 characters is what the docs say. In that case I don't know if there are 3 digits before the pound sign or not.

Paul, yes you can use that to search pak files, but you're going to have to modify it. It will search the real directories in the search path first. If it cannot find the target file then it will begin searching the pak files. Also, it will return the first file it finds, and I believe you want to enumerate them all. Finally, you have to specify the exact filename, and you want to search for files of a certain type, sort of like using a wildcard. So it would have to be modified to get the behavior you want.

Dan East
He's been using the correct syntax for making shortcuts, it just doesnt work on MIPS devices, apparently

I'll make a little shortcut maker when i get home - just a textbox and a button, that shouldnt need any extra runtimes :)
Last modification: Paul - 04/30/01 at 06:07:56
a textbox. and a button. hmm... here it is:
Image
Dan:

Yeppers, I'm using the right syntax on the shortcuts as Paul has verified.

The odd part is, I use the same shortcut lnk files on MIPS and ARM, and it will only work on the ARM machines.

What I mean by a "working" shortcut is- Launching Quake, and setting up a match by dumping you in a specific arena and turning on any game flags.

Now, on ARM, the shortcuts I have made will do this, however on MIPS, it's a different story. The game *will* launch, and it will choose the proper map, and even setup the right amount of players to listen for. The problem is, no matter if I define the working "-basedir" or not, PocketQuake(Mips) continues to look for it's files in the main ID1 directory. This means you can't start any mods with the command-line "-game" because it's not going to find the right directory anyway, instead, it will boot up off of the base pak0.pak file in your ID1 folder.

The "Brute Force" method of replacing the progs.dat file in id's base pak0.pak file is the only thing that seems to work :(

Paul, I'm interested to see if PocketQuakeOn has the same problems declaring which directories PocketQuake should be searching.

Dan, can you please look into this problem? The ARM version works for the most part, and it'd be great if the MIPS version worked as good.

Can you verify on a MIPS device that you can properly launch some other app with command line parameters? Thanks!

Dan East
oh great, for some reason the .lnk files dont work - here's the code, it should work:

Code:
   File1.Open strFileName, fsModeAppend, fsAccessReadWrite, fsLockReadWrite
       numChar = Len(strString)
       strLinkText = numChar & "#" & strString
       File1.LinePrint strLinkText
   File1.Close


strString is the commandline part - i get the number of characters, add the # then strString itself - is the nn# number supposed include spaces or what?
Paul, I'm interested to see if PocketQuakeOn has the same problems declaring which directories PocketQuake should be searching.

eh? the problem i'm facing (my reason for not releasing) is that i cant search paks using eVB...
Moose or Chuck · 30 Apr 2001, 14:17 UTC
if you are good at API then use the API SPY that comes with evb and find out the handles and whatnot for the battery icon and the keyboard blah blha, then you can do what you want from there.
Paul, yes, you have to include the spaces in the nn#/ shortcut count. Including the "#" and "/".

I'll give your zip file a go.

its done so the end result is something like

nn#\Windows\Start Menu\PocketQuake.exe -game rail

is the nn#\ okay or should it be nn#/ ?
Paul, there's a Windows CE API function to create shortcuts; SHCreateShortcut. I don't know if eVB exposes it as an object, or if you have to provide your own function prototypes like you were doing for CreateProcess.

Dan East
Thanks Dan I'll try that. It should have occured to me to look for API to do it but eVB doesnt support much so its a long shot. I'll be back in a few minutes
Nope, its not there. Any ideas why my method won't work? (its essentially doing what a human does - writing out the text, counting up the characters)
Have you tried looking at the link produced by your program to see what it looks like? That would probably reveal the problem. Also, oddly enough, the link must contain ASCII text and not UNICODE (if I remember correctly). I believe the strings are UNICODE inside of eVB, so you may be storing a UNICODE string instead of ASCII.

Dan East
i have and it looks fine. its probably what you said about the strings.

According to the eVB glossary:
Windows CE uses Unicode exclusively at the system level.
Last modification: Paul - 04/30/01 at 14:56:10
999, can you find anything wrong with the links?

its going to remember your last used settings too (for quake path etc) but the savesetting and getsetting functions (that save it in the registry) seem to be supported but arent working properly...
How are you viewing the links? I had to send mine via email just to read it on my desktop pc as it wouldnt send .lnk files when i used activesync top sync the device
I just drag and drop it using File Explorer on my laptop (over an Activesync connection).

Dan East
the 'explore' button doesnt work on my activesync - it used to but now it doesnt. will a reinstall help?
I don't know. Can you explore your device through Windows Explorer, using the Mobile Device folder?

Dan East
no, the icon for that is a standard windows icon - the type you get when the file isnt associated with something - it does nothing
Then a component of ActiveSync is missing or broken. Simply reinstalling ActiveSync may correct it. Then again, we are talking about Microsoft here, so you may have to completely reinstall Windows, or worse, reformat your HDD and reinstall, or finally, throw your PC away and buy a new one that actually has a fully working installation of Windows. :)

Dan East
Dan, you read my mind. I'm getting a laptop. With Win2k (yes its still ms but its better... right? and i can use ppc emulation)
Win2k is one of the few things MS has done mostly right. Consumer Windows (95/98/ME) sucks terribly bad compared to 2000. The downside is that many games won't work with NT, but you can setup a dual boot system very easy to have the best of both worlds. I used NT 4.0 on my laptop for quite a while, and jumped to Win2k as soon as the first betas were available. NT 4.0 sucked big time on laptops (no hot-swap PCMCIA support, no IR support, suspend support was very buggy, the system time wouldn't update while the device was suspended, no dual-monitor support, and it didn't have the cool mouse cursor shadow and alpha blending menu effects. :) )

Dan East
yeah i'm gonna have a dual-boot of win2k and either win98(for extra compatibility for games etc) or linux...

arent there translucent windows in win2k, thats the alpha blending at work?
Image
I'll limit it to the pocketquake.com server at first, then add support for others... how the hell do those drop down lists work on the bar below the start button?!?
Diego Cueva · 03 May 2001, 17:28 UTC
Hey, this screenshot looks good!