1 (edited by aopst 2016-12-13 17:11:50)

Topic: Laser sight with shotgun and game.png models dimensions

Hey, got three questions:
1. Is there any client that provides some laser-sight-thing to weapons when button is pressed? I recently discovered ddnet client (using gamer atm) and in the move playing on the main page there's gameplay and you can see guide yellow/red lines coming out of weapons. I think it would help me with close combat as I sometimes lose sight of my crosshair.

2. I would like to play around with skins but can't find any kind of template to the game.png file to know exactly how big are the model rectangles.
[update]
// found it on the last page on this thread - https://www.teeworlds.com/forum/viewtop … 75&p=3

3. Is there any way to adjust the background colour upon turning on gfx_full_clear option? I found that editing basic tiles was just modifying the \data\editor\entities_clear.png but no idea how to adjust the background. Not sure if the command is in the other clients but it changes to the map view without any skins on and showing weapon spawns.

2

Re: Laser sight with shotgun and game.png models dimensions

aopst wrote:

Hey, got three questions:
1. Is there any client that provides some laser-sight-thing to weapons when button is pressed? I recently discovered ddnet client (using gamer atm) and in the move playing on the main page there's gameplay and you can see guide yellow/red lines coming out of weapons. I think it would help me with close combat as I sometimes lose sight of my crosshair.

Clients that provide gameplay advantages (such as this) are commonly considered as cheats and banned here.
e last page on this thread - https://www.teeworlds.com/forum/viewtop … 75&p=3

aopst wrote:

3. Is there any way to adjust the background colour upon turning on gfx_full_clear option? I found that editing basic tiles was just modifying the \data\editor\entities_clear.png but no idea how to adjust the background. Not sure if the command is in the other clients but it changes to the map view without any skins on and showing weapon spawns.

This command is specific to this client, and you won't be able to change that color without working with the sources and recompiling.
I remember I had made a version where you could change the color of the background, but I forgot if that change made me it to the last published version. Shoulda check.

Edit:
Indeed it was not released in the last version, unfortunately. Although you can easily hardcode your own background color, as long as you're able to compile Teeworlds.
Instructions:
- Go to src/engine/client/client.cpp, line 957
- In this code:

void CClient::Render()
{
    if(g_Config.m_GfxClear || g_Config.m_GfxFullClear)
        Graphics()->Clear(0.3f,0.3f,0.6f); // produce a blue background - standard one is yellow

Change 0.3f, 0.3f, 0.6f by any RGB color code (see http://www.rapidtables.com/web/color/RGB_Color.htm ).
- Compile.

Not Luck, Just Magic.

3

Re: Laser sight with shotgun and game.png models dimensions

@Dune
Appreciate the reply and digging through the code, not really that urgent feature so I don't think I'll bother with compiling it myself. One more thing though - I noticed the skins even though have same dimensions in game.png they appear in different sizes in-game, guess that's also hardcoded? (nades launcher bigger than shotgun). Just wanted to make them appear as rectangles to simulate laser sight but sg is still pretty short.

4

Re: Laser sight with shotgun and game.png models dimensions

The size of each sprite is effectively hard coded.

5

Re: Laser sight with shotgun and game.png models dimensions

aopst wrote:

@Dune
Appreciate the reply and digging through the code, not really that urgent feature so I don't think I'll bother with compiling it myself. One more thing though - I noticed the skins even though have same dimensions in game.png they appear in different sizes in-game, guess that's also hardcoded? (nades launcher bigger than shotgun). Just wanted to make them appear as rectangles to simulate laser sight but sg is still pretty short.

Yeah that's a thing from the vanilla Teeworlds. Do you want some tips to make different sizes work?

Not Luck, Just Magic.