Porting Voxlap

Miscellaneous projects by the Build and Shoot community.
222 posts Page 15 of 15
MrHaaax
Modder
Modder
Posts: 1360
Joined: Sun Nov 25, 2012 2:58 am


Sonarpulse wrote:
That's the idea. :D
Anybody see the slight change from Ben's original logo?
The A letters, amirite?
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


MrHaaax wrote:
Sonarpulse wrote:
That's the idea. :D
Anybody see the slight change from Ben's original logo?
The A letters, amirite?
Yup, it's no longer an "A", (it's the Haskell logo).
MrHaaax
Modder
Modder
Posts: 1360
Joined: Sun Nov 25, 2012 2:58 am


Sonarpulse wrote:
MrHaaax wrote:
Sonarpulse wrote:
That's the idea. :D
Anybody see the slight change from Ben's original logo?
The A letters, amirite?
Yup, it's no longer an "A", (it's the Haskell logo).
You are going to concentrate on Haskell now, are you?
VladVP
Post Demon
Post Demon
Posts: 1425
Joined: Fri Dec 14, 2012 10:48 pm


Are you working on this solo now? The plan was that I would help as much as I could this summer, but my computer broke (let's just say I sat on it) on the last school day before summer... I mean what the fuck is the chance of that?

Anyways, I hope you're not dead mate, and I expect the computer to be ready soon!

And also, MrHaaax, you should probably just skip the discussion already...
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


This gist of it is I lost interesting in doing the last bit of work to make Voxlap bug free. I know this sounds infuriating: "Jeeze, if it's so close, just finish the damn thing." Well, the closer I get, the harder it is to find bugs. A few months ago, lensman did a bunch of stuff really fast. Things I couldn't find and had no idea how to find. On the other hand, his git history is incomplete, and the big refactor he did, while a good idea, combined with the missing history means if he (inadvertently) introduced new bugs, it will be hard to track them done. Also I haven't heard from lensman since.

The thing to do for Voxlap is probably email Ken Silverman to see if he has any backups of the code, ideally ones pre-inline assembly (lensman reported he got it faster with compiler intrinics, which Ken might not have had access to when he originally made the engine.) Then port the older versions based on what we have, and rebase the changes he and lensman made in later versions. Another thing is the build system. Ever change it would have to be basically manually redone. That is bullshit, and C should be ashamed of itself. I should probably switch it to cmake or premake or something that can automatically deal with refactors.

That would be cool, and nice bragging rights, but honestly it doesn't interest me as much as it used to, especially compared to the amount of work it would take. Ken is a gifted optimizer, but many of his optimizations no longer make sense on more modern computers (though they naturally help with old computers). This post eloquently describes how to optimize these days (it's an excellent read): https://www.facebook.com/notes/facebook ... 1643253920 It also introduces the VERY important concept that newer low end computers are very different from older high end computers, even when the specs broadly look the same. (Notice I said different not better, everybody needs to watch http://www.youtube.com/watch?v=QGw-cy0ylCc ASAP.)

I decided that if the point of this is to help BnS, it would be better to make a new network-compatable client, hense my HaSnip thread (go find it in the software mods sub forum). Also Greaser is making pysnip work with iceball, making even that redundant. For now, I have no plans to work on Voxlap. Perhaps I might end up using Voxlap with HaSnip for max nostalgia. Maybe I'll just finish this project for bragging rights and resume padding. Maybe I'll do a line-by-line conversion to Rust, an excellent language that really ought to entirely replace C and C++. It's syntax is IMO a big bloated in an effort to be more C-like, but syntax doesn't matter, and it's semantics don't fall into the same "ease the transition" trap. This is the third time I've implored y'all to check something out, but (seriously :), check out Rust too. So yeah, I am out for the time being.


If anybody reading this wants to take over the project, go for it! I'll still be around, and can offer advice or take on a secondary role, I just don't want to lead it. Vlad and Cajun (if he sees this), you two seem to be the most interested. I'm going to be frank and say when you guys worked on stuff, the git work seemed a bit sloppy for the museum-curator-perfectionist approach I think this sort of project needed, so I recommend you both get real good with git (and use and abuse `gitk --all`, it's makes everything SO MUCH easier!). But feel free to prove me wrong and show that I was being too uptight and slow moving to get this done.
Epicnice TSB
Post Demon
Post Demon
Posts: 764
Joined: Fri Jan 11, 2013 5:44 am


I the only thing I know how to do is making a sphere.
Cajun Style
Deuced Up
Posts: 145
Joined: Fri Dec 07, 2012 11:04 am


