Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
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] 2
1  Game Development / Newbie & Debugging Questions / Re: LWJGL/OpenGL texture transparency? on: 2014-03-26 01:43:37
1  
2  
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);


Should handle what you're looking to do.

For an in-depth look at the parameters, check http://www.opengl.org/sdk/docs/man2/xhtml/glBlendFunc.xml out.
2  Games Center / WIP games, tools & toy projects / Re: Fluffy Bunnies on: 2014-03-25 22:51:28
Aha Grin I'll be watching this, seems like a cool concept.
3  Games Center / WIP games, tools & toy projects / Re: Fluffy Bunnies on: 2014-03-25 22:44:18
Played it, took me a few minutes to realize that the bunnies and the wasps weren't dangerous Grin I couldn't figure out the key to pick up the button...maybe I didn't press enough buttons or it's not added yet Pointing Kudos to you for revisiting/continuing an 8-year old project...
4  Games Center / WIP games, tools & toy projects / Re: Rays on: 2014-03-23 21:27:39
BWAHHHH! GL HOW DID YOU DO SUCH WIZARDRY?

Accidental magic...
5  Games Center / WIP games, tools & toy projects / Re: Rays on: 2014-03-23 21:16:58
 Mac Grin
6  Games Center / WIP games, tools & toy projects / Re: Rays on: 2014-03-23 21:03:50
I didn't really get it Tongue When it started, half of the octagon was above the visible area, but when I resized it, it centered properly.
7  Games Center / Showcase / Re: Concept on: 2014-03-21 21:42:05
Have got to say, from the video, the block breaking is done fantastically...great job on that Smiley
8  Java Game APIs & Engines / Android / Re: Gamefield for androidgames on: 2013-04-10 15:37:05
Why don't you have all of your icons at 64x64, and then center them in the fields? If you want them to be exactly the size of the field, then you will either have to lock the size of the fields to 64x64, or draw your icons at every size that the grid could ever possibly be.
9  Java Game APIs & Engines / Android / Re: Gamefield for androidgames on: 2013-04-09 18:29:26
Can anyone tell us how to program a logic that can move gamestones on this field.

Nobody here is going to program your game for you. As ra4king says here: http://www.java-gaming.org/topics/hello/24411/msg/205121/view.html#msg205121, We are here to guide and point you, not write your code for you.

a logic that can move gamestones on this field but for different Displaysizes.

What is your question? Do you want to move objects around on the screen? If so, how are you drawing those objects? Do you want to draw a grid on the screen? If so, do you want the grid to have the same amount of cells in the x and y direction, regardless of screen size, or do you want them to be the same size apart, on any screen? Please clarify your question. No one has helped you yet, because no one knows what your question is.
10  Game Development / Newbie & Debugging Questions / Re: Simple Math Problem on: 2013-04-09 17:53:10

@Everyone talking about a semicolon
I must have mis-typed an older version of this code before CnPing it here, the code I'm using doesn't have the semicolon that you were all pointing out.


See my post above. I was didn't see a semicolon in my code, and therefore I thought something with the JRE/Java had gone wrong. Ironically, I was tested it on another computer, and because I typed it out instead of copy-pasting it it, the semicolon wasn't there, so (obviously) the code ran, making me even more suspicious of my java installation. In the end, it was just me mis-typing, and then not noticing, because I was so focused on the actual math. Tongue
11  Game Development / Newbie & Debugging Questions / Re: Simple Math Problem on: 2013-04-09 04:46:10
1  
2  
3  
4  
5  
int i = 0;
if (i > 25);
{
   System.out.println("0 is greater than 25........WHAT?!");
}


Stick out your hand.  * slaps it*
NO!
The semicolon on the end of your if-statement terminates it, turning the code below into a scope block

Ouch. That'l teach me to try to write code fast. How did I miss that all weekend long??  Emo Thanks for your help though Smiley
12  Game Development / Newbie & Debugging Questions / Re: Simple Math Problem on: 2013-04-09 04:06:47
This might sound REALLY stupid, but have you tried comparing one int against a another, larger int, just to see if the compare function works? Like:
It IS stupid. Look at that evil semicolon. Argh.
1  
2  
3  
4  
5  
int i = 0;
if (i > 25); <---- Evil
{
   System.out.println("0 is greater than 25........WHAT?!");
}

