Good tutorials to start with?

User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

Nope haven't looked into it yet. I'll check it out whenever the opportunity arises. Right now I'm not really busy with any personal programming projects and the hassle of moving over the mod files from Google Code to Github doesn't seem worth it at this point.

I'm somewhat familiar with the web interface side of github though. It's where script.aculo.us host their files and wiki.
Last edited by Eraser on Fri Sep 24, 2010 10:50 am, edited 1 time in total.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

@SM: Did he write the original Infinite Mario or the adaptive version? I mavenized it because I had some ideas I wanted to hack onto it. But the code is of the "change one thing, break seven random other things" persuasion so I decided to waste my time on something more fruitful.
Silicone_Milk
Posts: 2237
Joined: Sat Mar 12, 2005 10:49 pm

Re: Good tutorials to start with?

Post by Silicone_Milk »

The adaptive version.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

Then I don't have to smash him, that was actually bolted on quite nicely.

Side note: are you user perfunction on GH?
bitWISE
Posts: 10704
Joined: Wed Dec 08, 1999 8:00 am

Re: Good tutorials to start with?

Post by bitWISE »

That'd be me. I wish they let you have a private repo or two on the free account :(
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

Stalker. <3

I think Gitorious lets you host private repositories but it's not nearly as vibrant as GH. Unfuddle too, though it's targeted at team-based collaboration (but don't let that stop you).
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

I got an Unfuddle account but it's set up as SVN repo. The free Unfuddle accounts only allow one user per repository though I think and it's not really fast.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

No, you can have multiple users (I use it for some collaborative freelance work) but you can only have one project.

As to speed, that's why you should use git!
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

lol in their case I think it's a network issue. Google Code is much faster.
bitWISE
Posts: 10704
Joined: Wed Dec 08, 1999 8:00 am

Re: Good tutorials to start with?

Post by bitWISE »

Just found this. Trying it out.

https://bitbucket.org/
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

Fun fact: they've been just been acquired by Atlassian (like in: today) and they're updating their freemium plan.
As part of the big announcement, we’re launching all-new pricing tiers. All accounts now have unlimited private and public repositories with unlimited storage. You can now get a 5-user private code repository account for free… forever. And, for the next week, we are offering a free 12-month subscription to the 10-user tier.
http://blog.bitbucket.org/2010/09/29/bi ... atlassian/

That's pretty awesome.
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

I've picked up the code again and added a new medal award (like Impressive, Excellent, Assist, etc) but it's not working out entirely. I've defined a new award called "killstreak" and actually awarding it works out pretty well. I've even made a custom icon for it.
These icons are displayed above the head of the player to which the award is awarded. This is the part I can't figure out. For some reason, my award is simply not displayed. My current code is available here.
On like 596 of combat.c I award the medal (in the player_die method). It's done in exactly the same fashion as the Gauntlet and Excellent awards below that. In bg_public.h I've defined a new eFlag (EF_AWARD_KILLSTREAK, line 246). Finally, in cg_players.c I've edited the CG_PlayerSprites method so the icon is drawn (line 1952).

End result: no medal icon is drawn. It just doesn't work. Anyone got any idea why not?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

Looks like it should work (checked out the source). Is the trap_SendServerCommand() command on line 605 in g_combat.c executed? Or the Com_Printf() on line 1953 in cg_players.c?
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

The trap_SendServerCommand() is executed but the Com_Printf isn't.
Is there maybe some hardcoded limit to the number of eFlags somewhere? There's some really odd forced limits in this code...

edit:
if I change the line
attacker->client->ps.eFlags |= EF_AWARD_KILLSTREAK;

in g_combat.c to

attacker->client->ps.eFlags |= EF_AWARD_GAUNTLET;

then it does correctly show a gauntlet award above the player's head. Hence the idea that eFlags might be limited somewhere.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

Yeah, it might be that the field for awards is limited to 10 bits or so. I'll see if I can look it up.
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

They're defined in bg_public.h, but they consist of a lot of other flags as well, like EF_FIRING, EF_BOUNCE, EF_PLAYER_EVENT, EF_TELEPORT_BIT.
There are 20 of these flags defined, me adding the 21st. It doesn't strike me as a natural limit (like 8, 16 or 32 would). Maybe they explicitly limit it at 20 bits somewhere, but I haven't found evidence for this yet.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

The code in qcommon/msg.c is what sends a entityState_t over the wire. There are some hard limits in there that you might be running into.

EDIT: line 836: { NETF(eFlags), 19 } :(
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

oh bummer. Well I just figured a way to get what I want after all. One of the bits is reserved for the EF_TICKING flag, which is used to play the ticking sound when someone is mined in Team Arena.

Since that is missionpack related code it's not relevant for my mod. So now I'm simply assigning the EF_AWARD_KILLSTREAK bit to the same bit as the EF_TICKING bit, which works. I just hope it doesn't break anything else.

There's also a EF_KAMIKAZE flag, which I'm pretty sure is used for the Kamikaze powerup in Team Arena. It's a bit confusing though as it's not wrapped within #ifdef MISSIONPACK conditionals, so I assume that for mods this bit can be reused as well. Other than that, you're really stuck to the limit, which is kind of baffling to be honest.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Good tutorials to start with?

Post by ^misantropia^ »

EF_KAMIKAZE is a TA-only thing too, they probably simply forgot to #ifdef it out.

As to those limits: they were put there to save on bandwidth. I suppose it made a noticeable difference in the days of dial-up.
cocov
Posts: 26
Joined: Thu May 15, 2008 9:14 pm

Re: Good tutorials to start with?

Post by cocov »

i found this interesting paper on quake 3 source :
http://caia.swin.edu.au/reports/110209A ... 10209A.pdf
this is my avatar
[img]http://i.imgur.com/xXQ6mzH.png[/img]
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

Uh, before I click that link, I'd like some confirmation that this actually is valid and not some PDF that exploits one of Adobe's gazillion bugs in PDF reader....
cocov
Posts: 26
Joined: Thu May 15, 2008 9:14 pm

Re: Good tutorials to start with?

Post by cocov »

it's legit u can see it by the url which looks legit unles it was hacked. and u can google the paper yourself , google for "quake III arena game structures"
and u can run it trou virustotal, ( it will not save u from 0-days thou, than both u and i are pwnd if that is case) , u can open it in some obscure pdf reader by your choice.
this is my avatar
[img]http://i.imgur.com/xXQ6mzH.png[/img]
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

Ok cool, sorry for doubting you. There have been so many spam bots lately and the URL didn't tell me anything.

I'll read through it some time. Thanks for the link.
VolumetricSteve
Posts: 449
Joined: Sat Nov 06, 2010 2:33 am

Re: Good tutorials to start with?

Post by VolumetricSteve »

:disgust: there was this neat format called RTF which was used a good amount a while ago...why is the world's most convoluted document format so wildly popular? Does PDF actually do anything...that couldn't be done with less memory in RTF or even in HTML?

/rant and/or annoyed confusion

edit: I should also say that the information contained within that particular PDF file is very interesting and looks like it's worth a solid read. :) Good find.
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: Good tutorials to start with?

Post by Eraser »

Yeah and what's even better, in the references in that document, I found a link to this document, which is a thesis written by Jan Paul van Waveren (better known in the community as mr elusive) who is the guy that's responsible for coding the bots in Quake 3. It's about the Quake 3 bots and the philosophy behind how they work. It doesn't go into code details but at least it might help me get a deeper understanding of the way bots work and use that to turn the bots into AI more suitable for the single player portion of EntityPlus.
Locked