General Discussion
Forums > General Discussion (Archives) > Bsp scriptingSearch | New Thread
Thread Locked. You cannot edit or reply to any messages.
Bsp scripting
 
Page 1, 2 | Next Page
EmotionallyDisturbedParakeet
Super Regular
FatGuy With
A LittleGun

P: 09/18/2022 04:14 EST
E: 09/18/2022 04:17 EST
   
@Backalleybuttlove, I'm very gradually building up .NET classes for BSP and WAD in Powershell with built-in methods for various trig and texture functions.

Playing with scale:
https://imgur.com/saCoSgC
https://imgur.com/a/9dQyPju

2fort, the vertical conc map:
https://imgur.com/a/NDmYBWs

Converting every color index in every palette in every texture pack to a single color:
https://imgur.com/a/GiNmwx4 My next idea is to replace every texture in the game to a random Fred spray, but I don't want to have to set my computer on fire afterwards.

I wanna see what you've done. If this is all being done in scripting, I am having the itch to emulate and expand upon it, possibly in conjunction with you, if you can explain what you want to accomplish.

EDIT: wait, you said.net classes. What are you developing this with specifically? IDE/language etc.
  
EmotionallyDisturbedParakeet
Super Regular
FatGuy With
A LittleGun

P: 09/18/2022 04:27 EST
E: 09/18/2022 04:27 EST
    About three years ago I was able to import 2fort into Unity, a rather sophisticated and free for hobbyists game development environment/engine.

I got stuck on converting texture coordinates, and also for converting the brushes into collision detection volumes that Unity could use (so I wouldn't have to re-write the brush collision detection routines in C#).

I'm wondering if I should find and resurrect that tinkering.
  
level1nobody
Super Regular
Cold Giver

P: 09/18/2022 04:29 EST
E: 09/18/2022 20:34 EST
    I don't think I have anything yet that's worth collaborating and expanding on. The biggest thing that I'm trying to accomplish really, is to say I did something myself. :) (And it's Powershell, but I'm assuming the class definition syntax is derived from .net.)

[snip]

I don't like keeping unfinished stuff out in the open. Let me know when you got the file?
  
EmotionallyDisturbedParakeet
Super Regular
FatGuy With
A LittleGun

P: 09/18/2022 06:44 EST
E: 09/18/2022 08:17 EST
    I got it.

Syntax looks like objective C mated with batch processing commands near a radioactive test site and a little bit of python got thrown in there.

Did you write all of this? Good work. It looks similar to others I've looked at.

So you're modifying the map and able to access the data, what are you currently doing with it, and what would you like to do with it? Are you stuck on something in particular? Or just having fun manipulating the map?

What precisely did you alter in the data? Did you just alter the geometry vectors? What about the brush/collision detection data? Those contain no geometry they are just planes that enclose the geometry, so you'd have to rotate the normals and offsets as well to get collision detection to work? Does collision detection work in your experiments or do you have noclip on?

This would be useful to convert the pertinent info to other file formats that can be imported into different programs. That's something I'd consider thinking about.
  
EmotionallyDisturbedParakeet
Super Regular
FatGuy With
A LittleGun

P: 09/18/2022 08:43 EST
    Here is the Q3 BSP loader code I wrote for my game engine. Very similar data structures.

https://www.dropbox.com/s/7pws93br7liii0s/LoadBSP.cpp?dl=0
  
level1nobody
Super Regular
Cold Giver

P: 09/18/2022 15:57 EST
E: 09/18/2022 16:03 EST
    Good stuff!

EmotionallyDisturbedParakeet wrote:
Did you write all of this? Good work. It looks similar to others I've looked at.
I did, though the variable constants came from BSP resources, such as http://hlbsp.sourceforge.net/index.php?content=bspdef
So you're modifying the map and able to access the data, what are you currently doing with it, and what would you like to do with it? Are you stuck on something in particular? Or just having fun manipulating the map?
I have other script files where I flail around trying to make something happen, like scaling and rotating. I'm just having fun manipulating the map and trying to slowly build up the class definition. I tried to at least get the classes to a point where you could add something in, and the header and lump offsets would be adjusted accordingly. Basically when the Bsp class gets written to file, it tells all its child classes to also write to file and update the header class accordingly.

What precisely did you alter in the data? Did you just alter the geometry vectors?
So far, mostly manipulation of vectors and points.

What about the brush/collision detection data? Those contain no geometry they are just planes that enclose the geometry, so you'd have to rotate the normals and offsets as well to get collision detection to work?
Yep, that's where I left off with the rotating.

Does collision detection work in your experiments or do you have noclip on?
That's the biggest PITA. Because each surface has offset planes for standing, crouching and monster, those offsets need to remain the same distance from each other when scaling the map. So correlating these collision planes has been a challenge.
  
level1nobody
Super Regular
Cold Giver

P: 09/18/2022 17:54 EST
    Come to think of it, something I'd like to be able to do in the future is carve little rooms and tunnels into old, popular maps.

Some maps have the source RMF data, which would make it easy. For the others, There are BSP editors I've tested. With them, you can add entities and stretch existing structures. But I don't believe you can just carve into them.

Imagine the basement of 2fort having a number of glass cases set into the walls, each functioning as kind of a Drippy's museum exhibit highlighting a person or story of the server. (This wasn't my prime intent in starting the project, just an example of a challenge I want to set for myself.)
  