This prints true on my computer Huh. I have yet to figure out how to fix it, but I was wondering if you had the same issue. I'm thinking it might have to do with a corrupted JRE or something......
13  Game Development / Game Play & Game Design / Re: Procedural night sky on: 2012-08-30 02:14:04
Quote
<snip>All this code is in the jar, and folks are free to use it.

If anyone does, I'd be pleased to get a link to post so as to brag on my blog (in the works still) about writing code that is actually useful.  Smiley
I probably won't use the src, but I will use the inspiration! Looks amazing, and I am definitely going to put something like that in my game.
14  Discussions / Miscellaneous Topics / Re: Eclipse Juno on: 2012-08-22 21:46:14
No, I liked it too. So that makes at least two of us  Cool

Cas Smiley
Well, that's a relief. Cheesy
15  Discussions / Miscellaneous Topics / Re: Eclipse Juno on: 2012-08-22 21:42:40
Well, it runs a tiny bit slower on my Mac that is ~6 years old, if I turn the stupid animations off. :| I kept for the tasks, and some new error warnings. But, I must ask. Was I the only one that actually liked the old UI?
16  Game Development / Newbie & Debugging Questions / Re: What else should I know? on: 2012-08-16 21:58:26
Keep it simple. What I would suggest is to watch TheCodingUniverse's videos here: http://www.youtube.com/user/TheCodingUniverse and get the OpenGLSuperbible. Once you have gone through that, make a simple 2D game, and see where you are. If you still want to make your game, figure out if you are going to write your own game engine, or if you are going to use something else(like jMonkeyEngine). If you finally have a game engine and a rough game design, add single player first, and have a plan for converting over to multiplayer. If you have difficulty finishing projects, MP will not be your friend, so be warned Smiley
Sorry for the (sort-of) rant.

Good luck!
17  Discussions / Miscellaneous Topics / Re: What is wrong with me? on: 2012-08-12 22:04:25
OH!

Oh. Oh. Derp.

Order of calls! That is the issue here. What is happening, my fine friend is this:
1) MyGame Constructor is entered.
2) Game Constructor is entered.
3) Game initializer is called.
4) MyGame.setup is called.
5) MyGame.setup exits.
6) Game Constructor exits.
7) MyGame initialized is called.

Before anything except declaration (Not assignment) happens, the super class's constructor is called. After that returns, the assignment is allowed to happen.

Derrrrrrrrppppppp. That was a significant issue, as my whole game ran in the constructor like:

1  
2  
3  
setup();
run();
exit();


But it's fixed now, with adding a simple start() method. Thank you everyone for helping me. Smiley
18  Discussions / Miscellaneous Topics / Re: What is wrong with me? on: 2012-08-12 17:09:13
Gee, Thanks Cheesy
19  Discussions / Miscellaneous Topics / Re: What is wrong with me? on: 2012-08-12 16:44:30
Are all of you working under Linux / Mac OS X?
I'm on win 7 (64bit and 32bit) and NEVER had to restart Eclipse. EVER in over 3 years Smiley
I am working on Mac OS X Lion, and I don't have to restart too often. (1-2 months in between restarts).

Eclipse works like a like a rainbow unicorn for me. :3

Try rebooting your PC.
Rebooted, same problem. Also, it appears that the problem occurs system-wide, as my older eclipse(Indigo, kept it just in case in the upgrade to Juno screwed things up) has the same issue.
Nope, Win7 64! And Eclipse crashes on me about once a day or so! Though, it could be that my AV's a bit bitchy about things...

Oh! Ah... Should I tell you what your problem is? Because I think I know it. >.>

It's an inheritance issue. The code that you have up there? Try changing...
1  
2  
3  
4  
5  
6  
protected void setup()
   {
     
   }
to
protected abstract void setup();


