Laser Textures

Laser Textures

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Laser Textures

Post by Forboding Angel »

Pardon me for asking something that has been answered a zillion times, but what is the correct way to fix the laser textures?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Laser Textures

Post by jK »

Sorry if it has said already a zillion times, but speak in whole sentences. Ppl can't read your mind...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Laser Textures

Post by KDR_11k »

Forboding Angel wrote:Pardon me for asking something that has been answered a zillion times, but what is the correct way to fix the laser textures?
They work fine, why fix them?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Laser Textures

Post by smoth »

what is broken? if you have that little | at the front then set a non existent texture for the tip
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Laser Textures

Post by zwzsg »

My bet on: "Use image sizes that are power of 2."
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Laser Textures

Post by Forboding Angel »

Ahh so they must be an exact size now instead of like 100x153 it would need ot be 100x154 or 100x152?

Thanks Zwzsg.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Laser Textures

Post by Argh »

Not divisible by 2, power-of two. As in, 64 X 128 :-)
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Re: Laser Textures

Post by Snipawolf »

2
4
8
16
32
64
128
256
512
I hope you really don't need to go to 1024 for a laser texture.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Laser Textures

Post by Forboding Angel »

Ack, thanks argh and snipa, would have helped a bit if I read into the actual wording of what zwzsg said. Woe is me, ./wrist to forehead, and all that good stuff lol.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Laser Textures

Post by Forboding Angel »

Code: Select all

    texture1           = "megaparticle",
    texture2           = "empty",
    texture3           = "empty",
    texture4           = "empty",
Nothing has worked so far. And it has nothing to do with being divisible by powers of 2. Is the above no longer an accepted format for defining laser textures?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Laser Textures

Post by Argh »

Code: Select all

    texture1           = "megaparticle",
    texture2           = "",
    texture3           = "",
    texture4           = "",
Should work. Dunno, I do that with TDF, and just put "foo" as the string, where "foo" is not a real texture named in Resources.tdf.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Laser Textures

Post by Forboding Angel »

well I already have an empty=empty.tga; in resources.tdf

I really dunno what's going on here.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Laser Textures

Post by Argh »

Does empty.tga actually exist? I usually pointed my stuff to "foo", where "foo" does not exist, and is not named in Resources.

If it does... maybe it's not formatted correctly, etc. Use a 8X8 pixel TGA, IIRC, 2 and 4-pixel ones don't seem to actually work right.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Laser Textures

Post by Forboding Angel »

hmm that could be it, it's a 2x2, I'll try that.

Edit: Nope no joy. I tried everything I could think of. Removed the empty=empty.tga; entry from resources too and got the exact same results.

Unfortunately I can't find the link to the changelog cause the answer is probably there :-/
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Laser Textures

Post by Forboding Angel »

This is a screenie of the largest laser, it should be omgwtfbbq large. Also, it comes from the sky (5k up to be exact) and the texture is oriented incorrectly.
screen000.jpg
screen000.jpg (200.47 KiB) Viewed 1986 times
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Laser Textures

Post by KDR_11k »

Waaaaaaaaaait... Those are multiple billboarded sprites! Forb, that's not a laser, that's a cannon.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Re: Laser Textures

Post by Guessmyname »

KDR_11k wrote:Forb, that's not a laser, that's a cannon.
Flip the 'b' around and you have HitchHiker's Guide to the Galaxy...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Laser Textures

Post by Forboding Angel »

KDR_11k wrote:Waaaaaaaaaait... Those are multiple billboarded sprites! Forb, that's not a laser, that's a cannon.
Can you put that into english for me?

Code: Select all

local weaponDefs = {
  deathray = {
    areaOfEffect       = 500,
    avoidFeature       = false,
    avoidFriendly      = false,
    beamWeapon         = true,
    cegTag             = "electricbolt",
    collideFeature     = false,
    collideFriendly    = false,
    commandfire        = true,
    coreThickness      = 3,
    duration           = 0.5,
    energypershot      = 250000,
    explosionGenerator = "custom:NUKE",
    fallOffRate        = 0.1,
    fireStarter        = 90,
    guidance           = true,
    id                 = 666,
    impluse            = "1",
    interceptedByShieldType = 1,
    largeBeamLaser     = true,
    lineOfSight        = true,
    metalpershot       = 0,
    name               = "Doom Laser",
    range              = 200000,
    reloadtime         = 180,
    renderType         = 0,
    rgbColor           = "1 0.5 0",
    rgbColor2          = "0 0 1",
    soundHit           = "18402_inferno_xplo.wav",
    soundStart         = "doomlaser2.wav",
    startVelocity      = 5000,
    sweep              = "1",
    sweepfire          = true,
    targetMoveError    = 0,
    texture1           = "megaparticle",
    texture2           = "empty",
    texture3           = "empty",
    texture4           = "empty",
    thickness          = 120,
    tolerance          = 50000,
    turret             = true,
    weaponVelocity     = 5000,
    damage = {
      default            = 25000,
    },
  },
}
unitDef.weaponDefs = weaponDefs


--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
Looks like a laser to me... Am I missing something?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Laser Textures

Post by KDR_11k »

Maybe some nonsense with that rendertype tag. I just use weaponType on everything (would be weaponType="LaserCannon", here).

BTW, "impluse" is misspelt
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Laser Textures

Post by Argh »

Yes, use weaponType, always. Much cleaner.
Post Reply

Return to “Game Development”