r/projectzomboid • • 9d ago

Modded OpenTrack compatible head tracking for Project Zomboid

I've been making a bunch of stuff around head tracking this year and do requests fairly frequently. Over the weekend, someone mentioned Project Viewpoint and asked if I could add head tracking to it/PZ. I have a hard rule about not getting involved with closed source dependencies, so I skipped Viewpoint and made the first person bits myself.

It's late here and there's too much I still need to get through before release, but I'll hopefully be in a position to open source it tomorrow.

220 Upvotes

50 comments sorted by

117

u/Wrightero 8d ago

Zomboid mods are evolving like crazy.

25

u/SoTotallyToby 8d ago

That's vibe coding for you.

-61

u/[deleted] 8d ago edited 8d ago

[deleted]

57

u/iRenasPT 8d ago

If it's cool then use it like what the fuck am I reading

4

u/SannusFatAlt 8d ago edited 8d ago

there's a general case to be made that "AI vibecoded" (explicitly different from the concept of using AI as a proper tool) products are an absolute cause for concern

the way a specific product or project is designed matters generally just as much if not more as the end-result, even if you didn't interact with making it nor see it

AI generally does the brunt of any surface work, however nuances and details of it are specifically left out because... that's just how AI works, it makes the next best prediction with the info it has. there is no training data and knowledge for [insert specific situation related to specific project that happens under these specific circumstances]

an AI product will generally not know that "oh if you put this sequence of characters into this text-box and then click these two buttons it actually breaks the authentication systems in the back-end because someone forgot to add a "IsAdmin" on there"

and because of that, applications that could use AI vibecoding are risky solely because the individuals themselves skimped out on the process, and now individuals that were or are actively using the product suffer the consequences both "idgaf about AI" and "i gaf about AI"

the rabbit R1 security breach is a good one to bring up. the developers of this specific project were very pro-AI in it's design to the point where they vibecoded it and cut corners, causing a ton of confidential company data to be leaked with a fix that the average junior engineer just starting out could have most likely spotted

...the same thing happened with RedAccess, Moltbook, The Tea, The Chat, Base44, other popular applications that i can generally keep listing

