Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

134 Neutral

About Hankenstien

  • Rank
  1. Hey,   I am creating a dynamic level manager that creates new "Dungeons" , for a better word, every time you enter the instance of a game.  I have a ruff though on how I wanted to accomplish this, but I have one key component missing how to connect modular 3d models in-game to create one large model.   Basically, I have a bunch of rooms with different layouts that all have an entrance and an exit.  when I want to combine them I just want to take the exit from model 1 and the entrance to model 2 and glue them together so that the resulting room now only has one entrance and one exit.  At this point I can start the process over and add the next room to that newly created room.    Do I have to keep track of vertices and have a class that just knows where each room starts and stops or can I actually combine the 2 models into one and not have to worry about that?  This may be a stupid question and that's why I can't find the answers for it, but if you can give me any guidance that would be much appreciated.   EDIT:   I have decided to just keep the position of the rooms then create a translation to that position in the world Matrix.  I was really hoping to have them all connected, but this is the direction I will head in unless someone thinks there is a better way.
  2. Hankenstien

    Creating buttons and TextFields in Java AWT

    I have a game loop that has an update and render method and I need ui components that can be rendered to the screen.  I got it answered here http://www.gamedev.net/topic/659643-buttons-that-have-a-render-method/.  
  3. Hankenstien

    buttons that have a render method

    Excellent!! Thanks Lysy that articale will give me something to read at work today.
  4. Hankenstien

    buttons that have a render method

    Sorry Lysy what I want to know is am I doing what you would do to create components for a UI on a game that uses a loop for updating and rendering objects to the screen.  Is there another way to make UI's for this type of game since the screen is getting redrawn 60 times a second or whatever I have it limited to.  I just want to know the correct way to do it.
  5. I posted the other day in Graphics and Therory forum and I don't think I phrased my question right.  Maybe this is more of a beginners question anyways.  I want to make a UI for a game.  My game uses a game loop that calls update and render methods.  So as of right now I am making  a button class that implement MouseListener/ MouseMotionListener.  These buttons are very basic they have:  -Rectangle2D for the button its self  -they have a boolean called "hover"  that is set to true if the mouse is contained in that Rectangle2D  -they have a render method to render it to the screen   There is a bit more code and I am simplifiing the process a bit, but am I on the right track or should I be doing something different.
  6. Hankenstien

    Creating buttons and TextFields in Java AWT

    Never mind I'm an idiot, sorry for bothering you all.
  7. I'm pretty good at java swing gui's, but since I have been working with java's awt class I have found nothing of buttons or textfields.  So I have been creating them myself.     So My question is "Am I being Stupid and just over looking something really easy"?  on a side not if on the slight chance that I am doing things correctly my thought is mimicking the swing buttons and making classes like them.
  8. do you mean just a random float that is less than what i subtracted added back into the amount or just subtracting a random float from the value to get the new value?     Normally you would use floor(value * 255.0f + 0.5f) to convert your [0, 1] value to a 24-bit image. Instead use floor(value * 255.0f + random), where random is a float in the range [0, 1]. You can see the effect this has here.   Thanks Chris this explains a lot with problems I have been having.
  9. do you mean just a random float that is less than what i subtracted added back into the amount or just subtracting a random float from the value to get the new value?
  10. Thanks a lot Glass_Knife!  It works great!
  11.   I have been playing around with creating a UI in Java's awt class.  I made a drop down menu that animates open and close when hovering.  Right now I have a linear gradient that runs from the top of the drop down to the bottom and I don't like the look of it.  I want the gradient to still go from top to bottom, but each Rectangle2D in the menu should have a solid color of that gradient.  I want to use a for loop to progress throught the menu's rectangles and fill each with a slowly darkening/lightening shade of the first color or maybe slowly progress from one color to another.    Something like this is what I was thinking but the color seem to jump from dark to light and its not a smooth transition.   int tempColor = 0x0000ff;   for(int i = 0; i < rectList.size(); i++){         tempColor -= (i * 10);// if I was wanting a red transition I think I might multiply by 10000         g.setColor(tempColor);         g.fill(rectList.get(i));//fills with new gradient color         g.setColor(Color.black);         g.draw(rectList.get(i));//border     }   On a side note this is the first time I have ever asked for help online, but thought I would give it a try.  Any help would be appreciated.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!