• What do you need help with? Version 1
    5,001 replies, posted
[QUOTE=IAmAnooB;24488124]I just googled this: [url]http://gamedesign.wikicomplete.info/game-structure[/url][/QUOTE] Did you even look at it? It's not helpful at all
[QUOTE=Chris220;24489153]Did you even look at it? It's not helpful at all[/QUOTE] [url]http://gafferongames.com/[/url] There's a lot of useful tidbits in there, probably not enough to design an entire engine but enough to make some informed decisions.
Thank you, that's a lot more helpful :)
[url=http://boost.org/doc/libs/1_44_0/libs/utility/enable_if.html]boost::enable_if[/url]_c fails under gcc 4.4.3. [cpp]void test(typename boost::enable_if_c<false, int>::type var);[/cpp] [code]error: no type named &#8216;type&#8217; in &#8216;struct boost::enable_if_c<false, int>&#8217;[/code] Is this expected? According to my boost/config/compiler/gcc.hpp only gcc prior to version 3.96 should fail. Using official Boost 1.43 release.
[QUOTE=Chris220;24489153]Did you even look at it? It's not helpful at all[/QUOTE] Are you looking in a particular language or just in general? You can rate me bad reading, both for reading your question wrong, and not reading the link. But if it's in C++ I've found a tutorial about, how to create the different game states, it's not super long or so. [URL]http://gamedevgeek.com/tutorials/managing-game-states-in-c/[/URL] Hopefully this will be off help, if not. Whine more at me, and I'll try harder! :v:.
It's not so much the language as the total lack of anything useful on the first page you sent me. That one is better, thank you
[QUOTE=Richy19;24488593]Why not use garry's GWEN?[/QUOTE] Is there an SFML renderer for it yet?
[QUOTE=WTF Nuke;24492631]Is there an SFML renderer for it yet?[/QUOTE] [quote=garry]To get GWEN drawing in your game you have to fill out the renderer class. [b]Which at the minimum consists of a function to draw rects and a function to draw text.[/b][/quote] Sounds pretty trivial to write.
[QUOTE=ROBO_DONUT;24492950]Sounds pretty trivial to write.[/QUOTE] Yeah you're right. I'm just being lazy.
You could just use the OpenGL renderer with SFML.
I didn't know a rat's ass about 3d rendering, so I made my own GUI. Anyway, I seem to be having problems with my map system. If I change the map, parts of the old map seem to leak into the new one. Here is the code if anyone wants to help:[url]http://cpp.pastebin.com/ryfkCBGx[/url].
Having trouble with my turn towards point function, it was working fine until I implemented a camera system, but I might have messed up before I added that and didn't bother checking, can anyone see anything wrong with this code? [cpp]void Entity::PointTo( float x, float y ) { Object.SetRotation( Math::Convert::RadToDeg( atan2( Pos.x - x, Pos.y - y ) ) ); }[/cpp]
[QUOTE=NorthernGate;24519845]Having trouble with my turn towards point function, it was working fine until I implemented a camera system, but I might have messed up before I added that and didn't bother checking, can anyone see anything wrong with this code? [cpp]void Entity::PointTo( float x, float y ) { Object.SetRotation( Math::Convert::RadToDeg( atan2( Pos.x - x, Pos.y - y ) ) ); }[/cpp][/QUOTE] Shouldn't you be subtracting the object's position from the target? Not the other way around? Also, [QUOTE=NorthernGate;24519845][cpp]Math::Convert::RadToDeg()[/cpp][/QUOTE] Waaaay too many characters for "180.0*x/PI"
[QUOTE=ROBO_DONUT;24520170]Shouldn't you be subtracting the object's position from the target? Not the other way around? Also, Waaaay too many characters for "180.0*x/PI"[/QUOTE] All that does is change which way the sprite is rotated by default. But I tried that, and any other combination. I also disabled the Camera and the object rotates a full 360 and points towards the mouse like expected, but goes back to staying in 90 degrees when the view is turned back on. So it's definitely the view causing the problem, but I don't know why. Camera Code [cpp] #pragma once #include "Header.hpp" #include "Entity.hpp" class Camera { public: Camera() { Window = 0; Following = 0; } Camera( sf::RenderWindow *w ) { Window = w; Following = 0; View.SetSize( float( w->GetWidth() ), float( w->GetHeight() ) ); } void Think() { if( Following != 0 ) View.SetCenter( Following->Pos ); if( Window != 0 ) Window->SetView( View ); //printf( "View Center: %f, %f\n", View.GetCenter().x, View.GetCenter().y ); } void Follow( Entity *e ) { Following = e; } private: sf::View View; sf::RenderWindow *Window; Entity *Following; }; [/cpp]
I've got a strange problem with C# and reflection and two types not being equal even though I know they are. So when I compare the types, with Equals() or with the equality operator, they're not equal. But when I call ToString and compare that, it's the same...
I'm trying to wrap my head around how .3ds files store location information. Anyone have knowledge of 3d formats? I've located the difference in hex, but I don't know why those numbers are what they are.
Do you specifically need a 3DS parser for some reason? It's a pretty complex format. If you don't need all those features, look at MD3/MD4. They're id software's older model formats. They're very simple and concise.
Oh and another quick question. How would I go about storing item values? Like each item will have its own ID number, but how would I store all the stuff the item does or what it's called and stuff like that? Sorry about all these questions, it's my first time making a real game.
[QUOTE=ROBO_DONUT;24530486]Do you specifically need a 3DS parser for some reason? It's a pretty complex format. If you don't need all those features, look at MD3/MD4. They're id software's older model formats. They're very simple and concise.[/QUOTE] I don't, but I'm trying to get a general understanding of how 3d files in general store things. I'm obviously new to this, and am just trying to understand file creation. I'm working towards reverse engineering a file. It's simple so it shouldn't be too hard. Maybe a few months of work.
[QUOTE=WTF Nuke;24533155]Oh and another quick question. How would I go about storing item values? Like each item will have its own ID number, but how would I store all the stuff the item does or what it's called and stuff like that? Sorry about all these questions, it's my first time making a real game.[/QUOTE] Well first you want to break everything up into different places so that everything is nice and organized. The most popular method of organizing is XML, so that's probably what I'd use. Just as an example. [code] <item> <bodyArmor_001> <name>Iron Chainmail</name> <defense>3</strength> </bodyArmor_001> <bodyArmor_002> <name>Shirt</name> <defense>0</strength> </bodyArmor_002> <bodyArmor_003> <name>Steel Plate</name> <defense>7</strength> </bodyArmor_002> </item>[/code]Just as an example. How you want to organize it and how you use the xml would be up to you. Uh, can someone tell me how to tab on the forums?
Wow XML looks sexy. How would I I/O stream it in C++ tho?
In VC# you would use a Visual Studio tool called XSD.exe. It automatically generates an XSD schema from an XML file, and can turn the schema into a C# class. I think that's limited to VC# and VB though. You could always write your own class and parse the file to that class?
You may want to use structs instead if you're doing it in C++.
Structs? Why? And I'm using C++, but I got no idea how it'll parse the file. I thought the point of using XML was so that the machine can skip to values of say "strength" or "value" easily.
Use stuff like XML if you need it human readable. Else you can resort to binary files, which would work like [cpp]class foo { public: std::ostream& operator<<(std::ostream &stream) const; std::istream& operator>>(std::istream &stream); private: int bar; std::string baz; //... }; std::ostream& foo::operator<<(std::ostream &stream) const { stream << bar; stream << baz; //... return stream; } std::istream& foo::operator>>(std::istream &stream) { stream >> bar; stream >> baz; //... return stream; }[/cpp] You can now do [cpp]foo a; std::ofstream out("a.file"); out << a; out.close(); std::ifstream in("a.file"); foo b; in >> b; //values of a and b now match[/cpp] When you work with multiple platforms and share those files you'll have to look out for different endianesses. Note that with human-readable files you won't get endianesses-specific errors. JSON and YAML might also be worth a look. Googles Protocol Buffer as well. With Google you'll easily find C++ libraries for those(, if you don't wanna parse it yourself). Or code your own human-readable format. In which case Google probably won't provide you with a library :P (apart from possibly helper-libraries like regex stuff)
K thanks. I think I'll use tinyXML and parse with that.
[QUOTE=WTF Nuke;24544262]Structs? Why? And I'm using C++, but I got no idea how it'll parse the file. I thought the point of using XML was so that the machine can skip to values of say "strength" or "value" easily.[/QUOTE] I was just suggesting it because you'd know how to use them. I'm not sure what you're doing exactly.
This isn't really what the thread is for but I have a programming related question, and I didn't want to make a thread for it. Can I/should I install Visual Studio Professional alongside Express? I gained access to VS Pro today through Dreamspark, but their disclaimer states that Dreamspark-acquired software can only be used for educational purposes and non-profit projects. This probably won't be an issue since I haven't been learning long, but I'd like to know.
[QUOTE=ZeekyHBomb;24544668]Use stuff like XML if you need it human readable. [/QUOTE] I disagree so heavily with this. XML is the worst for human readability. It's way better for inter operating with different systems using one universal format. YAML, on the other hand, is well suited for a format a human can actually read and comprehend.
Huh? I sure don't have problems reading XML data with just a simple text editor.
Sorry, you need to Log In to post a reply to this thread.