CBase(unsigned int spaces(1), char* cpName)
What's this (1) supposed to mean?
Not Telling
rnlf hasn't added any contacts yet.
Posted by rnlf
on 11 June 2013 - 04:09 AM
CBase(unsigned int spaces(1), char* cpName)
What's this (1) supposed to mean?
Posted by rnlf
on 11 June 2013 - 04:04 AM
Why don't you use for-loops instead of building for loops out of while loops? Maybe you find your error faster if you don't have to deal with unnecessariliy bloated code...
And are you sure, your loops in Drawtoscreen are supposed to loop while <= MAP_SIZE; not <MAP_SIZE?
Posted by rnlf
on 11 June 2013 - 01:14 AM
Yeah, looks like you start the program from your IDE, which does not keep the console windows open after the program ends, so after displaying "bonus: foo", the program ends (as intended) and the console window belonging to it is closed by Windows. Do what Aliii proposes. Maybe use cin::get() so you don't have to add more headers.
Posted by rnlf
on 05 June 2013 - 02:20 AM
From the C++11 standard, section 8.5:
The form of initialization (using parentheses or =) is generally insignificant, but does matter when the initializer or the entity being initialized has a class type; see below.
So it should really result in the same assembly being created for pointer initialization. It has, by the way, little to do with the new keyword but rather with the initialization of the object p.
Edit: Damn you Hodgman. You're just to fast for me ![]()
Posted by rnlf
on 26 May 2013 - 08:28 AM
How can you ever hope to accomplish anything without using formal mathematics? Even your programming language's syntax is formal mathematics (thus the name "formal language"). So by writing a program you do actually use formal mathematics.
Also, without formally finishing your derivations, you will write unneccessarily complex code, which will often lead to slower code.
On the other hand, there seems to be no sensible reason not to use mathematics. Or can you name even a single one to back up your statement?
Posted by rnlf
on 22 May 2013 - 01:23 AM
Posted by rnlf
on 27 February 2013 - 02:39 AM
Don't go for the 3d engine too quick. Take your time to really understand the basics of programming. Read books or online articles about efficiency and correctness. Do some serious work on 3d maths. Study other engines' structures. Blender may be interesting because it can show you how artists think about 3d data (and how that may differ from a programmer's perspective).
So, yes it is possible to write a polished 3d engine in C++, even on your own, but it is nothing you can do in a few months or (depending on your learning curve, spare time and motivation) even years. Keep that in mind. Also, if your goal is to write a game, write a game, not an engine.
Ruby is a fine language and I see no reason why it shouldn't be usable as a high level scripting language.
EDIT: Oops. Typo messed up the meaning.
Posted by rnlf
on 14 January 2013 - 02:14 PM
I did never write a lot of scheme, but it looks to me like you have one closing parenthesis to much in line 2.
Posted by rnlf
on 09 January 2013 - 02:46 PM
You could use OpenGL, but this means you'll have to write a lot of shader code to do this. And since you (I assume) don't have to make it a real time program, you might as well use the CPU instead. If you are allowed to use it in course, take a look at OpenCV, which is one of the most used libraries for image processing / computer vision.
It should have at least Sobel and median filters built in, but they are really easy to implement yourself (and doing so will teach you some of the most importent basic tools and techniques in field), like simple matrix convolutions, image formats and the like.
Posted by rnlf
on 27 December 2012 - 01:12 PM
I don't think there is a function to lock the cursor in position (shame on me if I'm wrong), but you can call XWarpPointer every time you receive a mouse event, which has the same effect.
Posted by rnlf
on 17 December 2012 - 08:28 AM
Posted by rnlf
on 17 December 2012 - 08:04 AM
Posted by rnlf
on 17 December 2012 - 07:54 AM
Posted by rnlf
on 17 December 2012 - 02:57 AM
Posted by rnlf
on 12 December 2012 - 01:40 AM
Find content