Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
500 textures?; A way around it?
Topic Started: Jul 29 2006, 02:03 PM (285 Views)
migileke
Unregistered

Hey again!

I'm making an RPG, and for the inventory and everything I all need to use DrawTex(). But I've looked in the step event and it says:
Code:
 
if texture<0
or texture > 499
teture = 499

So, that means I can only have 500 textures? I'm not there yet (by far), but I feel that it's a large but not endless number. If I removed the "or texture>499" line, would it still work? Or do I have to make a system that only 499 textures can be loaded at the same time (with overwriting and stuff)?

This question doesn't need to be solved quickly, I have time (about 450 textures to go ^_^ )
Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Yes, this is one of the limits of U3D. You can't use more than 500 manually managed textures at the same time. But I think this limit is really high enough. If you need more than 500 different texture files at the same time something must be wrong ^_^ . For menus I recommend the use of DrawTexEx and textures that contain multiple graphics (e.g. one for the button when it's unchanged, one for the button when the mouse is over it and one for the button when it's pressed). This makes many things easier.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
My recommendation for the GUI is that you draw the whole GUI including buttons etc. and then make sub-textures (you have the same GUI texture but with one of the buttons highlighted that indicates that this button is a mouse-over-button). Then you do this for all the buttons in the GUI. By doing so you don't have to have many separate objects for every button instead you just need one single object for the GUI. Then you can simply do like this to know if your mouse is over the button:
Code:
 
if (mouse_x > self.x+something && mouse_y > self.y+something && mouse_x < self.x+something && mouse_y < self.y+something)
  {mouse_over[1] = true;}else
  {mouse_over[1] = false;}
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply