Should I go for LWJGL og JOGL?
JOGL seems to have better documentation.
[editline]edit[/editline]
I've made my desicion, LWJGL it is.
[QUOTE=erijang]I want to add that the missions of JOGL and LWJGL differ slightly. LWJGL is a [B]"Game Library"[/B], and as such,
they focus heavily on having OpenGL [I]and[/I] OpenAL [I]and[/I] input handling, and they have some other quirks like requiring
hardware acceleration on Windows and using only one window. LWJGL is not a game "engine", but as a wrapper for
cross-platform game functionality in Java, it does an excellent job.
The 2.6 "stable" LWJGL has been pretty reliable for me, and the native bits have worked without a hitch so far.
[B]Edit:[/B] If you're really bothered by having to specify which version of GL you want to call a method from (GLxx.whatever),
you can import all of the methods statically:
[CODE]
import static org.lwjgl.opengl.GL11.*;[/CODE][/QUOTE]
[QUOTE=Catdaemon;32913099]I'd update to 2.0 if you want to use render targets. That's the main reason I'm using 2.0, 1.6 doesn't look so great for such things. Nothing works on Intel GPUs so I wouldn't worry too much about that.
I have a related question though, I'm using SFML 2.0 and creating render targets takes [b]ages[/b].
Using this code:
[code]
snip
[/code]
I get this output:
[code]
snip
[/code]
I've figured out it's the call to gameCanvas->Create that takes all the time. It doesn't matter what width/height is passed. Takes the same amount of time on my integrated intel laptop as my quad core desktop with an 8800GTS. What gives?
EDIT: Sorry my bad, it's the [b]new sf::RenderTexture();[/b] that causes this.[/QUOTE]
Thought I'd update y'all - After Much Google it turns out that simply renaming the executable fixes this problem... what the fuck?
In java, how do you compare two arrays of integers and make it give output of how many numbers matched? Lets say in array 1: #5 is equal to 50.
In array 2: #5 is also equal to 50. So it says 1 number matched and so on. I have 2 arrays, 16 numbers each. help?
[QUOTE=arleitiss;32925298]In java, how do you compare two arrays of integers and make it give output of how many numbers matched? Lets say in array 1: #5 is equal to 50.
In array 2: #5 is also equal to 50. So it says 1 number matched and so on. I have 2 arrays, 16 numbers each. help?[/QUOTE]
If i do this for you, will you do my math homework?
[QUOTE=OldFusion;32925409]If i do this for you, will you do my math homework?[/QUOTE]
How is that related to my question?
[QUOTE=arleitiss;32925298]In java, how do you compare two arrays of integers and make it give output of how many numbers matched? Lets say in array 1: #5 is equal to 50.
In array 2: #5 is also equal to 50. So it says 1 number matched and so on. I have 2 arrays, 16 numbers each. help?[/QUOTE]
Use a for loop.
[editline]23rd October 2011[/editline]
[QUOTE=arleitiss;32925676]How is that related to my question?[/QUOTE]
He's implying you're asking us to do your homework.
[QUOTE=esalaka;32925737]Use a for loop.
[editline]23rd October 2011[/editline]
What do you mean exactly? I am just learning java.
He's implying you're asking us to do your homework.[/QUOTE]
[QUOTE=arleitiss;32925752]What do you mean exactly? I am just learning java. [/QUOTE]
Maybe you should learn the for loop, then.
[QUOTE=esalaka;32925882]Maybe you should learn the for loop, then.[/QUOTE]
I know loops yeah, but is that the only way?
No.
[QUOTE=esalaka;32926412]No.[/QUOTE]
here is what I got so far:
[url]http://pastebin.com/qu1rYvYB[/url]
Tile Collision? I can detect whether or not a square is hit, as in [img]http://i.imgur.com/DjggK.png[/img]
[editline]23rd October 2011[/editline]
[QUOTE=arleitiss;32925298]In java, how do you compare two arrays of integers and make it give output of how many numbers matched? Lets say in array 1: #5 is equal to 50.
In array 2: #5 is also equal to 50. So it says 1 number matched and so on. I have 2 arrays, 16 numbers each. help?[/QUOTE]
Arrays.equals afaik
Anyone got a clue as to what might be causing c2079 STD::_List_nod Ty alloc node myval uses undefined class cspell. Sorry I had to type this out on an iPod touch.
Need some help with love
[code]
function love.load()
hamster = love.graphics.newImage("hamster.png")
x = 50
y = 50
speed = 100
rectangle = love.graphics.newImage("rectangle.png")
x = 400
y = 300
speed = 110
end
function love.update(dt)
if love.keyboard.isDown("right") then
x = x + (speed * dt)
elseif love.keyboard.isDown("left") then
x = x - (speed * dt)
end
if love.keyboard.isDown("down") then
y = y + (speed * dt)
elseif love.keyboard.isDown("up") then
y = y - (speed * dt)
end
end
function love.draw()
love.graphics.draw(hamster, 60, 60)
love.graphics.draw(rectangle, x, y)
end
[/code]
This creates two images, a rectangle and a ball. The rectangle will move in whatever direction you press but the hamster ball stays still.
I want the ball to move like the ball in pong or breakout, bouncing off walls and such yet I have no idea how to make it move independently of the rectangle.
Why are you using an image for the rectangle
I just started out and I really have no idea what I should use.
[QUOTE=WTF Nuke;32932515]Anyone got a clue as to what might be causing c2079 STD::_List_nod Ty alloc node myval uses undefined class cspell. Sorry I had to type this out on an iPod touch.[/QUOTE]
Yeah, you didn't use something right.
The line you've written where the error appears would be helpful.
I'm guessing that you try to create a std::list is a forward declared class, which is not possible since std::list must know the complete definition of it to know the size of the class.
A possible alternative to this is using a pointer to cspell, since the pointer is fully defined.
Anyone have any good tutorials to some java box2d or some other java 2d physics libraries?
What would be the best library/framework for creating games when transferring from a Love2D?
SFML looks good but I'd like to know your opinions before I learn one.
I have a little issue in C#, I cannot manage to get layers in XNA to work. My characters are running over eachother head even though their height corresponds to their layer
[code]protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Black);
spriteBatch.Begin();
spriteBatch.Draw(tBackground, rBackground, null, Color.White, 0.0f, new Vector2(0, 0), SpriteEffects.None, 0);
foreach (NPC npc in listNPC)
if (npc.alive == true)
{
rCharacter = new Rectangle((int)npc.pos.X, (int)npc.pos.Y, 64, 128);
rShadow = new Rectangle((int)npc.pos.X, (int)npc.pos.Y, 64, 32);
[highlight]float depth = 5 / npc.pos.Y;[/highlight]
spriteBatch.Draw(tShadow, rShadow, null, Color.White, 0.0f, new Vector2(64, 16), SpriteEffects.None, depth);
if (npc.direction == 0)
{
spriteBatch.Draw(tCharacter, rCharacter, null, Color.White, 0.0f, new Vector2(32, 64), SpriteEffects.None, [highlight]depth[/highlight]);
}
else if (npc.direction == 1)
{
spriteBatch.Draw(tCharacter, rCharacter, null, Color.White, 0.0f, new Vector2(32, 64), SpriteEffects.FlipHorizontally, [highlight]depth[/highlight]);
}
}
spriteBatch.Draw(tAwning, new Rectangle(633, 260, 176, 178), null, Color.White, 0.0f, new Vector2(32, 64), SpriteEffects.None, 0.5f);
spriteBatch.End();
base.Draw(gameTime);
}
[/code]
[QUOTE=Red scout?;32938300]I have a little issue in C#, I cannot manage to get layers in XNA to work. My characters are running over eachother head even though their height corresponds to their layer
[code]-snip-[/code][/QUOTE]
I think you need to spriteBatch.Begin in Immediate mode for depth sorting:
[code]
spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.None);
[/code]
[QUOTE=NovembrDobby;32938326]I think you need to spriteBatch.Begin in Immediate mode for depth sorting:
[code]
spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.None);
[/code][/QUOTE]
Error 2 The name 'SaveStateMode' does not exist in the current context
Error 1 The name 'SpriteBlendMode' does not exist in the current context
Also, is it possible to make it use nearest neighbour resize filter instead of bilinear or whatever it uses?
[QUOTE=Red scout?;32938345]Error 2 The name 'SaveStateMode' does not exist in the current context
Error 1 The name 'SpriteBlendMode' does not exist in the current context
Also, is it possible to make it use nearest neighbour resize filter instead of bilinear or whatever it uses?[/QUOTE]
urgh, xna 4 changed stuff:
[code]
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
[/code]
If you're loading your textures from the content pipeline, you should be able to enable mipmaps in the content processor bit in the properties of the textures.
[IMG]http://i.imgur.com/aPLwM.png[/IMG]
[QUOTE=stinkfire;32936973]Anyone have any good tutorials to some java box2d or some other java 2d physics libraries?[/QUOTE]
I agree, all the tutorials for JBox2D seem to be only for Android, and it just makes it a brainfuck to understand.
[QUOTE=NovembrDobby;32938462]urgh, xna 4 changed stuff:
[code]
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
[/code]
If you're loading your textures from the content pipeline, you should be able to enable mipmaps in the content processor bit in the properties of the textures.
[IMG]http://i.imgur.com/aPLwM.png[/IMG][/QUOTE]
That doesn't seem to work though. :/
[QUOTE=ZeekyHBomb;32936264]Yeah, you didn't use something right.
The line you've written where the error appears would be helpful.
I'm guessing that you try to create a std::list is a forward declared class, which is not possible since std::list must know the complete definition of it to know the size of the class.
A possible alternative to this is using a pointer to cspell, since the pointer is fully defined.[/QUOTE]
I'll try to do that, however the odd thing is that I have not edited any code witht he list and just added a vector for a new class which broke it. It worked in the past, but adding a new class and vector was the only thing I changed. The line it points to is the use of my_Val in the list file, so not my own project but rather there.
Your code instances the template-code found in the STL.
If the passed parameters do not satisfy the requirements as given by the standard, the fault is in your code.
If you'd pastebin the involved files I/we can take a closer look and perhaps explain the nature of the error to you.
I'll paste bin it as soon as I get home, but it is forward declared so I'll see if that fixes it too.
[IMG]http://i.imgur.com/iHoFW.png[/IMG]
So, suddenly my content wouldn't load for no reason whatsoever, I wasn't even touching the content stuff.
[editline]as[/editline]
Nvm, I fixed it
[highlight](User was banned for this post (""Double nigger"" - Orkel))[/highlight]
Yeah zeeky thanks, it was the forward deceleration problem.
Sorry, you need to Log In to post a reply to this thread.