Try an older version, like 2008? 2008 and 2010 don't have many differences, especially if you don't program in .NET
[QUOTE=ief014;35798217]Try an older version, like 2008? 2008 and 2010 don't have many differences, especially if you don't program in .NET[/QUOTE]
I know that this wasn't in response to my problem, but I think I'll try out VC++ 2008 as well; as far as I can tell, people rarely have issues with SFML with VC++ 2008. Is there really that much a difference between 2008 and 2010, anyways?
I'm trying to work out how to return to a previous camera-zoom level after a camera is moved closer to a player (for example when being moved in front of a wall between the player and the camera).
An example situation would be where a player turns their camera around, causing it to zoom in due to hitting a wall and move closer to the player. The player rotates the camera so there is no longer anything behind it.
How would I restore the camera to its original 'zoom amount'?
[QUOTE=LaughingStock;35797830][url]http://www.newgrounds.com/dump/item/796d2bfdfdf60bad69b7b06f9acfddb9[/url]
Actionscript is pretty cool but my understanding of what everything meant was kind of loose. Where can I find a decent AS3 tutorial?[/QUOTE]
[url]http://gamedev.michaeljameswilliams.com/[/url]
[QUOTE=ief014;35798217]Try an older version, like 2008? 2008 and 2010 don't have many differences, especially if you don't program in .NET[/QUOTE]
Trying this.
Crossing my fingers.
[B]Edit:[/B] Damnit, I don't know what happened, but the 2008 version didn't install correctly either
Fuck this shit
[QUOTE=Nerr;35798420]I'm trying to work out how to return to a previous camera-zoom level after a camera is moved closer to a player (for example when being moved in front of a wall between the player and the camera).
An example situation would be where a player turns their camera around, causing it to zoom in due to hitting a wall and move closer to the player. The player rotates the camera so there is no longer anything behind it.
How would I restore the camera to its original 'zoom amount'?[/QUOTE]
Either store two variables or use temporary assigned values.
In case of the wall, you'd trace a ray of DISTANCE from the focus to the camera (pov+cam normal*distance is the place of the cam, so, you'd trace a ray from pov to pov+cam_normal*distance, the place where you've hit something is the camera's position, once the camera rotates outta the wall, it should go back to pov+cam_normal*distance)
Figured out my issue.
Apparently I downloaded the wrong version of SFML. No idea what I did download, but it didn't have any .lib files - instead, they were all .a files, whatever those are. :v:
However, since I've already gone through and uninstall VC++ 2010, and installed VC++ 2008, I'm just going to stick with 2008. Are there any major things I'll be missing out on, doing so?
[QUOTE=NateDude;35798449]Trying this.
Crossing my fingers.
[B]Edit:[/B] Damnit, I don't know what happened, but the 2008 version didn't install correctly either
Fuck this shit[/QUOTE]
Running VCSExpress.exe(the application one) from the folder works for me. Does it start up a process or anything or just nothing at all?
[QUOTE=Gmod4ever;35800528]No idea what I did download, but it didn't have any .lib files - instead, they were all .a files, whatever those are. :v:[/QUOTE]
Those are Unix/Linux static libraries.
[img_thumb]http://puu.sh/sDfb[/img_thumb]
I don't even know this time, this should be a 256x256 grid. Pretty sure this isn't 256x256.
Code where the vertex locations are generated.
[code]
int i = 0;
for(int x = 0; x < 256; x++)
{
for(int z = 0; z < 256; z++)
{
vertexLoad[i].position = D3DXVECTOR3(x, 0, z);
i++;
}
}
[/code]
[QUOTE=darkrei9n;35801194][img_thumb]http://puu.sh/sDfb[/img_thumb]
I don't even know this time, this should be a 256x256 grid. Pretty sure this isn't 256x256.
Code where the vertex locations are generated.
[code]
int i = 0;
for(int x = 0; x < 256; x++)
{
for(int z = 0; z < 256; z++)
{
vertexLoad[i].position = D3DXVECTOR3(x, 0, z);
i++;
}
}
[/code][/QUOTE]
Z is Depth. Also has to be rendered in orthographic.
[QUOTE=Lord Ned;35801253]Z is Depth. Also has to be rendered in orthographic.[/QUOTE]
Why would it need to be rendered in orthographic? Its rendering fine, just the grid is not a perfect square like it should be.
[QUOTE=Darkest_97;35800673]Running VCSExpress.exe(the application one) from the folder works for me. Does it start up a process or anything or just nothing at all?[/QUOTE]
It's not [B]there[/B] for me.
Hnng
[QUOTE=darkrei9n;35801436]Why would it need to be rendered in orthographic? Its rendering fine, just the grid is not a perfect square like it should be.[/QUOTE]
I believe Lord Ned said that because Orthographic projection might provide a more accurate depiction of a simple 2D object in a 3D space. It might have to do with 2D objects not having depth and therefore being invisible if seen from anywhere directly facing the edges of the polygon in a 3D grid. Projection also removes possible perspective distortion from 3D renderings, IIRC.
[QUOTE=wizardsbane;35802442]I believe Lord Ned said that because Orthographic projection might provide a more accurate depiction of a simple 2D object in a 3D space. It might have to do with 2D objects not having depth and therefore being invisible if seen from anywhere directly facing the edges of the polygon in a 3D grid. Projection also removes possible perspective distortion from 3D renderings, IIRC.[/QUOTE]
I have the camera setup so I can move it around, it is definitely the mesh that is messed up.
[QUOTE=NateDude;35801813]It's not [B]there[/B] for me.
Hnng[/QUOTE]
Its in this picture you posted: [url]http://puu.sh/sA2O[/url], 8th one down.
[QUOTE=Darkest_97;35802577]Its in this picture you posted: [url]http://puu.sh/sA2O[/url], 8th one down.[/QUOTE]
oh wow, I didn't notice that-
[QUOTE]The Application Data folder for Microsoft Visual C# 2010 Express could not be created[/QUOTE]
[B]fuck[/B]
[QUOTE=darkrei9n;35801436]Why would it need to be rendered in orthographic? Its rendering fine, just the grid is not a perfect square like it should be.[/QUOTE]
Sorry, misread as you wanted it to show up as exactly 512x512 pixels. But either way when you initialize the vertexes you're saying D3DXVECTOR3(Left-Right, Top-Bottom, Far-Near) - So you're saying "go far into the screen" instead of "go up on the screen".
For the Java Programmers:
[CODE]
if (e.getSource() == Calc.eqls) {
curText = Calc.tf.getText();
if(curText.contains("*")) {
if(curText.contains("+")) {
int add = curText.indexOf("+");
Calc.tf.setText((curText.substring(add-1)+curText.substring(add+1)));
}
else if(curText.contains("-")) {
int subtr = curText.indexOf("-");
Calc.tf.setText((curText.substring(subtr-1)+curText.substring(subtr-1)));
}
}
else if(curText.contains("+")) {
int add = curText.indexOf("+");
int result = Integer.parseInt(curText.substring(add-1)) + Integer.parseInt(curText.substring(add+1));
String result2 = Integer.toString(result);
Calc.tf.setText(result2);
}
}
[/CODE]
I'm receiving a number format exception at the below line. I'm trying to make it so that I can take the numbers preceding and succeeding the ' + ' operator, add them together, then reconvert them back to a string so I can output it to the textfield.
[b]int result = Integer.parseInt(curText.substring(add-1)) + Integer.parseInt(curText.substring(add+1));[/b]
Variables:
tf = JTextField
Calc = Main Class
Rest are self defined.
Also, debugging it reports that the local variables are unavailable (I'm unsure if this is just a repercussion of a number format exception?)
--
I managed to solve it. I'm not sure what was causing it but there were a couple of problems within each other causing the ultimate number format exception.
Redefined code:
[code]
if (e.getSource() == Calc.eqls) {
curText = Calc.tf.getText();
if(curText.contains("*")) {
if(curText.contains("+")) {
add = curText.indexOf("+");
Calc.tf.setText((curText.substring(add-1)+curText.substring(add+1)));
}
else if(curText.contains("-")) {
int subtr = curText.indexOf("-");
Calc.tf.setText((curText.substring(subtr-1)+curText.substring(subtr-1)));
}
}
else if(curText.contains("+")) {
add = curText.indexOf("+");
try{
resulta = Integer.parseInt(curText.substring(0, add));
resultb = Integer.parseInt(curText.substring(add+1, add+2));
resultc = resulta + resultb;
result2 = Integer.toString(resultc);
Calc.tf.setText(result2);
System.out.println(result + "\n" + result2 + "\n" + curText + "\n" + resulta + "\n" + resultb);
}
catch(NumberFormatException e3)
{
System.out.println(result + "\n" + result2 + "\n" + curText + "\n" + resulta + "\n" + resultb);
}
}
}
[/code]
[QUOTE=Richy19;35802765]Is this deprecated OGL?
[cpp]glPushMatrix();
//glUseProgram(shader->shaderID);
glTranslatef(translation.x, translation.y, 0);
glVertexPointer(2, GL_FLOAT, sizeof(Rocket::Core::Vertex), &vertices[0].position);
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Rocket::Core::Vertex), &vertices[0].colour);
if (!texture)
{
glDisable(GL_TEXTURE_2D);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
else
{
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, (GLuint) texture);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(Rocket::Core::Vertex), &vertices[0].tex_coord);
}
glDrawElements(GL_TRIANGLES, num_indices, GL_UNSIGNED_INT, indices);
glPopMatrix();[/cpp][/QUOTE]
yes. Non-deprecated OpenGL no longer supports the matrix stack (glPushMatrix()/glPopMatrix()), client states are replaced with vertex attribute arrays. You no longer need to use glEnable/glDisable for textures, and you need to use shaders. The only line there that's not deprecated is glDrawElements
If you can't find the method/constant here then it's deprecated: [url]http://www.opengl.org/sdk/docs/man3/[/url]
[QUOTE=Lord Ned;35802875]Sorry, misread as you wanted it to show up as exactly 512x512 pixels. But either way when you initialize the vertexes you're saying D3DXVECTOR3(Left-Right, Top-Bottom, Far-Near) - So you're saying "go far into the screen" instead of "go up on the screen".[/QUOTE]
I realize that, the issue is that it isn't a 256 by 256 grid. The last coordinate could go into the fifth dimension for all I care, just as long as its 256x256.
[QUOTE=darkrei9n;35804090]I realize that, the issue is that it isn't a 256 by 256 grid. The last coordinate could go into the fifth dimension for all I care, just as long as its 256x256.[/QUOTE]
Are you complaining about the shape of it? Or are you saying there should be 255x255 more squares? I don't get what you're getting at.
[QUOTE=NateDude;35802864]oh wow, I didn't notice that-
[B]fuck[/B][/QUOTE]
Just out of curiosity, how much space left do you have on the drive you are trying to install it to. And what version are you trying to install?
[QUOTE=JohnnyOnFlame;35799781]Either store two variables or use temporary assigned values.
In case of the wall, you'd trace a ray of DISTANCE from the focus to the camera (pov+cam normal*distance is the place of the cam, so, you'd trace a ray from pov to pov+cam_normal*distance, the place where you've hit something is the camera's position, once the camera rotates outta the wall, it should go back to pov+cam_normal*distance)[/QUOTE]
Thanks a lot, managed to get it working using this method.
How can I open a file on iOS using fopen, it doesn't seem to be able to find the files.
This is what I tried:
[code]FILE* file = fopen("1.txt", "r");[/code]
[QUOTE=_NewBee;35806953]How can I open a file on iOS using fopen, it doesn't seem to be able to find the files.
This is what I tried:
[code]FILE* file = fopen("1.txt", "r");[/code][/QUOTE]
You want to use [[NSBundle mainBundle] pathForResource] to get the path of the file.
[QUOTE=Lord Ned;35804817]Are you complaining about the shape of it? Or are you saying there should be 255x255 more squares? I don't get what you're getting at.[/QUOTE]
It is currently rectangular. It should be square. On the Z axis it is shorter than it should be.
[QUOTE=Topgamer7;35805288]Just out of curiosity, how much space left do you have on the drive you are trying to install it to. And what version are you trying to install?[/QUOTE]
[IMG]http://puu.sh/sIxj[/IMG]
And I'm trying to install the 2010 Version.
[B]Edit:[/B] Fucking hell
If I can't figure out how to get this to work, I'm gonna be pissed.
I was really excited to learn how to code, but NOW....
[QUOTE=darkrei9n;35808111]It is currently rectangular. It should be square. On the Z axis it is shorter than it should be.[/QUOTE]
Put a breakpoint in your code, step through it, see where it places the coordinates.
Sorry, you need to Log In to post a reply to this thread.