[QUOTE=Catdaemon;16593318]Shadows are a lack of light, they don't have alpha. They're pure black if there's no light being cast where they are. They're working as intended.[/QUOTE]
The image is confusing to me, I think the shadows hurt more than they help in this case. But that's just my opinion from an average person's point of view.
[QUOTE=gparent;16584761]:downs: you still have to worry about uncaught out of bounds exceptions :downs:[/QUOTE]
They never get thrown if you always check the lenght of the array or whatever you are using before you access it.
[QUOTE=Catdaemon;16593318]Shadows are a lack of light, they don't have alpha. They're pure black if there's no light being cast where they are. They're working as intended.[/QUOTE]
I suggest that you smoothen the transistions then.
[QUOTE=DarKSunrise;16596916]I suggest that you smoothen the transistions then.[/QUOTE]
Cat just needs to tighten up the graphics.
[media]http://andrewph.freehostia.com/devimg/theGUI.png[/media]
Just need to remake the block selector and it is done.
Whoever's rating me dumb, I had to change a few lines in the game's files in order to have a larger block selection area.
I've been working my way through Deitel's C++ How To Program Sixth Edition. I'm getting close to the end now, just finished their brief introduction to game programming with OGRE:
[media]http://i286.photobucket.com/albums/ll89/RabbitTurd/Programming/pong.png[/media]
It's basic and looks like ass but hey, I had fun making it! The next chapter is on the Boost libraries and C++0x, so it should be an interesting read. I'll be on the final page (1389) soon enough, so can anyone recommend a good book on games programming and design?
My work is so simple compared to everyone else's :crying:
[editline]12:30AM[/editline]
[QUOTE=Turd92;16597672]I've been working my way through Deitel's C++ How To Program Sixth Edition. I'm getting close to the end now, just finished their brief introduction to game programming with OGRE:
[media]http://i286.photobucket.com/albums/ll89/RabbitTurd/Programming/pong.png[/media]
It's basic and looks like ass but hey, I had fun making it! The next chapter is on the Boost libraries and C++0x, so it should be an interesting read. I'll be on the final page (1389) soon enough, so can anyone recommend a good book on games programming and design?[/QUOTE]
Make it red and white like in Mirror's Edge and it will look awesome.
[QUOTE=SBII_Andrew;16597687]Make it red and white like in Mirror's Edge and it will look awesome.[/QUOTE]
How's this?
[media]http://i286.photobucket.com/albums/ll89/RabbitTurd/Programming/pong-1.png[/media]
[QUOTE=Turd92;16597842]How's this?
[media]http://i286.photobucket.com/albums/ll89/RabbitTurd/Programming/pong-1.png[/media][/QUOTE]
Make the paddles completely white.
Otherwise you're good to go.
[QUOTE=SBII_Andrew;16597856]Make the paddles completely white.
Otherwise you're good to go.[/QUOTE]
[media]http://i286.photobucket.com/albums/ll89/RabbitTurd/Programming/pong-2.png[/media]
I was a bit hesitant, thought you wouldn't be able to see the paddles very well against the background but it actually looks OK. And it's miles better than what I had before, so thanks!
[QUOTE=Turd92;16597908][media]http://i286.photobucket.com/albums/ll89/RabbitTurd/Programming/pong-2.png[/media]
I was a bit hesitant, thought you wouldn't be able to see the paddles very well against the background but it actually looks OK. And it's miles better than what I had before, so thanks![/QUOTE]
You're welcome :v:
[QUOTE=DarKSunrise;16596916]I suggest that you smoothen the transistions then.[/QUOTE]
Actually, the problem is that the light doesn't bounce. If it did the black areas would still have light in them.
[QUOTE=Catdaemon;16593318]Shadows are a lack of light, they don't have alpha. They're pure black if there's no light being cast where they are. They're working as intended.[/QUOTE]
In the real world, light reflects from walls and etc, so you'd rarely have total darkness.
The shadows look odd, really.
I want to make something but I have no idea what to make.
[editline]12:43PM[/editline]
Don't really care what language it is.
[editline]12:44PM[/editline]
Also:
[img]http://img149.imageshack.us/img149/6389/derpw.png[/img]
Get it hohoho
[QUOTE=Daimao;16599331]I want to make something but I have no idea what to make.
[editline]12:43PM[/editline]
Don't really care what language it is.
[editline]12:44PM[/editline]
Also:
[img]http://img149.imageshack.us/img149/6389/derpw.png[/img]
Get it hohoho[/QUOTE]
Harr it's 2^8 !!11!
Also, make a side scrolling platformer. Sounds boring but you can do whatever you like with it gameplay wise. It's easy to add a lot of variation to it.
[img]http://www.cubeupload.com/files/189600untitled.png[/img]
I decided to write a basic Logo clone to teach myself binding with GameMonkey Script, and I'm currently wresting with how to declare host-bound functions for use, binding more generic "move so and so in so and so direction" and "rotate x degrees in so and so direction" into more Logo-like "fd x" and "rt y" GameMonkey functions. Where do I stash them? It seems I can't make them member functions of a class or else I get bizarre "JOO HAS AN EXTRA \147" or something to that regard compile errors, grr.
[QUOTE=Robber;16596861]They never get thrown if you always check the lenght of the array or whatever you are using before you access it.[/QUOTE]
And that, is worrying about buffers.
But it's a loooot easier in Java.
[cpp]if(array.lenght>0)
System.out.println(array[0]);[/cpp]
(I want [java] tags :mad:)
Also, I didn't even use any buffers for my XML parser. It's just one String and a bunch of regular expressions used on it. And for reading the String from a file I just used a BufferedReader which is included the JDK.
But somehow you are right. I DID a lot of error checking to make sure (or at least I tried to) that invalid XML code throws fitting Exceptions instead of fucking something up.
[QUOTE=Robber;16600843]But it's a loooot easier in Java.[/QUOTE]
No, it isn't. The only difference is that in C++ you [i]may[/i] crash, where as in Java it's guaranteed to throw.
[QUOTE=efeX;16592929]so what, boost::format > printf.[/QUOTE]
What is your point?
"This class's goal is to bring a better, C++, type-safe and type-extendable printf equivalent to be used with streams."
And it is actually slower than printf, according to their own tests.
I was hoping for something like:
[code]
std::string mystring ("FPS: %i", iFps);
[/code]
Now that would be useful, because as it is you can only append strings or character arrays to a string. You first have to convert numbers to a character array to append them to a string and there is some good conversion functions in the Windows API, but EVERY one of them needs an already allocated buffer to modify which you can't do with a string. Well, you can reserve space in a string, but you can't directly modify the character array inside the string in any way as far as I know (std::string::data() and std::string::c_str() return a const pointer and should never be directly modified).
So you may as well allocate memory for a character array and use sprintf_s to save the trouble. And after that, you got the ready character array and you have no need to convert it to a string, because you're not going to modify it anymore. So there's an answer for your "Why use character arrays in the first place?" question.
[QUOTE=gparent;16601109]No, it isn't. The only difference is that in C++ you [i]may[/i] crash, where as in Java it's guaranteed to throw.[/QUOTE]
Sorry.... you are right.
[QUOTE=nullsquared;16601097][cpp]
if (array.size() > 0)
std::cout << array[0];
[/cpp]
?[/QUOTE]
Since when can you get the size of an array in C++? Is that a wrapper class? How is it called?
std::array? :v:
[QUOTE=Spoco;16601173]I was hoping for something like:
[code]
std::string mystring ("FPS: %i", iFps);
[/code][/QUOTE]
Just so you know, you can do that with string streams.
[QUOTE=Robber;16601235]Since when can you get the size of an array in C++? Is that a wrapper class? How is it called?
std::array? :v:[/QUOTE]
std::vector.
[QUOTE=Spoco;16601173]Now that would be useful, because as it is you can only append strings or character arrays to a string. You first have to convert numbers to a character array to append them to a string[/QUOTE]
boost::lexical_cast.
[QUOTE=gparent;16601317]
boost::lexical_cast.[/QUOTE]
Ok now I'm convinced and will go download boost.
[QUOTE=Spoco;16601417]Ok now I'm convinced and will go download boost.[/QUOTE]
I haven't tested it performance wise (I wouldn't be surprised if it was slower than C's / GNU's atoi, itoa, etc.) but convenience/abstraction/software quality wise it's the easiest way of converting integers I've used.
[QUOTE=Spoco;16601173]
[code]
std::string mystring ("FPS: %i", iFps);
[/code]
[/QUOTE]
[code]
std::stringstream ss;
ss << "FPS: " << iFps;
std::string mystring = ss.str();
[/code]
[editline]09:55AM[/editline]
[QUOTE=gparent;16601439]I haven't tested it performance wise (I wouldn't be surprised if it was slower than C's / GNU's atoi, itoa, etc.) but convenience/abstraction/software quality wise it's the easiest way of converting integers I've used.[/QUOTE]
It uses stringstream, it's performance penalty is negligible.
[editline]09:55AM[/editline]
[QUOTE=Robber;16601235]
Since when can you get the size of an array in C++? Is that a wrapper class? How is it called?
std::array? :v:[/QUOTE]
It's called std::vector :downs:
Still you can't get for example different radix conversions or different precisions, with stringstream or lexical_cast so please keep 'em coming.
[code]
std::string mystring ("FPS: %i Timer: %.3f", iFps, fTimer);
[/code]
That would be ideal and I'm sure there's something exactly like this out there. Or do I have to write a class derived from std::string to add this constructor?
[QUOTE=nullsquared;16601461]
It's called std::vector :downs:[/QUOTE]
But std::tr1::array or boost::array would also work...
[QUOTE=Fox32;16601824]But std::tr1::array or boost::array would also work...[/QUOTE]
True.
[editline]10:27AM[/editline]
[QUOTE=Spoco;16601732]Or do I have to write a class derived from std::string to add this constructor?[/QUOTE]
No, you don't derive from SC++L objects.
Sorry, you need to Log In to post a reply to this thread.