Loading new textures while the game is running?

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

Loading new textures while the game is running?

by mauvebic » Fri Oct 26, 2012 18:48

My text api/signs3 mod is nearly done. The only hitch is you have to restart the game for the new textures to take effect, which doesn't cut it for me.

Combine can sortof create a new texture while the game is running, so long as youre combining textures that were loaded at startup, so same problem, my texs are being generated while the game is running.

Is there anything in the API that allows for the dynamic loading of textures, or am i gonna have to start looking to patching the engine? (if thats possible)
Last edited by mauvebic on Fri Oct 26, 2012 18:50, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Fri Oct 26, 2012 23:08

Can you load in a dummy image and then replace that image in game? You may have to write over the image cache.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sat Oct 27, 2012 00:40

the engine reads all the textures once at startup and that's it, no facilities to introduce new textures while it's running... which sucks cuz i can generate textures with text from within the game, i just can't use them until i restart. :(
Last edited by mauvebic on Sat Oct 27, 2012 00:41, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sat Oct 27, 2012 09:22

Isn't there something in jin-xi's painting mod that generates new images?

http://minetest.net/forum/viewtopic.php?id=2588
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Oct 27, 2012 10:32

Topywo wrote:Isn't there something in jin-xi's painting mod that generates new images?

http://minetest.net/forum/viewtopic.php?id=2588

This mod creates a object that contains the pixels. It doesnt create textures.
Last edited by PilzAdam on Sat Oct 27, 2012 10:33, edited 1 time in total.
 

jin_xi
Member
 
Posts: 165
Joined: Mon Jul 02, 2012 18:19

by jin_xi » Sat Oct 27, 2012 11:24

early versions used entities for single pixels, now it does indeed generate textures, see tile.cpp
textures on entities can be switched with set_properties. so there is a node for the "canvas", and on it an entity to switch textures.
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sat Oct 27, 2012 13:10

Painting mods' no help either, uses "[combine:" which means its textures already exist at startup.

I can't use combine, since the texture doesn't exist until text2png() is called. My way has the added advantage of being able to chose font face, size and color, though as it stands the sign only shows up on restart. :/

simple white on black sign in verdana:Image
Last edited by mauvebic on Sat Oct 27, 2012 16:07, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sun Oct 28, 2012 16:50

Still stuck on this.
Last edited by mauvebic on Sun Oct 28, 2012 16:56, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Oct 31, 2012 06:39

Entities can dynamically change Textures.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 16 guests

cron