Show Posts
|
|
Pages: [1] 2 3 ... 5
|
|
2
|
Games Center / Archived Projects / Re: "Zombies in mah house" - GGJ 2011 Entry
|
on: 2011-02-02 02:15:13
|
Cheers for the feedback! Yeah I'm really not proud of the network stuff (only in that we could show people could actually see each other in the same room across the LAN) - the code is a mess. I liked the autodiscovery part too, first one to start on the LAN is the server, everyone else then autoconnects as clients. Yeah there are a LOT of things not right with it but we had to totally cut corners. I'd also farmed most of the gameplay elements off to two students, so when you read '22 mins remaining' on the clock and you realise you still have to integrate the sound system, you kinda accept some of the clunkier parts! Funnily enough we started off with tile-based map and the artists promised nice blended tiles for terrain/environment. Then they dropped that, popped in a single full screen texture of a bedroom (?) and got one of the student programmers to upload it. It wasn't a very good image either, but then one of the artists left, the promise of better graphics (and more of them) never appeared, and the last artist went AWOL before the start of the final day. So, artist-less and programmer strong, we fell back upon the tile map and drafted some quick 'programmer art' and somehow managed to win the day!  Overall it's GREAT fun - if you can attend one of these things I'm sure you won't regret it!
|
|
|
|
|
5
|
Java Game APIs & Engines / JOGL Development / Re: Textures have blue tint suddenly in Ubuntu after update, no java/jogl change
|
on: 2010-05-02 12:02:35
|
Aha! http://www.java-gaming.org/topics/transparency-problem-since-java-1-6-0-20/22305/view.htmlThis pointed me in the right direction. There was an update to Java in that Ubuntu update. a quick switch from: 1
| glu.gluBuild2DMipmaps(target, GL.GL_RGB8, img.getWidth(), img.getHeight(), GL.GL_RGB, GL.GL_UNSIGNED_BYTE, dest); |
to: 1
| glu.gluBuild2DMipmaps(target, GL.GL_RGB8, img.getWidth(), img.getHeight(), GL.GL_BGR, GL.GL_UNSIGNED_BYTE, dest); |
sorted this out. (this code chunk applies to textures without alpha, that are mip-mapped)
|
|
|
|
|
6
|
Java Game APIs & Engines / JOGL Development / Textures have blue tint suddenly in Ubuntu after update, no java/jogl change
|
on: 2010-05-02 11:27:36
|
After an update in Ubuntu (Karmic) suddenly all my apps that use JOGL have a blue tint. I know this isn't strictly a java question, but it's seriously hampering my game development. On the ubuntu forums there's a hint that people see this with Totem video player, but I don't get that. It's only with my opengl apps, even the older ones where I haven't changed the code or libraries for years. Anyone else had this experience and know of a fix? I've tried reinstalling the Nvidia drivers, that changes nothing. I've also tried grabbing the latest Nvidia drivers from their site but that doesn't fix it either. Thanks in advance for anyone that finds a fix - I'm sick of everyone looking like a blue smurf! 
|
|
|
|
|
8
|
Java Game APIs & Engines / JOGL Development / Objects lit with OpenGL lighting fade to black on rotate (old bug I'm sure)
|
on: 2010-01-02 04:15:04
|
3 MB WMV movie showing the issue: http://vault101.co.uk/downloads/fog_glitch.wmvIt's late/early (however you view it) and my brain is fried. When rotating the camera left/right and even up/down any object that is lit using OpenGL lighting fades to black the further we get from an imaginary sweet spot. I'm sure I've hit this issue before and can't remember how I solved it, or what was causing it. A quick search on this forum and another opengl one turned up nothing obvious but I'm half asleep  sample of the code - removed a load of setup junk included loading textures - hopefully this is useful in solving this, I've pseudo coded a heap of the tree/terrain junk as it's very lengthy and spread across heaps of class files. I just have my fingers crossed that I can find how I solved this last time (searches subversion repository logs) or someone can go "Ah yeah it's cos of this..."  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
| pre() { ortho_mode();
gl.glClearColor(fog_colour[0], fog_colour[1], fog_colour[2], fog_colour[3]);
gl.glFogf(gl.GL_FOG_START, near_distance); gl.glFogf(gl.GL_FOG_END, far_distance); gl.glFogfv(gl.GL_FOG_COLOR, fog_colour, 0); gl.glFogi(gl.GL_FOG_MODE, gl.GL_EXP); gl.glFogf(gl.GL_FOG_DENSITY, fog_density);
gl.glEnable(gl.GL_FOG);
gl.glEnable(gl.GL_LIGHTING); gl.glEnable(gl.GL_LIGHT0);
if (!gl.glIsEnabled(gl.GL_DEPTH_TEST)) { gl.glEnable(gl.GL_DEPTH_TEST); } }
main_loop() { draw_perspective(); draw_ortho(); }
draw_perspective() { if (!perspective_mode) perspective_mode();
gl.glLoadIdentity();
gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL); glu.gluLookAt(MEngine.g_Camera.m_vPosition.x, MEngine.g_Camera.m_vPosition.y, MEngine.g_Camera.m_vPosition.z, MEngine.g_Camera.m_vView.x, MEngine.g_Camera.m_vView.y, MEngine.g_Camera.m_vView.z, MEngine.g_Camera.m_vUpVector.x, MEngine.g_Camera.m_vUpVector.y, MEngine.g_Camera.m_vUpVector.z);
pseudo -> turn off depth testing
pseudo -> draw sky box
pseudo -> turn on depth testing
pseudo -> turn on face culling (front)
pseudo -> draw terrain using display lists
pseudo -> cull face (back)
pseudo -> draw billboards
pseudo -> draw trees using display lists
pseudo -> turn off depth testing
pseudo -> turn off face culling
}
draw_ortho() { if (!ortho_mode) ortho_mode();
}
perspective_mode() { gl.glMatrixMode(gl.GL_PROJECTION); gl.glPopMatrix(); gl.glMatrixMode(gl.GL_MODELVIEW); gl.glPopMatrix(); if (!gl.glIsEnabled(gl.GL_CULL_FACE)) gl.glEnable(gl.GL_CULL_FACE); if (!gl.glIsEnabled(gl.GL_DEPTH_TEST)) gl.glEnable(gl.GL_DEPTH_TEST); }
ortho_mode() { if (gl.glIsEnabled(gl.GL_CULL_FACE)) gl.glDisable(gl.GL_CULL_FACE); if (gl.glIsEnabled(gl.GL_DEPTH_TEST)) gl.glDisable(gl.GL_DEPTH_TEST);
gl.glMatrixMode(gl.GL_PROJECTION); gl.glPushMatrix(); gl.glLoadIdentity(); gl.glOrtho(0, SL.getInt(SL.I_SCREENWIDTH), SL.getInt(SL.I_SCREENHEIGHT), 0, 0, 1); gl.glMatrixMode(gl.GL_MODELVIEW); gl.glPushMatrix(); gl.glLoadIdentity(); } |
|
|
|
|
|
11
|
Java Game APIs & Engines / JOGL Development / Re: Catch 22 for jogl
|
on: 2009-12-02 23:14:20
|
I'd just like to say I'm eternally grateful for the work people have done maintaining GL4Java (Sven/Ken + others) years ago and in turn JOGL. It's helped me to learn loads about OpenGL using my main programming language (Java) without having to get back up to speed in C++ and I've been able to realise a lot of project ideas that were kicking around my head. This is not a pro-JOGL / anti-LWJGL post (LWJGL is awesome too), I'm just showing my appreciation to contributors. Thanks!  On the anagram, I'm growing to like 'JUMP' ... it's catchy.
|
|
|
|
|
12
|
Discussions / Miscellaneous Topics / Re: John Carmack QuakeCon 09 Keynote
|
on: 2009-08-23 23:24:20
|
During the development of the games that made him and id software big, he had few committments and was doing what he loved day in day out - games programming. Now he has other committments and is doing what he loves *now* - X prize/rocket challenges - so I think it's only natural that life and other interests have started to take time away from his once constant love of games programming... http://www.armadilloaerospace.com/n.x/Armadillo/Home/NewsThat's not to say he won't continue to drive excellent tech in his own company and with others (still on the Open GL ARB too I think?) but he himself has sung the praises of others doing grand job (e.g. Epic) and knows id software couldn't rule the roost forever. Besides, he just wanted "to make great games". Don't worry Doom fans, I'm sure he'll take time out his rocket building and make time for games when it counts: (from ArmadilloAerospace) : "John has been so busy with his duties at id Software" 
|
|
|
|
|
14
|
Java Game APIs & Engines / JOGL Development / Re: JOGL GPU affinity
|
on: 2009-07-01 00:41:18
|
Sven Goethel - the man who's efforts originally got me into OpenGL with Java  I'd be wondering about a similar thing - I'm using the GPU to do computation work rather than graphics work for another project and I'd considered putting 2x graphics cards into one dev system, one cheap one for the display and one powerful one for the computational work. But like kristopher I'd been puzzled how to instruct JOGL to use the correct GPU.
|
|
|
|
|
15
|
Java Game APIs & Engines / JOGL Development / JOGL + GLSL: 1 texture ok, 2 textures = black
|
on: 2009-07-01 00:11:18
|
Whenever I use a GLSL shader that uses one texture, the shader works perfectly. Simple test, three spheres one texture each:  Whenever I use a shader that uses more than two or more textures, the shader results in pure black output. After using several more complex shaders with similar results I boiled this down to one very basic shader that still doesn't work: 1 2 3 4 5 6 7 8
| void main() {
gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = ftransform(); }
|
1 2 3 4 5 6 7 8 9 10
| uniform sampler2D tex; uniform sampler2D abc;
void main() { vec4 color = texture2D(tex,gl_TexCoord[0].st) * texture2D(abc,gl_TexCoord[0].st); gl_FragColor = color; }
|
This is what this looks like in ShaderDesigner. Note I've cut up the screen a bit so you can see more dialog boxes:  and this is the result in my JOGL app:  This is how I'm sending the uniform variables: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| gl.glClientActiveTexture(GL.GL_TEXTURE0); gl.glBindTexture(GL.GL_TEXTURE_2D, OpenGL.textureLoader.getGLTextureArray()[texture[2]]);
gl.glClientActiveTexture(GL.GL_TEXTURE1); gl.glBindTexture(GL.GL_TEXTURE_2D, OpenGL.textureLoader.getGLTextureArray()[texture[0]]);
glsl_test.enableShader(); gl.glUniform1iARB(gl.glGetUniformLocationARB(glsl_test.getProgram(), "tex"), 0); gl.glUniform1iARB(gl.glGetUniformLocationARB(glsl_test.getProgram(), "abc"), 1);
gl.glPushMatrix(); gl.glTranslated(0, 1, 10); glu.gluSphere(quadratic, 1.3f, 32, 32); gl.glPopMatrix();
glsl_test.disableShader(); |
Any ideas why this would come out black? I'm using DebugGL on and the shader complie checks and link checks, which all report ok. Thanks
|
|
|
|
|
16
|
Discussions / General Discussions / Re: Copyright Issues - Who is an expert at this stuff ? ^^
|
on: 2009-06-16 13:27:04
|
Why should it still be yours 50 years after you're dead? Also, why should it still be yours if it's not going to make you any profit personally, but if made public domain could make a massive profit for everyone else (in the case of software)?
But yes, patents are more dangerous in terms of treading on your liberties. People will patent almost anything.
It's probably still yours 50-75 years after you're dead for two reasons: 1. protect people from getting 'bumped off' just to get at their products 2. allow the next generation of that person's family to reap some benefit, after inheriting their estate, and not have their inheritance torn away from them.
|
|
|
|
|
18
|
Discussions / Suggestions / [no action required] RSS on JGO
|
on: 2009-06-16 02:14:02
|
The RSS page on JGO seems to just show the 5 most recent posts. Any plans for it to show more, like 30/40 or give the option of getting an RSS feed per board so people can focus on particular forums if they want to? 
|
|
|
|
|
21
|
Game Development / Networking & Multiplayer / Re: Preventing cheating in network games written in Java
|
on: 2009-06-16 01:33:10
|
|
I'd say apply the rule of diminishing returns: if there's some easy protection you can put in that costs you little time and effort, while demotivating some script-kiddies, then do it.
But don't sacrifice your game/marriage/life coding away just to stop the 1% of cheaters.
That (like others have said here) are what patches and updates are for, if your game takes off.
|
|
|
|
|
22
|
Discussions / General Discussions / Re: Copyright Issues - Who is an expert at this stuff ? ^^
|
on: 2009-06-16 01:27:03
|
I entered this territory and asked a similar question on this forum a while ago. It seemed what I was considering (creating an image from a photo of an existing work) gets into grey-area territory (imagine taking a photo of a building, using that as your base image and then creating a lovely landscaped piece of artwork in photoshop)... In the end I contacted the original owner - pretty large company - and they took the liberty to respond and ask for more information. Lots of details later, I asked if it was ok to use my creations using a base image of a photo of their product and they went very very silent. Not gonna-touch-that-with-a-barge-pole kinda silent. So ... I dropped it. Pretty sure if I'd continued and distributed something they would have been on me with a lawyer and a shiny briefcase in no time. 
|
|
|
|
|
23
|
Java Game APIs & Engines / JavaFX / Re: How to convert KeyCode to text.
|
on: 2009-06-11 20:30:48
|
|
You should have access to the KeyEvent object, from which you can get either the key code (int) or the key char (char).
From the javadocs:
char getKeyChar() Returns the character associated with the key in this event.
int getKeyCode() Returns the integer keyCode associated with the key in this event.
|
|
|
|
|
30
|
Discussions / Miscellaneous Topics / Re: who taught you
|
on: 2009-02-12 23:23:45
|
|
A C64 magazine! Ha ha! To be honest the first thing that got me into programming was a book called 'Spectrum graphics and sound' from 1984. Everything from for loops to poke and peek and 3D maths.
I remember making a game in BASIC on the spectrum where you moved your guy though a forest and avoided a monster, and had to reach a red flag to complete the game. Simple, yes but I was about 9 years old!
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|