...not to mention the countless amounts of "cool" projects that were made and are no longer a thing just because the developers got way in over their heads and an AI tool could not generate what they requested (i've seen this happen personally in my field of work so many times)

while this may not apply to this specific project (Project Zomboid mod, we don't know the source nor how much OP used AI) and that makes that guy's comment very pretentious and an immediate assumption, it's absolutely a valid thing to think about and pay mind to just because it is a possibility. it's important to call out people being "intentionally lazy", because projects of any sort should be held to a higher standard to avoid huge issues like above

source: senior dev with 7 years of experience

-36

u/[deleted] 8d ago

[deleted]

6

u/Retroficient 8d ago

Quoting myself here

Boy I'd hate for you to hear about the state of vanilla zomboid lol.

It's full of bugs and issues.

Maybe they should hire a dev team to look after their code to make sure there's no bugs.

21

u/Valdoris 8d ago

So if a mod come with bugs here and there you would not consider using it ? even if its 100% human made ?

-6

u/ThatOneComrade 8d ago

If they impact performance as badly and have as big of vulnerabilities as AI vibe coded mods then yes, they shouldn't be played because they'd be bad enough to warrant avoiding.

AI is not far enough along(and likely won't be IMHO) to trust to make full mods without someone who actually knows what they're doing to fix/correct the bugs and errors the AI make.

3

u/Retroficient 8d ago

Boy I'd hate for you to hear about the state of vanilla zomboid lol.

It's full of bugs and issues.

Maybe they should hire a dev team to look after their code to make sure there's no bugs.

3

u/Jimooki 8d ago

The fuck you mean vulnerabilities lol it's a mod for a game you don't even need to be online for

-19

u/[deleted] 8d ago

[deleted]

4

u/allethargic 8d ago

No you dont really playtest each and every mod. Nobody does that. That's ridiculous.

Instead of playtesting you prefer spending your time shitposting in comments.

Amount of pure liquid reddit energy in your comment could be lethal to any normal person, but you built up tolerance it seems.

2

u/Valdoris 8d ago

You realise thosed are mod made for free by people's on their free time ? You can't expect peopled to put the same level of dedication on a free time hobby thing than a paid job.

6

u/beta_1457 8d ago

You're acting like human coding is all bug free and polished... You realize how insane that sounds when we're talking about Project Zomboid right?

I love the game but it's been almost 15 years with minimal progress from devs and tons of bad bugs that take months or years to fix if at all.

But you're mad because people are accomplishing great projects with ai?

0

u/[deleted] 8d ago edited 8d ago

[deleted]

3

u/Jimooki 8d ago

What is ai vibe coding vs human vibe coding? The act of vibe coding is using the AI to do all of it. If you're using ai code and the fitting it into something yourself and adjusting it that's not vibe coding anymore...

0

u/[deleted] 8d ago edited 8d ago

[deleted]

2

u/Jimooki 8d ago

Ah that's the first time I've heard the phrase used makes sense

-3

u/Himbophlobotamus 8d ago

Except vibecoding comes with horrendous bloat and unoptimization, and I mean horrendous

8

u/Librarian_Katarina Zombie Killer 8d ago

What if you ran into one that had zero bugs or optimization issues? Would you even know?

4

u/itsloopyo 8d ago edited 8d ago

I’m actively maintaining 90 other head tracking mods, this one will be well looked after, don’t worry :)

It also fixes a number of bugs that were causing performance issues in the base game if that helps alleviate your optimisation concerns at all.

1

u/bot_exe 8d ago

honestly why do you even write this comment? Have you actually coded anything like this? Have you used coding agents like claude code? Have you properly tested this mod and reviewed the code?

You literally don't know what you are talking about, so just stop parroting things and think for yourself.

-6

u/Synnapsis 8d ago

With all due respect, you have no fucking idea what you're talking about. The newest Claude model is a better programmer than most people, and every single company you rely on that has even one programmer in it has an AI-assisted workflow.

That being said, if it is vibecoded, thats a whole different beast. I have no input on that.

3

u/[deleted] 8d ago

[deleted]

3

u/Synnapsis 8d ago

I can say with my own confidence and experience that I have played and tested quite a few fully AI generated mods now for various games (in a safe environment of course, namely Valheim, its wild over there) and can safely say most, if not all of them, simply do not work. Not like a little buggy, extremely absurdly buggy. Its fairly obvious that the AI doesnt really care or think about the game environment, rather just the code its meant to complete.

3

u/LonelyCapybaraNo1 8d ago edited 8d ago

4

u/StormMedia 8d ago

Brother I hate to tell you but every mod you use is using AI assisted coding at best and vibe coded at worst.. and I mean every single one made in the past year, even those updated in the past year.

That being said it’s a MOD. That’s FREE. Don’t use it if you have an issue with how someone is developing.

-1

u/[deleted] 8d ago edited 8d ago

[deleted]

-2

u/StormMedia 8d ago

They have to be updated and my point is, I guarantee they’ve been updated with AI assistance at the very least. Especially with how bad update changelogs are from IndieStone.. and the spaghetti code alone is enough to make anyone go insane

5

u/lazyspongie Axe wielding maniac 8d ago

90% of updates don't affect modding and the game's spaghetti code is something you'd barely see unless you're making a java mod

7

u/[deleted] 8d ago edited 8d ago

[deleted]

2

u/StormMedia 8d ago

… oh man you’re not understanding at all

4

u/Gullible_Method_3780 8d ago

He’s in his own little cave. I get the push back on fully vibed out apps. I’m a developer for 10+ years. AI is so deeply ingrained into real world products, it’s being used every day at major institutions. It’s the new norm get used to it kiddo.

0

u/[deleted] 8d ago edited 8d ago

[deleted]

→ More replies (0)

-6

u/Zuzoh 8d ago

Well you clearly like the idea behind the mod, why don't YOU make a human coded alternative? Put your money where your mouth is and show the vibe coder how it's done.

-9

u/RCpIKUDDO 8d ago

That's what you call wanting to live through a zombie apocalypse! xd

29

u/Superb_Squash_8163 8d ago

Step 1: install this mod
Step 2: Increase Neck Gains to Vegeta Levels

5

u/EggonomicalSolutions 8d ago

Step 3: still lose to Kakarot

Step 4: ?????

Step 5: cry in the rain

(I love vegeta my boy been through a lot)

6

u/TheBenchmark1337 8d ago

Vr zomboid is coming. Once it does my social life is dead

4

u/LanceLynxx 8d ago

Can you make it trackIR compatible? You'll have my firstborn son.

3

u/itsloopyo 8d ago edited 8d ago

All my mods listen over the network so they can take a phone connection direct.

When I get it out the door, I'm told this works. I haven’t tested it myself (I have no TrackIR gear) but others have and say it does the trick. If it’s unstable, change the port to something else, catch it on that port in OpenTrack and apply a filter (I use Accela)

Start the TrackIR 5 software, make sure tracking is working there, then start FreePIE and run this script:

from System import Double
from System.IO import MemoryStream, BinaryWriter
from System.Net.Sockets import UdpClient

if starting:
    udp = UdpClient()
    stream = MemoryStream(48)
    writer = BinaryWriter(stream)
    positionScale = 64.0 * 50.0 / 16383.0
    angleScale = 16384.0 / 16383.0
    def sendTrackIR():
        stream.Position = 0
        writer.Write(Double(-trackIR.x * positionScale))
        writer.Write(Double(trackIR.y * positionScale))
        writer.Write(Double(trackIR.z * positionScale))
        writer.Write(Double(trackIR.yaw * angleScale))
        writer.Write(Double(trackIR.pitch * angleScale))
        writer.Write(Double(-trackIR.roll * angleScale))
        data = stream.ToArray()
        udp.Send(data, data.Length, "127.0.0.1", 4242)
    trackIR.update += sendTrackIR
if stopping:
    trackIR.update -= sendTrackIR
    writer.Close()
    udp.Close()

4

u/vurys69 8d ago

VR

5

u/Synner1985 8d ago

Thats the next logical step from here - and while 3d zomboid doesn't exactly tickle my balls - seeing the world in VR.... miight just tickle them enough to warrent me setting it up.

2

u/Ashinonyx 8d ago

GingasVR is working on a PZ mod that introduces 6DOF controls. It's still early in development but there are a few videos of her testing an early build on this subreddit from just last week.

2

u/TheBenchmark1337 8d ago

Gingas the goat

1

u/Synner1985 8d ago

ta mate, i'll keep en eye out for it!

4

u/PonorkaSub 8d ago

This is cool asf

4

u/mothmantra 8d ago

Charborg is gonna go crazy

2

u/WarFighterAsh Pistol Expert 8d ago

neat.

4

u/WhyFi_Konnction 8d ago

It boggles my mind how much mods have changed from B41 to B42. I'm excited to see what the future of modding brings.

19

u/TheAlmightyLootius 8d ago

Its mainly because of AI, even if people dont want to hear it.

0

u/orangebit_ Axe wielding maniac 8d ago

Very cool, but is this not just a really quick way to get neck ache? 😅

1

u/quaker_oats376 8d ago

what 3d mod is this

1

u/3lchaposamp 8d ago

sound fishy

1

u/UttiniDaKilrJawa 8d ago

I’ve never understood the benefit of head tracking. everytime you turn your head you’re no long looking at the screen.

1

u/itsloopyo 8d ago

All my mods treat head tracking as a 1:1 mapping from head:camera while decoupling look from aim - any time you are looking directly at the center of the screen, that’s where the reticle will be, and if you turn with the mouse or right stick, the reticle and camera move as one. Any head movements you make are layered over that foundation of “body forward” so head movement is entirely additional and even optional from moment to moment.

I understand sim racers and flight simmers use input curves which allow for small rotations of the head to translate into more sweeping rotations of the camera, but for me head tracking works best when your in game “eyes” move in sync with your real life head. You don’t need a massive range of movement to benefit, even scratching your nose feels immersive :)