New Contributor -> New Menus

Everything related to the code /
Tout ce qui touche au code
Post Reply
fred
Posts: 5
Joined: Sun Jan 13, 2008 2:13 pm

New Contributor -> New Menus

Post by fred » Mon Jan 14, 2008 2:52 pm

Hello ! I'm a big fan of TA, and I decided to contribute a little to this very nice project :)

So I started with the easiest thing to modify, and I made new menus with blender.
They can be rendered at any resolution, and they use very little original TA art.
Tell me what you think of it and maybe I can go on and do buttons / scrollbars / cursor and ingame GUI :)
I can provide the blender source files but I'd need some kind of ftp-server to upload them.

PS : do you have an IRC channel ?
PPS : all my work is under this nice license :
http://sam.zoy.org/wtfpl/


User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Mon Jan 14, 2008 3:02 pm

Wow, looks very cool :) There is something fallout-like style here :) Thanks for your participation !!

Let`s see what others will say :D

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Jan 14, 2008 3:10 pm

Wow !! Looks really nice !!

Looks like we're starting a new skin :wink:
=>;-D Penguin Powered

fred
Posts: 5
Joined: Sun Jan 13, 2008 2:13 pm

Post by fred » Mon Jan 14, 2008 5:02 pm

I have a few questions :
-> what is the tga format used ? after I save them with gimp, they don't display anymore.
-> is it possible to have buttons sprites at a higher resolution than the one used currently ?
-> where are located the graphics used for the ingame GUI ?

(btw i'm using linux only)

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Jan 14, 2008 5:12 pm

yeah a Linux user :wink: !!

TA3D should support TGA, but you may have to add an alpha channel for TGA files, JPG is supported as well (alpha channel is set to 0xFF because JPG doesn't support alpha channel ).

gui graphics are in gfx/, with a default_skin directory where the skin sprites are stored, but this is defined in the gui/default.skn file and can be changed. For example if you create a skin named modern_skin, you'll store its widget data in gui/modern_skin.skn and tell TA3D to look for the sprites in gfx/modern_skin/...

Currently TA3D doesn't support skin dependent backgrounds, I am working on it, it will need a suffix. For example TA3D needs to load gfx/intro.jpg, you told it the skin suffix was _mdrn, it will load gfx/intro_mdrn.jpg instead to fit the skin needs.

-> is it possible to have buttons sprites at a higher resolution than the one used currently ?
I am working on it, everything will be set in the .skn file, you'll have your widget images and tell TA3D the scale of it on screen (will be scaled again to fit full screen mode so you don't get buttons with very small borders that doesn't fit the background scale)
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Jan 14, 2008 5:42 pm

Current SVN version provides an advanced skinning mechanism, there are 2 skins : the default one (default.skn) and the modern.skn skin using the _mdrn suffix.

With this you should be able to make a great skin. I'll keep improving the skin mechanism for widgets.
=>;-D Penguin Powered

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Jan 14, 2008 6:31 pm

widgets can be scaled now (current SVN, I've just commited :) ). Just add a scale variable in the .skn file (used in both default.skn & modern.skn in the SVN version).
=>;-D Penguin Powered

fred
Posts: 5
Joined: Sun Jan 13, 2008 2:13 pm

Post by fred » Mon Jan 14, 2008 7:02 pm

Bon, c'est un peu stupide d'etre deux francophones à parler anglais ^^

- J'ai un petit souci, je n'arrive pas a changer le skin en cours. je cliques modern et ca revient à l'écran de départ sans avoir changé le skin.
- sinon a quoi correspondent les x1,x2 etc... dans les fichiers de configuration ?
- est il possible de changer l'épaisseur des bordures de border_windows.tga par exemple ?

mici :P

User avatar
AF
Administrateur - Site Admin
Posts: 139
Joined: Thu Dec 28, 2006 8:19 pm
Location: NW UK
Contact:

Post by AF » Mon Jan 14, 2008 7:19 pm

translation?


www.ta3d.darkstars.co.uk and ta3d.darkstars.co.uk work just as well as each other

fred
Posts: 5
Joined: Sun Jan 13, 2008 2:13 pm

Post by fred » Mon Jan 14, 2008 8:54 pm

ok, i'll keep it in english :)
So :
- I am currently unable to change the GUI skin in the options : if I try to change, it goes back to the main menu without changing the skin.
- what is the meaning of the various coordinates in the skin configuration files ?
- is it possible to change the border width of widgets such as "window_borders.tga"

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Jan 14, 2008 10:10 pm

try to empty the cache (in ~/.ta3d/cache) it might conflict with some updated files.

the coordinates in the .skn file are the coordinates of two points on the widget sprite. In fact it's the rectangle in the middle of the widget that will be stretched to fit the given size, whereas the part outside this rectangle is the border that will be stretched in a way that preserves border width.

you can change border width easily, just change the scale variable, it works exactly the same way for all widgets (they all use the same SKIN_OBJECT class).

Also the main menu doesn't have a skin at the moment, skin will affect all other screens, but not the main menu.

PS: oui effectivement entre français on pourrait parler notre belle langue mais nous ne sommes pas seuls sur ce forum :D
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sat Jan 19, 2008 9:31 am

We are one step away from implementing TA campaign in TA3D :) Some OTA-Style GUI would be also very wellcome

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Jan 19, 2008 10:00 am

Yes, we'll need a campaign screen, and a single player screen too, so we can have 4 buttons in a OTA like main menu:
single player
multi player
options
exit

and a credits button integrated in the background ... :D
=>;-D Penguin Powered

User avatar
AF
Administrateur - Site Admin
Posts: 139
Joined: Thu Dec 28, 2006 8:19 pm
Location: NW UK
Contact:

Post by AF » Sat Jan 19, 2008 10:16 pm

I would think that while TA is the basis, that doesn't mean we have to follow it to the letter. If TA was perfect there'd be no need for this project.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Jan 19, 2008 11:04 pm

That's why we are making skins for GUI :D . But unfortunately the functions in menus cannot be modified by skins, you can modify the *.tdf & *.area files but you can only remove functions or add widgets that won't call any function. Well except for orders you can give through the cInterface system, but at the moment it can only play/pause the music.

So we'll have to add menus and I think we can keep current main menu (just update it) and add a new main menu which uses the GUI module, so we still have the choice.

You said it AF, TA is the basis and we don't have to follow it to the letter, so let's add options and features that can be turned off so that people can have their own GUI.
=>;-D Penguin Powered

User avatar
AF
Administrateur - Site Admin
Posts: 139
Joined: Thu Dec 28, 2006 8:19 pm
Location: NW UK
Contact:

Post by AF » Mon Jan 21, 2008 1:14 pm

Why not use a lua based skinning system then? Combined with a set of lua in betweens that implement the old OTA stuff.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Jan 21, 2008 1:49 pm

a Lua based skinning system ... hm that's interesting. This require to develop more the script module : add a Lua thread system, the possibility to call Lua functions from the GUI module, and add a Lua communication Layer in the main loop so we can have access to everything from Lua code :D.

I'll add this on the TODO list !
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests