Page 1 of 1

Moon Quartet Revisit: Spheric map

Posted: 30 Aug 2013, 16:51
by [Fx]Doo
Hello folks !
I'm actually working on a remake of the well known "Moon Quartet" Map.
My idea is to get a Spheric map (Or at least, a semisphere that spring would handle).
EDIT1: Picture of that map running in Spring 0.94
http://imageshack.us/a/img12/7361/w4ag.png

//
I've got the height map and textures fully done and i can get it to work.

But some issues remain with the gameplay and visual effects on those maps.
- How to make units able to move on the whole sphere like the sphere had its own gravity field -> Fixed with Maxslope = 80 and Upright = False
EDIT2: Some pictures with units fighting over the map:
http://imageshack.us/a/img689/6919/a85t.png
http://imageshack.us/a/img20/8379/n0ti.png
http://imageshack.us/a/img585/2186/ju6m.png
http://imageshack.us/a/img546/679/5wsh.png
http://imageshack.us/a/img822/3007/4bjj.png


//
- How to make Buildings bend depending on the map slopes. -> I can set Maxslope = 80, And levelground = False, but i still need something that would work like Upright = False, ...
Edit 4:

Code: Select all

if (gadgetHandler:IsSyncedCode()) then
	function gadget:UnitCreated(unitID, unitDefID, unitTeam)
		local ud = UnitDefs[unitDefID]
		if ud.isBuilding then
			x,y,z=Spring.GetUnitPosition(unitID)
			x,y,z=Spring.GetGroundNormal(x,z)
			degreeX=math.floor(math.atan2(x, z)*(180/3.14))
			degreeY=math.floor(math.atan2(x, y)*(180/3.14))
			degreeZ=math.floor(math.atan2(z, y)*(180/3.14))
			Spring.SetUnitRotation (unitID, degreeX, 0, degreeZ)
			end	
	         end
	end
--> There goes the rotation gadget but its effect looks a bit ... random. It does not look like the variables are right. I'll fix it anyway (Thanks for the help CarRepairer, qpicasso and Knorke!) (Pic coming soon)

Edit 5: This got fixed ! http://img18.imageshack.us/img18/4816/ybns.png
http://paste.springfiles.com/view/690ebfed
[/color]

- How to fix weapons such as High traj plasma cannons, artillery, and nukes so that it can work properly AND be realistic. -> Should be fixed with FixedLauncher for missile launchers but somehow the result is not the one expected at all...


- How to fix some pathing issues (Tanks would move everywhere but at an ultra slow speed while they should be able to run at maxspeed. -> Any idea?

-How to make the sphere irregularities not crossable by vehicles so it gets more realistic. (Vehicles are not allterrains, they are only supposed to cross the sphere but not the hills ! --> Fixed using custom Typemap with differents Movementspeeds for tanks on the hills.


I'll edit with some pictures and some links to the beta versions of the map. I hope you guys will help me get this to work so we can bring a whole new gameplay to Spring!


EDIT3: Link to .sd7 file: OLD
http://springfiles.com/spring/spring-ma ... t-revision

Link to .sd7 file: (0.2)
http://springfiles.com/spring/spring-ma ... revision-0

Re: Moon Quartet Revisit: Spheric map

Posted: 30 Aug 2013, 16:58
by Anarchid
The amount of modifications for what you plan already kinda makes it a new game on a special map, rather than just a new map.

You will likely need to fully override projectile behaviours and break a lot of engine assumptions to do this. You will also be severely inconvenienced if you start your mod using old examples and technologies, such as COB scripts. Much of what you want is much easier to do in/with LUS.
somehow the result is not the one expected at all...
Namely, you reported them firing on the wrong axis, but i kinda missed which one. Try emitting fake lasers from the weapon's firing piece so you can be sure where it's pointing at.
but i still need something that would work like Upright = False, ...
two approaches:
1) in animation script, check the slope of terrain under your building and do some Turn commands based on that math.
I believe ZK's vehicle units are actually upright, and are rotated by script in exactly this way, but i might be mistaken.
2) make a gadget that will do that for every building by injecting commands into unit's script via (i believe) CallAsUnit. Consult the AnimatorGUI gadget for an example.
How to fix weapons
By fully taking over their physics. And probably aiming, while at it.

Re: Moon Quartet Revisit: Spheric map

Posted: 30 Aug 2013, 17:57
by SinbadEV
couldn't you do a flat map and apply some kind of "fish eye" shader to fake it?

Re: Moon Quartet Revisit: Spheric map

Posted: 30 Aug 2013, 18:29
by The Yak
Spherical map would be hard... and not possible without lots of lua at the very least. What would be less cool but much easier is to make a circlular map using /voidground or /voidwater and typemap off the outside area.

Re: Moon Quartet Revisit: Spheric map

Posted: 30 Aug 2013, 19:09
by CarRepairer
SinbadEV wrote:couldn't you do a flat map and apply some kind of "fish eye" shader to fake it?
Exactly what I was thinking. It would be far easier than the numerous hacks that were outlined!

Re: Moon Quartet Revisit: Spheric map

Posted: 30 Aug 2013, 20:56
by [Fx]Doo
I'm not trying to fake it. I guess that would be a lot easier but that'd not be as great as if it was real. Just imagine the new gameplay.

Re: Moon Quartet Revisit: Spheric map

Posted: 30 Aug 2013, 22:12
by CarRepairer
Image

Image

Re: Moon Quartet Revisit: Spheric map

Posted: 31 Aug 2013, 10:41
by PicassoCT
question.. if you have half of the moonsphere allready.. wouldnt cars shadder draw the other half? Ift tweaked properly..