Show Posts
|
|
Pages: [1] 2
|
|
1
|
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.
|
|
|
|
|
2
|
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.
|
|
|
|
|
3
|
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. 
|
|
|
|
|
4
|
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??  Thanks for your help though 
|
|
|
|
|
5
|
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 . 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......
|
|
|
|
|
6
|
Game Development / Game Play & Game Design / Re: Procedural night sky
|
on: 2012-08-30 02:14:04
|
<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.  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.
|
|
|
|
|
8
|
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?
|
|
|
|
|
9
|
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  Sorry for the (sort-of) rant. Good luck!
|
|
|
|
|
10
|
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. 
|
|
|
|
|
12
|
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  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.  Darn...I was hoping I fell asleep in Java 4 Newbs 101.  That would make everything a lot easier......
|
|
|
|
|
14
|
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.
|
|
|
|
|
16
|
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.  I don't know what I am holding back, but apparently something. Do you want me to pastebin my complete source?
|
|
|
|
|
17
|
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(); } 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() { } protected void setup() { System.out.println(useShaderPipeline); useShaderPipeline = true; System.out.println(useShaderPipeline); } 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  (Just my $0.02)
|
|
|
|
|
20
|
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".
|
|
|
|
|
23
|
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, ?)
|
|
|
|
|
26
|
Discussions / General Discussions / Re: What's your dev rig?
|
on: 2012-07-23 22:45:56
|
iMac, Late 2006. 2GB RAM, 2.16 GHz Intel Core 2 Duo, and a GeForce 7300 GT 128MB Runs smooth as silk Also, I target my games to run really smooth on that, so anything that supports OpenGL 2.1+ should run it just fine 
|
|
|
|
|
29
|
Game Development / Newbie & Debugging Questions / Shadow Mapping, minus the GLUT
|
on: 2012-06-29 02:36:06
|
Recently I have been working on shadow mapping, and have found some(what look like) good tutorials. However, they all are in C++ and they all use GLUT. It looks like they need this line: 1
| glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH); |
If I understand it correctly, I shouldn't need to worry about the first 3 modes, But I am guessing I need either a render buffer, or some sort of pixel format in display.create() to replace the fourth mode. Or am I wrong, and I don't need that at all?  Any help is greatly appreciated. ~OpenGLShaders
|
|
|
|
|
30
|
Games Center / Featured Games / Re: Overbind
|
on: 2012-06-25 17:23:02
|
Argh. Apple why you no support openGL 3+?? When I can use 3.0+ I'll definitely try it out, looks great.
OS X 10.7+ should actually now have support for OpenGL 3.2, however you've got to specially request it when creating the context. I WAS going to do some work on shadows today. Sigh.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|