Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Libgdx overlapping opaque widgets on: 2014-06-28 02:16:40
Nnnno.
The opened tab would be dark (=less transparent) and the not opened ones bright (=more transparent).
For your problem (as it looks in the pictures): Maybe you can use an offscreen texture to only store the alpha channel (overwriting, not adding!) and draw the whole thing with that alpha map?

Just a quick thought...
Pretty sure you meant this


It doesn't really matter to me, I ended up with the other way around because of the template that was given.

Either way, I couldn't get this to work on my codes.


And tbh, I've been confused when you guys talk about textures. From what I know, I can load an image to a Texture. I can then have the sprite batch draw them in the render function. I could also have Image from scene2d.ui store the texture.

But I don't understand how this can help me with my 2 Buttons and Scrollpane. They both load there skins from my .json file.
2  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Libgdx overlapping opaque widgets on: 2014-06-28 00:20:07
Just by the way, why don't you just make the opened tab less transparent (=more visible) than the others?
And make the panel underneath with the same alpha as the opened tab?

That won't solve my problem. I still have the same situation.
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Libgdx overlapping opaque widgets on: 2014-06-27 11:46:37
Render to texture, with varying alphas, then render texture with overall alpha multiplier. Other than that, why do you need this?

Right now, I'm creating the UI for a lobby. The lobby includes a chatroom.

This is what I want


This is what I have



The reason I need them to overlap is because of that round corner.
I can easily fix this by making the corner sharp and do some adjustments like,


But I'm pretty dedicated to this minor issue Tongue

Edit: The tabs will change alphas as I select different ones
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Libgdx overlapping opaque widgets on: 2014-06-27 11:29:45
Render everything to a texture (with alpha = 1.0) and then render the texture with the desired alpha.

Sorry, I forgot to mention that the widgets will have different alpha values from each other. So If I put one widget with a higher alpha value underneath another widget, you should see the lower alpha value at the area where the two widgets are overlapping.
5  Java Game APIs & Engines / Engines, Libraries and Tools / Libgdx overlapping opaque widgets on: 2014-06-27 10:31:15
Hello,
Let's say I have 2 or more widgets. They all have a non integer alpha value. They're also overlapping. Assuming the following 3 circles are my widgets, this is what we should expect to see.



However, my goal is to have them appear like so,



With the help from this, I was able to succeed doing this with shaperenderers. However, I couldn't figure out how to do this with widgets. Unless I searched for the wrong situation, I couldn't find a solution to this problem anywhere else either.

I hope I didn't left anything out
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
@Override
public void show() {
     skin = new Skin(Gdx.files.internal("data/uiskin.json"));
     stage = new Stage(new FitViewport(1100, 640));

     Button b1 = new Button(skin, "tab");
     b1.setBounds(330, 370, 70, 40);

     Button b2 = new Button(skin, "tab");
     b2.setBounds(350, 370, 70, 40);
     
     stage.addActor(b1);
     stage.addActor(b2);
}


1  
2  
3  
4  
5  
6  
7  
   public void render(float delta) {
         Gdx.gl.glClearColor(0, 0, 0, 1);
         Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
                 
         stage.act(Gdx.graphics.getDeltaTime());
         stage.draw();
}


How would I accomplish this?
Thanks in advance!
6  Game Development / Networking & Multiplayer / Re: Applet - Mysql communication in php-made website? on: 2013-07-31 23:08:32
I don't think the complicated handshake method should be used because it doesn't prevent any hackers, just gives the hackers much more work to do.

I looked online and it seems that people are saying that it isn't possible. But then how does games like runescape prevent this?

Is it possible to make the php recognize the applet or only accept request from the same host?

Finally, does Applet to Servlet communication have the same issue? 'Cause It seems that the issues will be the same but perhaps there's something different about servlets than php that allows to close this security gap.

Thanks
7  Game Development / Networking & Multiplayer / Re: Applet - Mysql communication in php-made website? on: 2013-07-31 08:50:18
Thank you so much. I had a feeling we could use php but I had trouble finding decent php - java tutorials online. I started testing with php and it seems great.

I've looked on security issues with applet and it being "hackable" (still dont fully understand the processs), but in the link that you've provided, how can we avoid the security issues?

If I'm going to guess the process of "hacking" it, it will be this(correct me if I'm wrong):
1. I think that people can download the java applet and read the codes.
2. They'll learn what the url to the php file is and what parameter that it takes.
3. Make a script (whether it's a php script or something else) that send POST/GET data to the php file with his own score.

If I'm correct with above, than how can we avoid this situation? I'm having difficult thinking of a solution where high scores get sent from the applet to a php file without specifying the php file url and the parameters.


Thanks for responding btw Smiley
8  Game Development / Networking & Multiplayer / Applet - Mysql communication in php-made website? on: 2013-07-29 04:25:10
I'm new in this community so hello! Smiley

Me and a friend is working on a multiplayer browser game.
I'm in charge of coding the game in Java while my friend is in charge of coding the homepage and forums with php.

Lets say the java applet has a login screen in which the user types in his/her user info and will log in if the authorization is successful.

A lot of sources recommended me to use servlets to do this. I spent a lot of time studying servlets and came up with this:

User types user & pass in java applet and presses enter
Username and encrypted pass goes to servlet while applet listens for response
Servlet compares username and pass with data in database
If matches, servlet retrieves user info (level, xp, skills) from database and sends it back to the applet
applet receives info and do whatever

Unfortunately, since my friend is using php and I require java, there appears to be a conflict. Only way to run java servlets is if I have java/tomcat hosting. I tested this with appfog and cloudbees however it seems that php cant run in tomcat.

So this makes it seem like I have to choose between my friend using jsp(not an option) or I'll have to find an alternative method.

Does anyone have any other methods they would recommend or a solution to the above problem?

Thanks!
 
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (37 views)
2014-07-24 01:59:36

Riven (38 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (50 views)
2014-07-17 23:47:54

danieldean (42 views)
2014-07-17 23:41:23

MustardPeter (44 views)
2014-07-16 23:30:00

Cero (60 views)
2014-07-16 00:42:17

Riven (57 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!