Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About effects. #10

Open
juliolitwin opened this issue Mar 6, 2021 · 5 comments
Open

About effects. #10

juliolitwin opened this issue Mar 6, 2021 · 5 comments

Comments

@juliolitwin
Copy link

Hello, I would like to thank you for the excellent project!

I don't know much about the D language, but this project and roBrowser are being a great reference for learning. I am looking to start a project in Unity 3D, but due to several factors, I believe that there is a "problem", which are the effects. Many look like they are hardcoded, have you gotten to check them out? Is there anything we can do to get them and convert?

Cheers!

@Temtaime
Copy link
Owner

Temtaime commented Mar 6, 2021

There're effects that use .str files(storm gust for instance) and, sadly, other hardcoded ones which can only be implemented in the code.
We need to reimplement hardcoded ones.

@juliolitwin
Copy link
Author

How are progress in about of rendering (assets, models, animations, sprites, waters and etc), have you managed to get 100%? Only pending would be the question of the effect? Or are there other issues pending?

And thanks for responding so fast lol

@Temtaime
Copy link
Owner

Temtaime commented Mar 6, 2021

.rsw's water is semi-done, also i don't know how to render correctly the lights. On some maps lights look good, but on other ones there're overexposure and underexposure.
.spr and .rsm are rendered 100% correctly.
.str is rendered almost correctly i think.
0 hardcoded effects are reimplemeted.

Main goal for now is to implement missing UI parts, in-game interaction, etc.

@juliolitwin
Copy link
Author

Sensational project. :]

I even received a snippet code from an example of the hardcoded, I am trying to replicate it on Unity, but it is something very specific to RO.

For example of what the structure looks like:

void	CRagEffect :: Portal()
{
	if (m_stateCnt == 0) {
		vector3d & pPos = g_modeMgr.GetGameMode()->GetWorld()->m_player->m_pos;
		g_prim = LaunchEffectPrim(PP_3DCYLINDER);
		g_prim->m_duration = m_duration;
		g_prim->m_arcAngle = 36.0f;
		g_prim->m_outerSize = 3.5f;
		g_prim->m_innerSize = 3.5f;
		g_prim->m_longSpeed = 4.0f;
		g_prim->m_heightSize = 40.0f;
		g_prim->m_alpha = 0;
		g_prim->m_maxAlpha = 128;
		g_prim->m_alphaSpeed = g_prim->m_maxAlpha / 6;
		g_prim->m_fadeOutCnt = g_prim->m_duration - 6;
		g_prim->m_texture = new CTexture* [g_prim->m_totalTexture];
		g_prim->m_texture[0] = g_texMgr.GetTexture("effect\\ring_blue.tga");

		g_prim = LaunchEffectPrim(PP_3DCYLINDER);
		g_prim->m_duration = m_duration;
		g_prim->m_arcAngle = 36.0f;
		g_prim->m_outerSize = 4.0f;
		g_prim->m_innerSize = 4.0f;
		g_prim->m_longSpeed = 5.0f;
		g_prim->m_heightSize = 50.0f;
		g_prim->m_alpha = 0;
		g_prim->m_maxAlpha = 128;
		g_prim->m_alphaSpeed = g_prim->m_maxAlpha / 6;
		g_prim->m_fadeOutCnt = g_prim->m_duration - 6;
		g_prim->m_texture = new CTexture* [g_prim->m_totalTexture];
		g_prim->m_texture[0] = g_texMgr.GetTexture("effect\\ring_blue.tga");
	}

	if (m_stateCnt % 14 == 0) {
		g_prim = LaunchEffectPrim(PP_3DCIRCLE);
		g_prim->m_duration = 30;
		g_prim->m_deltaPos2.y = -1.0f;
		//g_prim->m_renderFlag |= RF_NODEPTHCHECK;
		g_prim->m_innerSize = 8;
		g_prim->m_latitude = 90;
		g_prim->m_matrix.MakeXRotation(GetRadian(g_prim->m_latitude));
		g_prim->m_radiusSpeed = 1.0f;
		//g_prim->m_radiusAccel = -(g_prim->m_radiusSpeed / (g_prim->m_duration + 40)) * 2.0f;
		g_prim->m_radiusAccel = -(g_prim->m_radiusSpeed / g_prim->m_duration) / 2.0f;
		//g_prim->m_alpha = 200;
		g_prim->m_fadeOutCnt = g_prim->m_duration - (g_prim->m_duration / 2);
		g_prim->InitSegment();
		g_prim->m_texture = new CTexture* [g_prim->m_totalTexture];
		g_prim->m_texture[0] = g_texMgr.GetTexture("effect\\ring_blue.tga");
	}
}

Another question, is there any discord to the project?

@wjrosa
Copy link

wjrosa commented Mar 11, 2021

For the specific Unity implementation we have a discord for UnityRO: https://discord.gg/ZnDhAEGv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants