Posted: 24th Apr 2021 20:20
I'm toying with a little shooter. Super old-school, so it uses "sprites" for enemies. (simply a plane with an image)

Righ now, I have a single sprite and I can move about with WASD and mouse.

Alas, I have already run into some trouble:
1) The view seem to get somewhat flimsy when I drag the mouse while moving left/right. I can't put my finger on why it feels wrong, it just does.
2) if I set my FOV somewhat high, the sprite ends up looking weird if I get too close. I wonder if this is a problem caused by using "real" 3D instead of the fakery of DOOM and such.

I consider using a fixed X rotation, so the player can't look up and down. But I think it'll ends up feeling weird when you're used to free movement.

Any tips, tricks suggestions?

Sources here:
https://kasper-hviid.itch.io/generic-retro-shooter?secret=gdnKBE9JyRMiQd2DEu3c5dStoQ
Posted: 25th Apr 2021 0:35
@basic i love the sprite
1) The view seem to get somewhat flimsy when I drag the mouse while moving left/right.

Thats because you are strafing left/right (sidestepping) so that is normal i feel

if you want to add splats to walls etc like blood etc take a look at this example (last two posts)
https://forum.thegamecreators.com/thread/222027?page=4
Posted: 25th Apr 2021 14:03
Thanks for the splat. Looks good!

Funny thing is, I started writing this game because I thought you might need some code to adjust the lighting on the fly inside your racing game, but then I got sidetracking into trying to finally make a 2?D shooter. So feel free to use my dev.agc
Posted: 25th Apr 2021 14:12
Thanks
Illuminating everything i do like this
+ Code Snippet
#constant IlluminationImageID=CreateImageColor(255,255,255,255)
#constant NormalMapID=CreateImageColor(128,128,255,255)

function setupIlluminationShader(objectId as integer,imageId as integer, bones as integer)
///////////////////////////////////////////////////////////////////////
/*

    SetObjectImage(ObjectID,DiffuseImageID,0)
    SetObjectImage(ObjectID,IlluminationImageID,1)
    SetObjectNormalMap(ObjectID,NormalImageID)
    SetObjectImage(ObjectID,SpecularImageID,3)
SP_Illumination_AddObject(ObjectID,DiffuseImageID,NormalImageID,SpecularImageID,IlluminationImageID)
*/
/*/
if bones=0
	SetShaderConstantByName(Illumination_ShaderID,"normalSize",1.0,0,0,0)
	SetShaderConstantByName(Illumination_ShaderID,"specularPower",90.0,0,0,0)
	SetShaderConstantByName(Illumination_ShaderID,"illuminationGlow",1.0,0,0,0)
else
	SetShaderConstantByName(IlluminationBones_ShaderID,"normalSize",1.0,0,0,0)
	SetShaderConstantByName(IlluminationBones_ShaderID,"specularPower",90.0,0,0,0)
	SetShaderConstantByName(IlluminationBones_ShaderID,"illuminationGlow",1.0,0,0,0)
endif
*/	            
	SetObjectImage(objectId,imageId,0)  //mixamorig:LeftHand
	setobjectimage(objectId,illuminationImageID,1)
	SetObjectNormalMap(objectId,NormalmapID)
	SetObjectColorEmissive(objectId,20,20,20)

child as integer
for child = 1 to GetObjectNumChildren(objectId)
	SetObjectImage(GetObjectChildID(objectID,Child),imageID,0)
	SetObjectImage(GetObjectChildID(objectID,Child),illuminationImageID,1)
	SetObjectNormalMap(GetObjectChildID(objectID,Child),NormalMapID)
	SetObjectColorEmissive(GetObjectChildID(objectID,Child),20,20,20)
next child
/*
if bones =0	
	SetObjectShader(objectId,Illumination_ShaderID)
else
	SetObjectShader(objectId,IlluminationBones_ShaderID)	
endif	
	//setobjectcoloremissive(objectId,150,150,150)
*/
endfunction


and if you see the attached video that was an attempt with the shader being used to paint cars it needs work but instead of a splat image this is just
a coloured square being applied
Posted: 25th Apr 2021 14:42
If i could work out how to apply it to an object face rather than a vertex location it should work better
for the way the object is texture mapped