Still PC in jumbles. :-X Mood in Jumbles. :-X Looking to pick this up to pick myself up ;_;
A few months ago, lensman did a bunch of stuff really fast. Things I couldn't find and had no idea how to find. On the other hand, his git history is incomplete, and the big refactor he did, while a good idea, combined with the missing history means if he (inadvertently) introduced new bugs, it will be hard to track them done.
Is it just sloppiness on his part for not making multiple commits?
I'm going to be frank and say when you guys worked on stuff, the git work seemed a bit sloppy for the museum-curator-perfectionist approach I think this sort of project needed
Could you be explicit? Maybe a link to a Git-nazi site? ;)
use and abuse `gitk --all`, it's makes everything SO MUCH easier!
As a Git noob: thanks!
Read the article (as far as I could understand). I've personally been a bit divided at the issue of "modernizing" the optimizations. The whole charm of the Voxlap engine is that it works on crapware. If someone could shed some light on which generation of CPU's gets left behind, that'd be great. My dream is to make an ARM port.
I definitely need more experience. Maybe I'll focus on porting another game first. This will give me a start with using Valgrind.
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


Yes. Lensman said he did an "emergency commit" because his hard drive was making weird noises. I understand if had waited to push to github until it was breaking, as it's perfectly orthodox to redo history in a local, unmerged branch. But he should have at least made small commits too so when he made the "emergency push" I got a bunch of commits, not one big one.

Well here is the official guide to git: http://git-scm.com/book. Learn git cherry-pick, it's pretty simple and can help fix basic things. You are going to really want to read up on the difference between git merge and git rebase. Also check out git bisect--I never got around to using it, but I should have. My museum curator approach can be summed up like this:

When working on a hostile codebase, it is more important to have easy to read diffs than an unmodified history.

By hostile, I mean code bases very unfriendly towards modification, especially by people other than the original author. Stuff like:
  • No tests, few tests, weak tests.
  • Lots of janky unsafe stuff that seems on the very of breaking.
  • Minimal documentation.
  • weak / constantly breaking build system.
Voxlap fits all of these, making it a VERY hostile in my book.

Yes I agree that Coxlap's out-of-date optimizations give it its charm. And looking at the OpenSpades threads and bug reports, more people with shitty computers are playing than I thought. I mean the Voxlap optimizations hardly apply to computers made in the last decade. But I guess many graphics cards, including my own, really are extremely shitty. The problem is many of those very optimizations make it hard to maintain and harder still to port.

If you are on windows, I would actually amend my plan of attack to this:
  1. Get version from Ken with no inline assembly.
  2. Add documentation: I have a couple commits adding doxygen, you can just cherry-pick those.
  3. Add a shit ton of badly needed tests. Turn on all warnings. You can try splitting up those massive files like lesnman did now, or do it later so cherry-picking from my work or his will be easier.
  4. Port Voxlap to compile on -32 or -64, but only with MSVC. This will involve fixing the types. Make sure this doesn't cause any performance regressions compared to ken's no-asm version because it shouldn't. This means you can't assume how many bits addresses are, but on the other hand you use stdint.h to enforce exactly how big other stuff is. Ken Silverman also rarely uses unsigned types in variables, but just casts to them. Try to change that.
  5. A lot of the performance improvements from ASM can be done with compile intrinsics instead. Try to mimic his changes using those instead. Consult lensman's branch for this.
  6. Ideally at this point you should have something a lot less hostile, and no slower than the original 32-bit with asm version. You have done the hardest parts and now you coast to the finish line. Now it's time to make a good build system if you haven't already and make this shit cross platform. You'll be able to freely mine shit from my work, and that alone will probably be enough, because if it's truly maintainable and multi arch (32, 64), once it compiles it should work.
  7. You said you wanted an arm build. Well if you support x86-32, x86-64, MSVC, and GCC, you better be able to just compile on ARM and have it work right away. (ARM can be little endian like x86, right?) If anything doesn't work, well now is the time to fix it.
The trick to this is to do really work on 1-3, so 4 and 5 aren't impossible. If you really try on the early stuff, by the time you get to 4, 5 you will know enough to do them. There I recommend that you DON'T start something else first, and just dive right into Voxlap if you want to it.

It only supports Linux right now, but use https://travis-ci.org/ or something similar to make sure it always compiles and your tests always pass. It integrates very well with github.
Sonarpulse
Coder
Coder
Posts: 443
Joined: Thu Dec 13, 2012 7:18 pm


Well if you want to do something before Voxlap, learn Haskell or Rust. Voxlap/C has many warts, and learning those langauges will help you be aware of them. If you don't do that before or during, please do it after, because Voxlap/C can rot the mind.
JoJoe_Stinky
Mapper
Mapper
Posts: 173
Joined: Thu Oct 24, 2013 3:53 pm


He made it back in the 1990's have you tried to compile inside DOSBOX?
VladVP
Post Demon
Post Demon
Posts: 1425
Joined: Fri Dec 14, 2012 10:48 pm


JoJoe_Stinky wrote:
He made it back in the 1990's have you tried to compile inside DOSBOX?
Voxlap is a Win32 application.
JoJoe_Stinky
Mapper
Mapper
Posts: 173
Joined: Thu Oct 24, 2013 3:53 pm


make us a nice converter for voxed? it would be nice if voxed exported KVX so we do not need to convert them in slab6 to re-import them into voxed.
222 posts Page 15 of 15
Return to “Noteworthy Picks”

Who is online

Users browsing this forum: No registered users and 1 guest