How do I change the image??

Talk about graphics, 3D models, nice sprite sheets, music, sound effects and anything related to the presentation of your game (not code :)).

How do I change the image??

Postby empty1501 » Sat May 17, 2014 2:28 am

I want to load an image using texture/textureatlas or somthing ele (I don't know for sure), then change or remove it with a click.
How can I do that?

Anyone that could help ?
empty1501
 
Posts: 4
Joined: Sat May 17, 2014 2:11 am

Re: How do I change the image??

Postby empty1501 » Sat May 17, 2014 4:40 pm

Anyone help me, please !!
empty1501
 
Posts: 4
Joined: Sat May 17, 2014 2:11 am

Re: How do I change the image??

Postby jonald » Sat May 17, 2014 5:03 pm

I don't think anyone can help you if you don't know what you want to do.
jonald
 
Posts: 96
Joined: Wed Jan 08, 2014 12:23 am

Re: How do I change the image??

Postby empty1501 » Sat May 17, 2014 5:18 pm

jonald wrote:I don't think anyone can help you if you don't know what you want to do.


I want to load an image from assets, then change or remove it. I just don't know I have to use texture or textureatlas in this situation.
empty1501
 
Posts: 4
Joined: Sat May 17, 2014 2:11 am

Re: How do I change the image??

Postby jonald » Sat May 17, 2014 5:29 pm

A texture atlas is used to group several images together into one big texture. You then use texture regions to know which part of that big texture to draw. This improves performance because if you use several textures, you have to switch between them during every frame. Switching between them can be quite costly.

So, if you just have one image you want on screen you can happily use texture. If you have more than you should probably use a texture atlas.

Hope that helps.
jonald
 
Posts: 96
Joined: Wed Jan 08, 2014 12:23 am

Re: How do I change the image??

Postby empty1501 » Sat May 17, 2014 5:45 pm

Thanks, it's very helpful
empty1501
 
Posts: 4
Joined: Sat May 17, 2014 2:11 am

Re: How do I change the image??

Postby adanesic » Wed May 28, 2014 4:24 pm

I agree with jonald. And about adding/removing your sprite, you can check if the mouse is clicked or not with an instance of InputProcessor (http://tinyurl.com/n2yp92m). Then according to that you can add/delete your sprite.
eXclusive by adanesic
adanesic
 
Posts: 87
Joined: Thu Apr 24, 2014 9:25 am

Re: How do I change the image??

Postby Elsie797 » Thu Dec 27, 2018 6:42 am

empty1501 wrote:I want to load an image using texture/textureatlas or somthing ele (I don't know for sure), then change or remove it with a click.
How can I do that?

Anyone that could help ?


I think I am also facing this issue. Did you get any proper solution?
Elsie797
 
Posts: 1
Joined: Thu Dec 27, 2018 5:54 am


Return to Game Art

Who is online

Users browsing this forum: No registered users and 1 guest