I've been programming on my calculator again. The memories... :3:
I made a simple program that adds vectors for my physics class. It accepts both vectors in the forms of their x and y components and as an angle with magnitude, and it outputs them as all of those. Once we learn about vector multiplication I'll add that in too.
[QUOTE=Darwin226;25322326]And you get that from his SFML screenshot?[/QUOTE]
Eh, not sure why, but i did. :v:
[QUOTE=SamPerson123;25322533]I've been programming on my calculator again. The memories... :3:
I made a simple program that adds vectors for my physics class. It accepts both vectors in the forms of their x and y components and as an angle with magnitude, and it outputs them as all of those. Once we learn about vector multiplication I'll add that in too.[/QUOTE]
Vector multiplication is easy: x*scalar, y*scalar, z*scalar
Working on a Framework/Engine ( fuck terminology ) using OpenGL with SFML as the Context maker/fetcher/I don't care.
[img]http://imagebin.ca/img/vynH5lrT.png[/img]
[i]The only Reason the FPS is so low is because ZScreen likes to pause my program when it takes a screenshot, it's normally running at around 2000 FPS on my craptop[/i]
I'm trying to make everything simple and easy like SFML but a lot more flexible and configurable.
So far to create that screenshot I used:
[cpp]
#include "Context.hpp"
#include "Object.hpp"
int main()
{
// Create The OpenGL Context ( caption, width, height, fullscreen = false, antialiasing = 0 )
Context Test( ">implying i have a caption", 800, 600 );
// Create an Object and use the helper function Circle( x, y, radius, subdivisions = 16, innerColor = white, outercolor = white ) to make the Circle
Object Demo; Demo.Circle( 250, 250, 128, 32 );
// Start Game Loop, Run( r = 0, g = 0, b = 0 )
while( Test.Run( 0, 0, 0 ) )
{
// Mode Transformation, Up draws the vertexs only
if( Test.Key( sf::Key::Up ) ) Demo.SetMode( mPoint );
// Down draws the lines
else if( Test.Key( sf::Key::Down ) ) Demo.SetMode( mLineStrip );
// Nothing draws the shape + textures
else Demo.SetMode( mFan );
// Set Position to Mouse and Draw
Demo.SetPosition( (float)Test.Mouse.X, (float)Test.Mouse.Y );
Demo.Draw();
// Output everything
Test.Display();
}
}
[/cpp]
Is it a 3D engine? I'm still working on learning my C++, but it's getting harder to learn since I've reached a point where I need more explanation than I can find. All I know are simple I/O functions.
[img]http://dl.dropbox.com/u/2014606/Testing-2010-10-10_15.48.25.png[/img]
A little project I have been working on in C# and LuaInterface with libtcod as the renderer.
[QUOTE=Xion12;25324369]Is it a 3D engine? I'm still working on learning my C++, but it's getting harder to learn since I've reached a point where I need more explanation than I can find. All I know are simple I/O functions.[/QUOTE]
It can be, but I'm mainly focusing on easing the 2D Process. But I know what you mean, the amount of tutorials and information I need and the amount I can find are two very separate things.
[QUOTE=Matthew0505;25324505]I think he means a vector multiplied by another vector, not scalar multiplication, which is multiplying the corresponding components and adding them together
e.g 2D
[x1, y1] * [x2, y2] = x1x2 + y1y2
e.g. 3D
[x1, y1, z1] * [x2, y2, z2] = x1x2 + y1y2 + z1z2[/QUOTE]
There's two ways to "multiply" two vectors. What you've listed is the dot-product. The other method is the cross-product.
They give two very different answers, so you have to specify one or the other.
[QUOTE=Matthew0505;25324505]I think he means a vector multiplied by another vector, not scalar multiplication, which is multiplying the corresponding components and adding them together
e.g 2D
[x1, y1] * [x2, y2] = x1x2 + y1y2
e.g. 3D
[x1, y1, z1] * [x2, y2, z2] = x1x2 + y1y2 + z1z2[/QUOTE]
There are actually 2 ways to 'multiply' a vector by another vector, the dot product like you wrote above and the cross product.
[b]Edit:[/b]
Ninja'd :colbert:
Component wise vector multiplication can be useful sometimes too. But is pretty useless for vector maths.
[QUOTE=NorthernGate;25323968]Working on a Framework/Engine ( fuck terminology ) using OpenGL with SFML as the Context maker/fetcher/I don't care.
[img_thumb]http://imagebin.ca/img/vynH5lrT.png[/img_thumb]
[i]The only Reason the FPS is so low is because ZScreen likes to pause my program when it takes a screenshot, it's normally running at around 2000 FPS on my craptop[/i]
[/QUOTE]
Why do you need 2000 FPS?
[QUOTE=sim642;25326331]Why do you need 2000 FPS?[/QUOTE]
So when I have 5000 Faded and Textured circles running on screen at once the game is still playable?
[IMG]http://imagebin.ca/img/gy8x1Pmt.png[/IMG]
Just a little pet project to correctly implement a point sprite shader of sorts using the OpenGL 3.0 core and SFML.
Now I need to find another stupid project to do.
And does anyone know a good inkscape tutorial?
My vector graphics skill need some work.
[QUOTE=NorthernGate;25326519]So when I have 5000 Faded and Textured circles running on screen at once the game is still playable?[/QUOTE]
You could set the FPS limit to 60. There's no need to render 2000 FPS when most monitors only are 60hrz as well. It's a waste of resources. It won't make you game any slower.
My GPU made some strange sound as well when I had my SFML program running at extreme framerate, but after limiting it that sound disappeared.
SFML has a function for that : [url]http://www.sfml-dev.org/documentation/1.6/classsf_1_1Window.htm#5544031f1d2965c00532fb5660763f33[/url]
Got a cube rendering with in 3D with GDI+:
[img]http://ahb.me/D8A[/img]
The camera is moving back and forth as a sine curve, (it's coordinates are basically {0, 0, sin(time)})
There's a bug to do with my trigonometry where the points like to cross over if the camera zooms in too much:
[img]http://ahb.me/D8H[/img]
[img]http://dl.dropbox.com/u/2014606/SS-2010-10-10_20.49.23.png[/img]
More Progress on my C# project, there is also a working hook system to gather frame data and key info but this screen will not show this.
Made the camera fly around in all directions :v:
[media]http://www.youtube.com/watch?v=71zIlq5d4w4[/media]
[url]http://anyhub.net/file/gdi_stuff.exe[/url]
[QUOTE=Xion12;25324369]Is it a 3D engine? I'm still working on learning my C++, but it's getting harder to learn since I've reached a point where I need more explanation than I can find. All I know are simple I/O functions.[/QUOTE]
Effective C++ by Scott Meyers is an awesome intermediate book IMO.
It assumes that you know the basics of C++, shows some pitfalls and gives some neat advice on .. well how to write effective C++ :P
You should also look at the STL (it's part of the C++ standard library) and Boost (kinda like an unofficial extension to the standard library). You can find documentations online.
[QUOTE=turb_;25327182]Made the camera fly around in all directions :v:
[media]http://www.youtube.com/watch?v=71zIlq5d4w4[/media]
[url]http://anyhub.net/file/gdi_stuff.exe[/url][/QUOTE]
The FOV is probably a bit too wide. You can see the edges getting closer together when they are near the borders.
[QUOTE=Darwin226;25327836]The FOV is probably a bit too wide. You can see the edges getting closer together when they are near the borders.[/QUOTE]
IIRC the field of view is 2 radians each side, so 4 in total.
[editline]08:30PM[/editline]
Considering that's more than 180 deg in total, it probably is a bit wide.
[QUOTE=sim642;25326985]You could set the FPS limit to 60. There's no need to render 2000 FPS when most monitors only are 60hrz as well. It's a waste of resources. It won't make you game any slower.
My GPU made some strange sound as well when I had my SFML program running at extreme framerate, but after limiting it that sound disappeared.
SFML has a function for that : [url]http://www.sfml-dev.org/documentation/1.6/classsf_1_1Window.htm#5544031f1d2965c00532fb5660763f33[/url][/QUOTE]
Universally capping an entire Engine/Frameworks FPS to 60 is the stupidest thing I have ever heard for so many reasons.
Oh you and your input lag...
It's as simple as that the enduser of the engine/framework should be able to decide.
[QUOTE=Jallen;25328023]Universally capping an entire Engine/Frameworks FPS to 60 is the stupidest thing I have ever heard for so many reasons.[/QUOTE]
Calling a few classes anything but a few classes is even more stupid.
[QUOTE=layla;25328604]Calling a few classes anything but a few classes is even more stupid.[/QUOTE]
Are you ever going to get over that?
[QUOTE=Jallen;25328023]Universally capping an entire Engine/Frameworks FPS to 60 is the stupidest thing I have ever heard for so many reasons.[/QUOTE]
Explain why you would ever need more than 60 fps.
Games run 2 parts, thinking and drawing.
The 'thinking' part needs to run as fast as possible, but the 'drawing' part can be capped.
I think that's what's confusing people.
The thinking part also doesn't need to run as fast as possible in most cases. It sure makes everything easier when you don't have to multiply every increment with gametime.
[QUOTE=Dlaor-guy;25328784]Explain why you would ever need more than 60 fps.[/QUOTE]
75hz screens
What is this shit, opened someone elses project and it moved all my windows around. And the changes stayed when I opened one of my own project. FUCK
Does the following make sense?
[quote] .method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
// Code size 22 (0x16)
.maxstack 1
.locals init ([0] class [mscorlib]System.Exception ex)
IL_0000: call void quicktest2.Program::FunctionThatMightFail()
IL_0005: leave.s IL_0015
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: callvirt instance string [mscorlib]System.Object::ToString()
IL_000e: call void [mscorlib]System.Console::Write(string)
IL_0013: leave.s IL_0015
IL_0015: ret
IL_0016:
// Exception count 1
[b].try IL_0000 to IL_0007 catch [mscorlib]System.Exception handler IL_0007 to IL_0015[/b]
} // end of method Program::Main[/quote]
Mono.Cecil stores the TryEnd as "IL_0007". Does that make any sense to do? Shouldn't it be "IL_0005"? I mean why would TryEnd be an instruction that isn't even in the Try?
Edit:
(Not gonna make sense unless you have used Mono.Cecil)
[QUOTE=Dlaor-guy;25328784]Explain why you would ever need more than 60 fps.[/QUOTE]
Cap framerate at 60fps = input lag.
[editline]01:13PM[/editline]
[QUOTE=CarlBooth;25328892]Games run 2 parts, thinking and drawing.
The 'thinking' part needs to run as fast as possible, but the 'drawing' part can be capped.
I think that's what's confusing people.[/QUOTE]
If you run the thinking part as fast as possible you can get frame deltatimes of <1ms, and since the computer can't actually measure time that accurately I would have thought you'd need to cap the thinking at 1000fps.
Sorry, you need to Log In to post a reply to this thread.