Page 1 of 3

[FTEQW] CubiQuake

Posted: Tue Apr 09, 2019 12:39 am
by daemon
I'm just going to put this here and see what happens. :)

CubiQuake is open source GPL 3.0, and set up to be a framework for any cubic world project using the FTE Engine. (What people call voxels, which I've been informed is not the correct term for what people use it for, hence the name "CubiQuake".)

https://github.com/uowaep/CubiQuake

Read the readme, and get FTEQW! (FTEQW revision 5424 or higher is required.)

The project is in early stages, but stable. View distance isn't super far, but it is decent, and by far good enough for a dungeon crawler. Let me know what you think, or if you want to work on the project.

Video of the editor:
https://youtu.be/daxqYSIhHjQ

Re: CubiQuake

Posted: Tue Apr 09, 2019 11:54 pm
by frag.machine
Well, that's interesting. :)

I am having trouble to test it tho, since I cannot move (I supposed "X" should toggle between walk/fly and edit, but nothing happens), and it crashes frequently (see screenshot below).

Also, cubes are using the checkers default texture, meaning something is wrong in my mod installation.

https://imgur.com/cqSZgzJ

But I REALLY like the idea. I'll upgrade FTE to the latest stable and try it again.

Re: CubiQuake

Posted: Wed Apr 10, 2019 12:43 am
by daemon
frag.machine wrote:Well, that's interesting. :)

I am having trouble to test it tho, since I cannot move (I supposed "X" should toggle between walk/fly and edit, but nothing happens), and it crashes frequently (see screenshot below).

Also, cubes are using the checkers default texture, meaning something is wrong in my mod installation.

https://imgur.com/cqSZgzJ

But I REALLY like the idea. I'll upgrade FTE to the latest stable and try it again.
Try the latest FTE, as there are some things that Spike fixed specifically for this mod development. Everything *should* be working fine. I tested by installing from the repository and dropping the latest FTE client in the main directory. X only toggles edit mode off. That functionality is to allow normal impulses used to select weapons to automatically turn off edit mode. Any impulse other than the edit impulses turns if off. Pressing Q E C or V will turn it on and select the tool corresponding to the key. To fly just use noclip.

Re: [FTEQW] CubiQuake

Posted: Wed Apr 10, 2019 12:09 pm
by frag.machine
Yeah, as I said it's probably all my fault. :P But I really like the idea, it opens a lot of possibilities.

Re: [FTEQW] CubiQuake

Posted: Thu Apr 11, 2019 1:07 am
by daemon
If you're using a lower version than 5424 it is not going to work right. From the screenshot it looks like the version you're using might not even handle trisoup_simple. Btw I added a video to the main post.

Re: [FTEQW] CubiQuake

Posted: Thu Apr 11, 2019 2:10 am
by frag.machine
After upgrading FTE: https://imgur.com/MgVznDf
I was even able to build a wall: https://imgur.com/u3xMvJg
There are some little bugs creeping yet (there is a solid cube on this void leak): https://imgur.com/0PCUTJ9
But it's great! Now I want to punch trees and explore caves and mine diamonds! :D

Re: [FTEQW] CubiQuake

Posted: Thu Apr 11, 2019 2:32 am
by daemon
Ah you found it. I thought I eliminated that bug. I guess it's still there, just harder to reproduce than it use to be. I'm pretty sure it has something to do with using the remove tool and inadvertently selecting a buried cubic. It's likely the TraceCubic() function when called from the server.

Re: [FTEQW] CubiQuake

Posted: Thu Apr 11, 2019 2:40 am
by daemon
Another bug that is leaning in the "feature" direction is that when placing cubics you can select a location diagonal from the edge of another cubic rather than finding a face to build from.

Re: [FTEQW] CubiQuake

Posted: Thu Apr 11, 2019 4:04 am
by daemon
I figured out a way to reproduce it. Enclose an empty cubic with other cubics. The opposite of what I was thinking. Now to fix it. :P

Re: [FTEQW] CubiQuake

Posted: Thu Apr 11, 2019 10:56 am
by toneddu2000
So cool! Compliments!

Re: [FTEQW] CubiQuake

Posted: Fri Apr 12, 2019 12:22 am
by frag.machine
Replaced the textures: https://imgur.com/ltOoh8z :razz:

Okay, I have to make my taxes this weekend, but after that I'll study your code and may try to use it to build something. This brings so many opportunities...

Re: [FTEQW] CubiQuake

Posted: Fri Apr 12, 2019 2:53 am
by daemon
GetTextureForTypeFace() is at the top of cs_cubics.qc, you can add additional textures for new block types there.
Be sure to search for "int numblocktypes" def and update the value in sh_sv_cs_cubics.qc and add the additional block types there as well.

in cs_cubics.qc

Code: Select all

string GetTextureForTypeFace(float type, float facebit)
{
	string tex;
	
	switch(type)
	{
		case BLOCKTYPE_DIRT:	tex = "dirt";	break;
		case BLOCKTYPE_BRICK:	tex = "brick";	break;
		case BLOCKTYPE_BLOCK:	tex = "block";	break;
	}
	
	switch(facebit)
	{
		case FACE_TOP:		tex = strcat(tex, "_top");		break;
		case FACE_SIDE:		tex = strcat(tex, "_side");		break;
		case FACE_BOTTOM:	tex = strcat(tex, "_bottom");	break;
	}

	return tex;
}
and in sh_sv_cs_cubics.qc look for this

Code: Select all

.*int	cubic_blocktype;
int		numblocktypes = 3;
int		BLOCKTYPE_DIRT	= 1;
int		BLOCKTYPE_BRICK	= 2;
int		BLOCKTYPE_BLOCK	= 3;

Re: [FTEQW] CubiQuake

Posted: Fri Apr 12, 2019 4:01 am
by daemon
That draw bug is fixed now. There are still some weird selection bugs, but nothing should be breaking the saved world now as far as I know.

Re: [FTEQW] CubiQuake

Posted: Sat Apr 13, 2019 2:11 pm
by frag.machine
daemon wrote:GetTextureForTypeFace() is at the top of cs_cubics.qc, you can add additional textures for new block types there.
Be sure to search for "int numblocktypes" def and update the value in sh_sv_cs_cubics.qc and add the additional block types there as well.

in cs_cubics.qc

Code: Select all

string GetTextureForTypeFace(float type, float facebit)
{
	string tex;
	
	switch(type)
	{
		case BLOCKTYPE_DIRT:	tex = "dirt";	break;
		case BLOCKTYPE_BRICK:	tex = "brick";	break;
		case BLOCKTYPE_BLOCK:	tex = "block";	break;
	}
	
	switch(facebit)
	{
		case FACE_TOP:		tex = strcat(tex, "_top");		break;
		case FACE_SIDE:		tex = strcat(tex, "_side");		break;
		case FACE_BOTTOM:	tex = strcat(tex, "_bottom");	break;
	}

	return tex;
}
and in sh_sv_cs_cubics.qc look for this

Code: Select all

.*int	cubic_blocktype;
int		numblocktypes = 3;
int		BLOCKTYPE_DIRT	= 1;
int		BLOCKTYPE_BRICK	= 2;
int		BLOCKTYPE_BLOCK	= 3;
Followed your instructions, and added a fourth block type ("rock", using a single 64x64 texture from vanilla Quake just like your examples). At first I just changed worldname to world2 and tried to spawn a new world.
Apparently I did everything right, since I could see several blocks with my new texture, but when I tried to walk, the game crashed to desktop with this error: https://imgur.com/aQMKMII

Tried again, this time discarding all worlds and recreating from scratch. Same error. :(

Re: [FTEQW] CubiQuake

Posted: Sat Apr 13, 2019 8:36 pm
by Spike
assuming it just needs more ram, try:
pr_ssqc_memsize 256mb
along with this if you need it:
pr_csqc_memsize 256mb