Then say whether it works right. :3 If it does, I can explain why! :3
No, it doesn't. Sad Darn...I was hoping I fell asleep in Java 4 Newbs 101.Wink That would make everything a lot easier......
20  Discussions / Miscellaneous Topics / Re: What is wrong with me? on: 2012-08-12 16:03:04
I restarted! And... it still doesn't work properly. Cheesy
21  Discussions / Miscellaneous Topics / Re: What is wrong with me? on: 2012-08-12 15:27:03
Ok, I have done some debugging, and have found the cause of the error. It seems that if you have a protected method in the superclass, and you call it in it's constructor, it seems to just skip initializing the variables. However, if you call it in the subclass, it works great. I updated the code and it produces the error after a restart, and even after putting it in a new file. Also, I checked my build path, everything looks good, and it compiles fine.
22  Discussions / Miscellaneous Topics / Re: What is wrong with me? on: 2012-08-12 05:29:26
I will post it tomorrow. Off to bed, after I request conversion.
23  Discussions / Miscellaneous Topics / Re: What is wrong with me? on: 2012-08-12 05:24:41
Ok, Just tried my code. That works on my machine too, but the original code does not. Huh I don't know what I am holding back, but apparently something. Do you want me to pastebin my complete source?
24  Discussions / Miscellaneous Topics / What is wrong with me? on: 2012-08-12 05:03:30
I was working on my game engine, and it has a "Game" class.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
public abstract class Game
{
   
   public Game()
   {
      setup(); //If you call this method here, It will only initialize the variables to their default value
  }
   
   protected void setup()
   {
     
   }

}

and then I have my game's class, which extends Game.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
public class MyGame extends Game
{
   private boolean useShaderPipeline = true;
   
   public MyGame()
   {
      //if you call setup here, and not from the super constructor, everything works ok
  }
   
   protected void setup()
   {
      System.out.println(useShaderPipeline); //Prints false
     useShaderPipeline = true;
      System.out.println(useShaderPipeline); //Prints true
  }
   
   public static void main(String args[])
   {
      new MyGame();
   }

}


Ok, looks good so far. But wait... why does the println's return 0 and false respectively? It looks like they are at their default values. However if you initialize them inside of a method, they work fine.
My best guesses are:
1. I fell asleep in the java class where they told me about this. //HIGHLY LIKELY.
2. There are aliens in my computer.
3. This is a bug, or a corrupt JVM.

What are your thoughts/suggestions to resolve this?

P.S. If you hit tab while typing up up a post, it focuses you on the search bar. Sort of annoying when you are formatting code Cheesy (Just my $0.02)
25  Discussions / Community & Volunteer Projects / Re: [Wanted] Developers, Pixel Artists and Bgfxr on: 2012-08-06 22:24:41
Is this going to be programmed in pure java? Or are you using OpenGL/LWGJL?
26  Discussions / General Discussions / Re: Nerves of steel or just plain lazy? on: 2012-08-05 23:40:10
I am working on writing a "Game" class that all of the games using my engine will extend. Also working on a camera system that actually makes sense...  Roll Eyes
27  Game Development / Game Play & Game Design / Re: Game engines on: 2012-08-05 23:27:20
A wise man once said, "don't write game engines, write games!"

He was very wise.

But the people who wanted to write game engines and not games thought he was a dolt.
The people(like me) that thought: Oh yes. Let's write the next unreal, also thought he was a dolt. For the first 20 minutes. And then they realize why it is called "Unreal".
28  Game Development / Game Play & Game Design / Re: Game engines on: 2012-08-04 01:03:58
Haha, challenge accepted!
29  Game Development / Game Play & Game Design / Re: Game engines on: 2012-08-03 00:10:11
Maybe I should rephrase that. I meant what effects people would want if they were developing a game with it, but I didn't write that correctly Tongue
30  Game Development / Game Play & Game Design / Game engines on: 2012-08-02 22:59:08
Ok, so I am not 100% sure this is the correct board to post this in, but.....

I am building an game engine from scratch, and I was wondering: What do you think should be the bare minimum of graphics effects in a game engine that is written for a wide variety of 3d games? Edit: what effects would you want in a game engine if you were developing a 3d game with it?(e.g. Shadow mapping, particles, ?)
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (15 views)
2014-04-15 18:08:23

BurntPizza (13 views)
2014-04-15 03:46:01

UprightPath (26 views)
2014-04-14 17:39:50

UprightPath (12 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (51 views)
2014-04-10 04:04:31

BurntPizza (110 views)
2014-04-08 23:06:04

tom_mai78101 (210 views)
2014-04-05 13:34:39

trollwarrior1 (177 views)
2014-04-04 12:06:45

CJLetsGame (184 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!