Re: [Plib-devel] Re: KobayashiMaru & plib
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-10 03:09:15
|
Alexander Rawass wrote: > > Look in ssgVtxTable.cxx - find the 'draw_geometry' routine and add up the > > number of vertices and polygons right there - into a global variable somewhere. > > Maybe I'd need also something like > ssg_entity=createLevelOfDetailFromEntity(int nr_of_polygons, orig_entity) > > meaning a routine that takes and entity and tries to reduce somehow the > number of triangles in that entities, till there are (more or less) only > nr_of_polygons left or so. > There are some Modelers which have this feature, of course the results > look like shit, but as part of plibssg I could break down high-detail > models to low-detail, as long as I've got a shortage on models. The *trendy* way to do this is to collapse triangles by moving one vertex of the model to the one next to it - then removing all the zero area polygons that result. You decide which vertices to 'collapse' in this way as an offline process - choosing which vertex of the model is least visually important - so you collapse that first, then work gradually into the more and more 'important' vertices. Finally, sort your vertices in a vertex array so that the first one in the array is the most important, and the last is least significant. You can do the same thing with the 'index' array - so that polygons that are deleted first are at the end of the array. Choosing 'importance' is a 'black art' - but is do-able automatically - at least to some degree. It would be cool to derive a class from ssgVtxArray to do this...although the automatic vertex-importance selection code would need to be an external program - which begs the issue of what file format to use... ".SSG" I suppose - that's extensible so you could extend it to do what you need for your new class. *NOT* for beginners. For the first step, figure out how big your model is - and work out at what range it'll be (say) less than 3 pixels across - and switch it out into a simple tetrahedron of an appropriate colour (4 triangles - one triangle-strip). Figure out the range at which it'll be less than one pixel - and throw it away altogether at that range. Use an ssgRangeSelector node to do that - and you'll see an immediate improvement (I suspect). > > If you ARE using GLUT text, I can tell you for *SURE* that that's the major reason. > Now I'm timing the Huds, now I see, and I have even a new Hud (Radio_Display) > that displays lots of message, and the more messages, the slower. > > As a novice, I wouldn't have thought of that - or at least, that it will > draw so much. Sorry. S'OK - that's why we are here to help! > > > > However, for a fast action game, nobody will have time to read all that tiny > > > > text anyway. It's generally considered a good idea to use as little text > > > > as possible in a game - preferably none at all. > > > > > > The text will even get more - the game is far from being 1.0.0 , and most > > > output is more or less debugging ;-) > > > > Well, I think you should stop and think about that. > > I'll use puFnt as soon as I can. That'll help - but: a) puFnt text can be fuzzy at small scales. b) it's still two triangles per character - so 200 characters on-screen is 400 poorly-tristripped triangles. I think you should consider VERY carefully how much text you need to display. Can you only display ship stats when the thing is clicked on or something? Can you freeze the action while they read "radio" messages - or scroll them slowly across a small region of the screen so you can only see a handful of characters at a time...that can actually look rather cool. > > > Yes. But I am as bad in drawing images as for modeling. > > > > :-) > > > > Write a program that does a 'glReadPixels' of the graphic you have now - save > > it into a file that you can draw (as a texture) instead of the original. > > > > You really *will* need to use some minimal painting skills before you are > > done with this game. > > No, I simply need a lot of people with great painting skills to help me > there :-) You have to be realistic. THAT'S NOT GOING TO HAPPEN. THere have been long threads on the LGDG (Linux Games Developer Group) about the lack of motivated artists who'll work for nothing. Response from the artists strongly suggests that what few of them WILL help are not likely to jump into just any project - they are going to look for projects with experienced programmers with a proven track-record. Even if you did find such a person, they are not going to be your 'art slave'. You won't gain much support if you say things like "Paint me a radar display that's 64x64 pixels, translucent and looks like a spider-web". If you are *REALLY* lucky, you may find an artist who will be interested in designing things like spaceships or big-breasted aliens women with three heads and forked tongues...but they are unlikely to be interested in doing these kinds of silly little jobs. You just need to practice and learn GIMP. It's not that hard to draw things like instruments, little icons and such like. > > > Also, I could go and say, hey, here's KobScene, an open source > > > SceneGraphHandler, for whoever might need it. > > > It's also a possiility to benchmark different scenegraphs. > > > Just for interest. > > > > I guess. I'd do that at the outset of the project - then pick one > > and run with it. > > I'd rather want _them_ to do it for me, since I don't have time ;-) *NOT* going to happen. You need a dose of realism. Let me tell you about Tux-A-Quest-for-Herring. It was the first *ever* 3D game for Linux. I was 'slashdotted' *TWICE* (once when I released initial screenshots and again when the game was ready for release). I've had 5-star ratings (the best possible) on every review site I know of (TwoCows, HappyPenguin, etc)..every major Linux distribution has it on their CD...so I have to imagine that people generally like it a lot. I got: 150,000 people visiting the web site over the first 12 hours. 15,000 people downloaded it in the first 12 hours. 1,500 emails complaining/complimenting/thanking me for TuxAQFH within the next week or so. ...one year later... 150 people are subscribed to the Tux mailing lists. 15 people have *ever* offered to help with artwork/music/models. 1.5 (OK...2 actually) other people have actually contributed *anything* to Tux *ever*. One piece of unusable music - and a couple of unusable models. No significant chunks of code at all. *NONE* of those things has ever been useful enough to distribute with the game. Now, *you* won't get slashdotted - they don't report freeware game releases anymore. So, how many people do you think will be helping you at the end of the day? > > > And: Quake, Quake, Quake, all people in my real life play Quake. > > > There are a lot of players, editors, engines - I just hope by > > > saying - "hey, my game uses free quake" to attract those people, > > > especially the ones that design models to my game... > > > > Well - I doubt it. > > But what happens, if the brave Starfighter Pilot lands on some weird > planet and has to rescue some mamsel by simply going afoot, it'd > be a chance to use all those quake-stuff for this subtype of > KobayashiMaru. But do you really believe that as a beginner 3D programmer, you will manage to write a single game that spans deep space PLUS flight sim PLUS hand-to-hand combat and integrates all those seamlessly? Not one single game throughout the entire history of game making has ever been that ambitious. Not one. Remember that *very* likely you'll be doing it single-handedly with no artistic or music input? I don't mean to try to put you off - but a) Be realistic about what you can achieve in reasonable time. b) Know your limitations. c) Start with something small - and you *might* get it finished to the point where it's playable. It would be better (IMHO) to concentrate on making a good space game - and forget (for the moment) about the other things. Remember - it took 100 people working full-time 5 years to create Mario'64. You have about three times that amount of work. You should be finished in about 1500 years. You are still learning the basics like matrix algebra and that text is S-L-O-W. > Are there any FlightGear developers reading? Several. > I'd like also to include your 3D Terrain Rendering Engine in my game, > if it could be easy to access it like > > terrain.init(terrain_data_filename) > terrain.draw(sgMat4 camera_position) > > please show me a way to easy access the code, or write me a class > that does this thing for me. The 'terragear' spin-off project is like that - but if you are planning to have things zoom around at several times the speed of sound, you'll need a LOT of terrain. Many, many megabytes. > Dear Steve, you should also be aware that at some time in the > future, your game Tuxkart will be playable from within KobayashiMaru > (but maybe with other focus). OK...maybe. TuxKart is a VERY simple game...4,000 lines. > This will be done by loading the tracks and buildings as 'world' object > into KobayashiMaru, extending SpaceObject to KartObject (routines > MoveShip/PitchShip) that behaves like a Kart, write a KI KI_KartDriver that drives this > thing and - pop - KobTuxkart. That's *VERY* naive. Have you thought about collision detection yet? Scale down your rhetoric until you've done it. You are a *classic* newbie who understands just enough to think they can take over the world. When you have a couple of *finished* 3D games done, come back and tell me how easy this *actually* is! > What you'd think I should do? Look before you leap! > Tell sourceforge to stomp it all in, homepage, ftp, mailing list > and create it all new with new name, two weeks after opening? Yes - what do you have to lose? Changing the name everywhere and deleting the references to X-wings and such won't be more than a couple of hours work - open a new sourceforge account under the new name copy everything over - then tell their support guys to dump the old site because it's been superceded. > I don't like that idea, I don't like your scenario either :-( Well - it's your call. It could be worse. I dumped an entire game (Harry Potter/Quiddich) when I got 'cold feet' over the legalities after the book became a phenomenal success and they announced a feature film! > > We live in a litigous society...and the owners of the Star{Trek,Wars} > > rights are amongst the nastiest of people to upset. Just don't put > > Mickey mouse ears and a Coke 'swirl' on your spaceships! > > Moment - thank you very much for showing me how to make money with > my game :-) :-) > IF I probably contact Coke and Disney and tell them - "Would you > like to sponsor me?", they'd probably give me money to do exacly like > that, and you'd wonder how much advertisement you'll see in space ;-) Have you seen the adverts in TuxKart's first level? Look at them *carefully* and wonder how I chose them! My lips are sealed. > Please be aware that I'm only joking. I'm not! -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |