[FTEQW] CubiQuake

The home for dedicated threads to specific projects, be they mods, tools, or independent games.
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

[FTEQW] CubiQuake

Post 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
Last edited by daemon on Wed Apr 10, 2019 2:58 am, edited 3 times in total.
-daemon [ daemonforge.org ]
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: CubiQuake

Post 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.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

Re: CubiQuake

Post 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.
-daemon [ daemonforge.org ]
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: [FTEQW] CubiQuake

Post 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.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

Re: [FTEQW] CubiQuake

Post 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.
-daemon [ daemonforge.org ]
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: [FTEQW] CubiQuake

Post 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
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

Re: [FTEQW] CubiQuake

Post 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.
-daemon [ daemonforge.org ]
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

Re: [FTEQW] CubiQuake

Post 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.
-daemon [ daemonforge.org ]
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

Re: [FTEQW] CubiQuake

Post 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
-daemon [ daemonforge.org ]
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: [FTEQW] CubiQuake

Post by toneddu2000 »

So cool! Compliments!
Meadow Fun!! - my first commercial game, made with FTEQW game engine
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: [FTEQW] CubiQuake

Post 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...
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

Re: [FTEQW] CubiQuake

Post 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;
-daemon [ daemonforge.org ]
daemon
Posts: 81
Joined: Wed Nov 07, 2007 11:10 pm
Contact:

Re: [FTEQW] CubiQuake

Post 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.
-daemon [ daemonforge.org ]
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: [FTEQW] CubiQuake

Post 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. :(
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: [FTEQW] CubiQuake

Post by Spike »

assuming it just needs more ram, try:
pr_ssqc_memsize 256mb
along with this if you need it:
pr_csqc_memsize 256mb
Post Reply