EmotionallyDisturbedParakeet
Super Regular
FatGuy With
A LittleGun

P: 09/19/2022 10:00 EST
    Remind me is the rmf file the hammer editor native format, or is that what you get when you decompile a bsp?   
level1nobody
Super Regular
Cold Giver

P: 09/19/2022 13:23 EST
    I think rmf and jmf are the editor project files.  
kyree
Super Regular
Killer Scout

P: 09/19/2022 21:30 EST
    Wow, and here i was thinking I was cool learning.. htaccess  
mmarino51589
Super Regular
Soldier Flag
Defense

P: 09/19/2022 23:16 EST
    can you NERDS shut the fuck up

jk im rock hard reading this
  
EmotionallyDisturbedParakeet
Super Regular
FatGuy With
A LittleGun

P: 09/20/2022 17:34 EST
E: 09/20/2022 23:49 EST
    I was able to install an open source BSP loader in Unity3d. I'm not sure how to get the textures to import properly, but, it at least gives you access to mesh data and entities, depending how far down the rabbit hole with coding you want to go.

https://ibb.co/wBdqd6n
You therefore have dynamic control of the data at a programmatic level and also can view the modifications to the map in the editor without having to fire up tfc.

I can help you get started if you’re interested.
  
EmotionallyDisturbedParakeet
Super Regular
FatGuy With
A LittleGun

P: 09/21/2022 10:28 EST
E: 09/21/2022 10:29 EST
   
mmarino51589 wrote:
can you NERDS shut the fuck up

jk im rock hard reading this
Fuck you. This is the nerds corner. Go back to your rampant sexual intercourse and baby-making shenanigans, and let the nerds continue to have nerd internet intercourse discourse of course.

But seriously are you interested in BSP scripting Michael?

Are you?

DO YOU SUPPORT SPLITTING TRIANGLES AT PARTITION PLANES, OR DO YOU DUPLICATE MARK THE FACE IN EACH CHILD LEAF IN THE BSP TREE? WHAT'S YOUR STANCE ON THE ISSUE
  
mmarino51589
Super Regular
Soldier Flag
Defense

P: 09/21/2022 11:13 EST
    Honestly, it all is interesting

Can we talk about subnetting and lowest cost network routing metrics though? That'll make me ooze like the tip of an elmers glue squeeze bottle knocked on its side that wasn't fully closed
  
Matt_tfc
Super Regular
Shotgun Quick
Draw

P: 09/21/2022 19:41 EST
    "Can we talk about subnetting and lowest cost network routing metrics though?"

I'd rather wear a suit made of smoky bacon and walk around Tower Hamlets.
  
Page 1, 2 | Next Page
Forums > General Discussion (Archives) > Bsp scripting