[QUOTE=Szwedo;31871328]I'm not sure if this is the right place to post this, but..
My friend and I are developing an iPhone application. We want to be able to post the user's high score on facebook (very much like doodle jump). How would this be done?[/QUOTE]
This is helpful.
[url]http://developers.facebook.com/docs/guides/mobile/#ios[/url]
[url]http://en.wikipedia.org/wiki/3D_projection#Perspective_projection[/url]
[img]http://upload.wikimedia.org/math/d/4/0/d4069770c68cb8f1aa4b5cfc57e81bc3.png[/img]
What is [img]http://upload.wikimedia.org/math/9/3/6/9364c26513a71672082c98901bcf9fad.png[/img]?
[QUOTE=Mr. Smartass;31870917]What ever happened to this project?
[img]http://dl.dropbox.com/u/3724424/Programming/bug3.gif[/img][/QUOTE]
SupahVee ran into issues and had to stop.
[editline]jewbs[/editline]
Is it possible to use Draw on an image in SFML?
[QUOTE=Hypershadsy;31871349][url]http://en.wikipedia.org/wiki/3D_projection#Perspective_projection[/url]
[img]http://upload.wikimedia.org/math/d/4/0/d4069770c68cb8f1aa4b5cfc57e81bc3.png[/img]
What is [img]http://upload.wikimedia.org/math/9/3/6/9364c26513a71672082c98901bcf9fad.png[/img]?[/QUOTE]
I barely know elementary algebra, but wouldn't it be Euler's number?
[QUOTE=Doritos_Man;31871343]This is helpful.
[url]http://developers.facebook.com/docs/guides/mobile/#ios[/url][/QUOTE]
Thankyou. Ill tell you if it works...
[QUOTE=Jookia;31871574]I barely know elementary algebra, but wouldn't it be Euler's number?[/QUOTE]
It says e is the viewer's position relative to the display surface.
So I want the viewer to be a bit farther away from the surface, would I increase or decrease the X or the Y?
Yes.
Could someone tell me the missing step in this tutorial, between steps 2 and 3 of "Building Libtorrent Dll"?
[url]http://softwerkz.net/2009/09/libtorrent/comment-page-1/#comment-47943[/url]
I did exactly what it said, even though I end up with a blank project, and to my surprise it compiled, but I found that the resultant dll/lib file doesn't contain any actual libtorrent shit, so it doesn't solve the linker errors when compiling the sample problems.
Basically, I'm wondering how I'm supposed to import the cpp/hpp file structure into my project so it compiles it.
Any idea what I've done wrong here?
[csharp]
public void JumpUpdate(KeyboardState KeyboardState)
{
if (KeyboardState.IsKeyDown(Keys.Space))
{
PSPos.Y += (10 * JumpIncrement);
}
}
[/csharp]
How I call it in Update()
[csharp]
KeyboardState.GetPressedKeys();
PlayerSprite.JumpUpdate(KeyboardState);
[/csharp]
The sprite doesnt move.
Edit: Must be another peice of code, I see nothing wrong here. Mind Blank.
[editline]22nd August 2011[/editline]
Wrote this game in like 1 minute to try out jumping its incredibly simple and yet I haven't the slightest idea what is wrong with it. Maybe I should just redo it.
Here:
[QUOTE=reevezy67;31873067]
[csharp]
var thekeys = KeyboardState.GetPressedKeys();
PlayerSprite.JumpUpdate(thekeys);
[/csharp]
[/QUOTE]
I don't know how you're passing static KeyboardState through JumpUpdate.
[QUOTE=Dehodson;31871491]Is it possible to use Draw on an image in SFML?[/QUOTE]
In SFML 2.0 there is sf::RenderImage which you can draw stuff on.
[QUOTE=Hypershadsy;31871997]It says e is the viewer's position relative to the display surface.
So I want the viewer to be a bit farther away from the surface, would I increase or decrease the X or the Y?[/QUOTE]
Read through the old OpenGL 1.X reference, specifically glFrustum, or [url=http://www.songho.ca/opengl/gl_projectionmatrix.html]this derivation[/url]. I think it's a lot more straightforward.
-snip- didn't read Hypers post properly.
Trust me to forget to assign the key state to the var I'm passing.
Having a bit of trouble with vector math, trying to find the projection of a point onto a line in global space, everything I try seems to be slightly offset and isn't working. Completely stuck on this one so any help from people who know about vector math would be appreciated:
[img]http://dl.dropbox.com/u/3715122/Coding/VectorHell.png[/img]
Edge1 and Edge2 are points that make up the side of a shape. Point 1 is the point I am trying to project onto the vector Edge1->Edge2.
It almost works but the point pointed to by the red line always seems to be offset from the Edge1->Edge2 vector and its very important that this point is on this line somewhere.
[cpp]
Util::VecProject(tPoint - SmallEdge1 , SmallEdge2 - SmallEdge1) + SmallEdge1)
[/cpp]
I am doing the above code right now. VecProject is a function that projects the vector in the first argument onto the second argument.
Psuedocode:
[code]
--= projection =--
The formula for projecting vector a onto vector b is:
proj.x = ( dp / (b.x*b.x + b.y*b.y) ) * b.x;
proj.y = ( dp / (b.x*b.x + b.y*b.y) ) * b.y;
where dp is the dotprod of a and b: dp = (a.x*b.x + a.y*b.y)
Note that the result is a vector; also, (b.x*b.x + b.y*b.y) is simply the length of b squared.
If b is a unit vector, (b.x*b.x + b.y*b.y) = 1, and thus a projected onto b reduces to:
proj.x = dp*b.x;
proj.y = dp*b.y;
[/code]
[QUOTE=conman420;31883320]:words:[/QUOTE]
direction = normalize(edge2 - edge1)
result = edge1 + dot(point1 - edge1, direction) * direction
Does anyone know how to enlarge an image in XNA and keep it pixel-y and not blurred? It's basically a solid colour rectangle with a 3pxl border around it. I know I could just as easily create an image the size I want and have a border around that, it's just that I prefer making sprites etc in a way that I don't have to manually re-size them every time I make a new one.
[QUOTE=Jcorp;31886670]Does anyone know how to enlarge an image in XNA and keep it pixel-y and not blurred? It's basically a solid colour rectangle with a 3pxl border around it. I know I could just as easily create an image the size I want and have a border around that, it's just that I prefer making sprites etc in a way that I don't have to manually re-size them every time I make a new one.[/QUOTE]
I don't know anything about XNA, but the feature you're looking for is "nearest-neighbor interpolation". Might help in a Google query.
[QUOTE=Jcorp;31886670]Does anyone know how to enlarge an image in XNA and keep it pixel-y and not blurred? It's basically a solid colour rectangle with a 3pxl border around it. I know I could just as easily create an image the size I want and have a border around that, it's just that I prefer making sprites etc in a way that I don't have to manually re-size them every time I make a new one.[/QUOTE]
It used to be TextureFilter.None or TextureFilter.Point
Not sure if it still is in XNA 4.0
I need to randomly generate nice-looking 2D polygons for my asteroids clone, but for some reason my brain can't function with this problem. What's the best way to generate points to produce something like this?
[img]http://i.imgur.com/JdwJd.png[/img]
[QUOTE=Nigey Nige;31887359]I need to randomly generate nice-looking 2D polygons for my asteroids clone, but for some reason my brain can't function with this problem. What's the best way to generate points to produce something like this?
[IMG]http://i.imgur.com/JdwJd.png[/IMG][/QUOTE]
Generate a bunch of points along the circumference of a circle and randomise the radius at each point. Connect the points and you should get something like that. You could also use perlin noise to create a less chaotic edge and should look better than completely random values depending on the number of points you decide on.
[QUOTE=bean_xp;31887546]Generate a bunch of points along the circumference of a circle and randomise the radius at each point. Connect the points and you should get something like that. You could also use perlin noise to create a less chaotic edge and should look better than completely random values depending on the number of points you decide on.[/QUOTE]
I'll do the circle thing. GENIUS
[QUOTE=ROBO_DONUT;31886960]I don't know anything about XNA, but the feature you're looking for is "nearest-neighbor interpolation". Might help in a Google query.[/QUOTE]
[QUOTE=CarlBooth;31886963]It used to be TextureFilter.None or TextureFilter.Point
Not sure if it still is in XNA 4.0[/QUOTE]
Cheers guys, it has been removed from 4.0 but I managed to find something that works in the same way. Now to fix the bugs that it's created and I'm off to happy programmer land.
Currently, my terrain generation method creates faces like those on the left. I want to have more detailed terrain, so I want it to generate the triangles in the same fashion as on the right. How would I go about this?
[img]http://i.imgur.com/CIL08.png[/img]
[QUOTE=Mr. Smartass;31888948]Currently, my terrain generation method creates faces like those on the right. I want to have more detailed terrain, so I want it to generate the triangles in the same fashion as on the right. How would I go about this?
[img]http://i.imgur.com/CIL08.png[/img][/QUOTE]
It most likely is just as good now, no? If your doing terrain you don't want it to lag cause you bound to add more than just terrain such as entities n such
[QUOTE=Map in a box;31889095]It most likely is just as good now, no? If your doing terrain you don't want it to lag cause you bound to add more than just terrain such as entities n such[/QUOTE]
A couple of extra triangles like this wont really cause any major performance impact, performance is usually bound by draw calls anyway. And assuming an index buffer is used, the additional memory usage is pretty minimal too. The grid structure on the left can cause some artifacts in symetrical shapes which the right tesselation doesn't struggle with.
As for how to generate the mesh it's just a case of calculating the average height of the 4 corners of each quad for the mid value.
Its terrain and will be more than just a couple of extra triangles, is what i was tryin to say
[QUOTE=ROBO_DONUT;31885491]direction = normalize(edge2 - edge1)
result = edge1 + dot(point1 - edge1, direction) * direction[/QUOTE]
Yes! Thank you so much!
Is there any way in Visual Studio I can look at the functions provided by a standard C++ library (not custom libraries but the standard C++ ones)?
E.g. in my project I may do this:
#include <algorithm>
And I'd like to look at what functions algorithms.h provides... such as min_element, max_element, find_first_of, etc inside Visual Studio itself. Yeah I could look this shit up on Google in like 5 seconds, but is there some way I can do this in VS?
[QUOTE=Chrispy_645;31912980]Is there any way in Visual Studio I can look at the functions provided by a standard C++ library (not custom libraries but the standard C++ ones)?
E.g. in my project I may do this:
#include <algorithm>
And I'd like to look at what functions algorithms.h provides... such as min_element, max_element, find_first_of, etc inside Visual Studio itself. Yeah I could look this shit up on Google in like 5 seconds, but is there some way I can do this in VS?[/QUOTE]
If you click a function or a include name, in this case <algorithm> and then press F1, Visual Studio tries to look up the function/library in MSDN. I tried this on <algorithm> and it gave me a list of all the functions it contains. But this would not work on custom libraries or functions.
I was hoping it would be offline but that's still kinda useful. Thanks. :smile:
Sorry, you need to Log In to post a reply to this thread.