|
Some recent topics started on our forums |
Circular Tetris
|
I made this as part of an extended project for school. It is a game of tetris but in a circular fashion.
I'm 17 and applying to University to study CS which I am very much looking forawrd too. I learnt a lot from this project and it's also my most... |
Posted October 13, 2010 12:14:26 PM
|
Quick sort algorithm producing "hairy" results
|
I have written a quick sort function but when I compare the elements in the stack to the time taken I am getting very hairy results, it's easiest shown with a picture:
Few elements
Lots of elements
It is sorting a stack of doubles in the above... |
Posted November 2, 2010 4:46:39 PM
|
SDL TTF not working on some machines
|
I am using SDL_ttf to create a texture containing all characters from ' ' to '~' and storing each letters position; this renders fine on some machines but on others instead of seeing the text I just see a white quad where the text should be... |
Posted October 4, 2010 5:31:31 PM
|
Inheritance and iterators
|
I have 2 classes like so:
class Shape
{
public:
int width, height;
virtual int area() { return 0; }
};
class Square : public Shape
{
public:
int area() { return width*height; }
};
Then I have a vector defined like so:
... |
Posted April 29, 2010 1:54:04 PM
|
Circle at rest on a line
|
I have written the code below that works out if a circle is touching a line and if so it "bounces" the circle, it works fine except I'm having trouble removing a couple of bugs.
When the circle is at rest, it slowly sinks through the line. I can p... |
Posted April 26, 2010 1:08:33 PM
|
Rotating a vector
|
I have 2 vectors, a which intercepts with c. I am trying to find the vector b (See picture)
Here's what I'm doing atm:
θ = cos-1 ((a.c)/|a||c|)
let x = ax and y = ay
bx = x*cosθ - y*sinθ
by = x*sinθ + y*cosθ
... |
Posted April 24, 2010 8:05:42 PM
|
3D Circle-point collision
|
How would I check if a point is inside a circle in 3D space?
I can't do a check to see if the radius is <= the distance between the point and the centre of the circle because this would be a spherical check.
[Edited by - MrPickle on April 18... |
Posted April 18, 2010 12:06:19 PM
|
Making a square "wiggle"
|
I want to make all 4 sides of a square wiggle, the best way I can describe this is like a snake.
I'm not too sure how to go about doing so though.
My rough idea is something like:
let
m = time to do one wiggle
t = the current time
... |
Posted November 24, 2009 6:51:31 PM
|
Global array losing values and being filled with default values
|
I am filling a global array with 12 vectors using an overloaded constructor, but the global array seems to lose it's value and get filled by 12 vectors using the default constructor somewhere along the line.
There is another global array right aft... |
Posted November 13, 2009 5:19:47 PM
|
Compiling on Vista-64bit
|
I am having trouble compiling with Visual Studio Express 2008 on Vista-64bit.
I read that I must configure VS to compile for 64-bit but I did not have this option because that option is only available with the commercial version. I found... |
Posted September 12, 2009 11:33:15 AM
|
View All Topics Started By This User
|
|
Some recent replies made on our forums |
[MORPG] - ZDK Online
|
Serpent Sting! |
Posted November 10, 2010 5:48:05 PM
|
Circular Tetris
|
I've updated it (finally).
Download the updated version here
You can now hold down the s key and pieces have their own unique colours.
Sorry it took so long; school got in the way.
[Edited by - MrPickle on November 9, 2010 1:28:19 PM] |
Posted November 9, 2010 1:28:43 PM
|
Quick sort algorithm producing "hairy" results
|
Quote:Original post by Zahlman
Why not just use the standard library sort?
It is for learning purposes.
Quote:Original post by HodgmanWhat's wrong with these results? The zig-zag seems to be because you're rounding to the nearest millisecond.
... |
Posted November 3, 2010 2:44:54 PM
|
Quick sort algorithm producing "hairy" results
|
Thank you a lot for the detail explanations. |
Posted November 2, 2010 6:17:40 PM
|
Circular Tetris
|
Quote:Original post by AniMerrill
Quote:Original post by MarkS
1.) The 'S' key needs to be fixed as already mentioned.
2.) Each piece of a Tetris board has a distinct color. Their colors are not random: Tetris info
Yeah, these were the two bigg... |
Posted October 24, 2010 5:19:14 PM
|
Circular Tetris
|
The rotations feel weird because of the fact that a piece's width isn't the same as it's height.
Yes, it's hard to play when you first start but once you learn the pieces and their rotations it gets easier. (it was extremely hard without the... |
Posted October 14, 2010 11:20:32 AM
|
SDL TTF not working on some machines
|
Making the texture dimensions powers of two has worked, thanks a lot. |
Posted October 8, 2010 9:07:43 AM
|
Application not showing?
|
Try adding this before your return statement:
std::cin.ignore();
std::cin.get();
This causes the program to wait for input before it proceeds to the next step.
As a side note, there are alternative ways of doing this like system("pause"... |
Posted October 7, 2010 4:22:49 PM
|
HELP!! I would really be grateful if someone looked at my code.
|
Quote:Original post by xxDAFFOxx
Also at college will i learn how to solve problems like this and is it worth it taking an a level maths course.
If you're planning to go to University and study Computer Science then take A Level maths. Practicall... |
Posted October 7, 2010 2:27:35 PM
|
SDL TTF not working on some machines
|
Sorry, I wasn't sure whether I could post the code or not and I guess I kind of assumed that by saying "texture" you would know what I meant because to me it's obvious but that's because I wrote the code. I'll remember this.
I think the power of t... |
Posted October 6, 2010 7:37:02 PM
|
View All Replies Made By This User
|