Re: SCP-860 implementation list + discussion

#94
Mirocaine wrote:Updated main post.
Spoiler
Image
I'm willing to help you with the Blitz3D part. I still have the room and the source code, I can update that quickly and merge it with MonocleBios' code (but I don't have this).

Re: SCP-860 implementation list + discussion

#95
juanjpro wrote:
Mirocaine wrote:Updated main post.
Spoiler
Image
I'm willing to help you with the Blitz3D part. I still have the room and the source code, I can update that quickly and merge it with MonocleBios' code (but I don't have this).
Yeah I PM'd him to ask where he might of placed the latest source code build.. I think he mentioned something about only being able to access it in December. Anyhow I'm working on just finishing up the assets real quick so this can be as smooth as possible.....

Re: SCP-860 implementation list + discussion

#96
As promised here's the writeup. Wall of text incoming:

I'm gonna assume you know how to replicate risingstar's step algorithm in B3D, just make sure the tile values are stored in a dim array. I can't remember what Miro wanted it seeded to, but it shouldn't change too much.

Like the Pocket Dimension and other non-seeded rooms, stick the forest at the edge of the room array (can't remember what it was called, just follow Regalis' pattern and it should be fine) When you add the room to the FillRoom function, load each asset into the room's objects array, and hide them.

As for tile generation, I used event state as a global timer, and the remaining 2 event states as tile coordinates. So basically, every few frames or so, read from the forest dim array, copy the appropriate mesh from the room's object array, enable collision, do other stuff to the tile, place tile at an awkward positive Y coordinate to prevent clipping into the PD, increment stuff, and continue until the forest is finished. When the player leaves the forest you can just re-initialize the dim array(s) to delete everything. (You should probably define tile as a type and store them in dims so you can keep track of how many trees/other stuff there are per tile and use the index to appropriately hide stuff. I was going to do this to fix stuff, but never got around to it)

During generation, the GPU doesn't take that great of a hit in performance. The greatest drop anyone's ever recorded was an average of 1-2 FPS, so you don't need to worry about how often or when the forest generates a tile.

My optimization code was pretty meh, it was incredibly sloppy in order to get a quick release within a few days or so. (Ironic, isn't it?) Apparently, B3D's renderer isn't that effective at hiding things that aren't in the camera's range, so I had to do that manually. (Again, if you index tiles and their contents, this is much easier on the CPU as you can just use the player's position) Tree's are pretty simple, just slap em' on the tile however you wish. Same for rocks. I can't exactly remember how I got the leaves to work, but I'm pretty sure I made them separate from the trees, though, that could just be because I have no idea how to export stuff with fragmotion. I never really got Miro's grass to work well up close due to B3D's renderer doing weird things over the Z axis. I only ever got two benchmark reports, so I didn't have a very accurate depiction as to how optimized the entire thing was. But from what I've seen, the GPU takes a pretty heavy load when I introduce leaves to the forest. I still have no idea why this is, but my guess is that the renderer doesn't like rendering too many alpha textures.

We never really did anything with the monster, and I don't know if the concept is even finalized, but I'd recommend against using A* or an equivalent algorithm for movement. It just doesn't feel worth it with the lack of complexity it's design currently has. That and just remember to load all the data for it when the game starts, rather than when the forest generates.

So that's basically what I did with the forest, everything else was really easy or was for dev purposes.

If something doesn't make sense or I forgot something, let me know.

Good luck.

oyea, risingstar said he might work on it, which is pretty cool.

[insert skeptical comment about how this project will never be finished because nobody bothers to keep interest in it longer than a week here]
M-x dingus-mode

Re: SCP-860 implementation list + discussion

#98
Alright thanks for the write up monocle,

I have all the assets still; so it's easy to get them into the forest again. I have another windows laptop so I can take a while to convert all the props from fragMOTION to .b3d.
Still need to do the monsters animations, that's always tough. Then again it's also tough to ask someone to spend a great deal of time to do the forest code and stuff. Honestly we could do a very basic version with release and keep adding onto it. I think that will renew some enthusiasm.

Re: SCP-860 implementation list + discussion

#99
juanjpro wrote:I'll see what I can do to optimize the forest. Could you describe the forest's generation algorithm? It's the only thing I need to port it to Blitz3D.
It made paths by stepping through an empty array. Made use of direction variables for traversal, then added the last row manually. Special tiles were added by placing nodes during the generation of the main path.
M-x dingus-mode

Re: SCP-860 implementation list + discussion

#100
MonocleBios wrote:
juanjpro wrote:I'll see what I can do to optimize the forest. Could you describe the forest's generation algorithm? It's the only thing I need to port it to Blitz3D.
It made paths by stepping through an empty array. Made use of direction variables for traversal, then added the last row manually. Special tiles were added by placing nodes during the generation of the main path.
Thanks, now I have an algorithm that seems to be good enough. Here's a sample:
Spoiler

Code: Select all

2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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