[QUOTE=Chandler;16872914]Well if you look at the map from a top down view, and side view, and a front view, you're running it three times. Michael Abrash's Black Book of Programming discusses creating a BSP Compiler. You can find it as a free download from gamedev.net
But I suggest you finish your asteroids thing though.[/QUOTE]
Holy shit - Abrash, for free? I read his article about the BSP implementation in Quake but hoyl fuck an entire book?
Oh nice, I've never heard of Abrash's book, I'll look a little into it.
[QUOTE=Jallen;16874398]I'm curious as to how you did that...[/QUOTE]
[code]
vector < vector <RyPoint> > MakeCompoundShape(vector <RyPoint> shape) {
vector < vector <RyPoint> > shapes;
for(Rotator i(0, 0, shape.size()- 1); (unsigned)i.place< shape.size(); i.place++) {
if(InteriorAngle(shape[i- 1], shape[i+ 0], shape[i+ 1])> 175) {
for(unsigned int j= 2; j< shape.size(); j++) {
if(InteriorAngle(shape[i- 1], shape[i+ 0], shape[i+ j])< 175) {
vector <RyPoint> new_shape;
for(unsigned int t= 0; t<= j; t++)
new_shape.push_back(shape[i+ t]);
for(unsigned int t= 1; t< j; t++) {
shape.erase( shape.begin()+ (i+ 1) );
i.end--;
if( (i+ 1)< i.place)
i.place--;
}
shapes.push_back(new_shape);
break;
}
}
}
if(shapes.size()== 1)
break;
}
shapes.push_back(shape);
if(shapes.size()== 1)
return shapes;
else {
vector < vector <RyPoint> > full_compound;
for(unsigned int i= 0; i< shapes.size(); i++) {
vector < vector <RyPoint> > re_compound= MakeCompoundShape(shapes[i]);
for(unsigned int j= 0; j< re_compound.size(); j++)
full_compound.push_back(re_compound[j]);
}
return full_compound;
}
}
[/code]
The Rotator is a object I came up mainly for dealing with vectors. If you have a rotator who's place is 0 and you ask for the rotator minus 1, it will rotate the place back to the end value; the end of the vector. That way, you can traverse vectors like they were circles, with worrying about vector subscript errors or extra code to deal with special circumstances concerning the end of the vector.
So Don't worry about the rotator, just think of it as a normal iterator. As for the rest of the code, I'll have to explain it later as I have to go out.
[B]edit:[/B]
Anyways, the rest is pretty self explanatory, it just checks to see if each angle is concave, and if so, it finds a point it can connect to that makes the angle convex, and then chops the asteroid into two pieces based on this information.
trying to make a parser for Radiant .maps:
original:
[media]http://www.novemberdobby.com/radiant.png[/media]
game:
[media]http://www.novemberdobby.com/game.png[/media]
:eng99:
[QUOTE=NovembrDobby;16877347]trying to make a parser for Radiant .maps:
original:
[media]http://www.novemberdobby.com/radiant.png[/media]
game:
[media]http://www.novemberdobby.com/game.png[/media]
:eng99:[/QUOTE]
Soooo close! lol, but sounds challenging. Why are you making a parser for it?
Just because I want to try, it's good for learning C++ which I've pretty much only just started with.
[QUOTE=NovembrDobby;16878284]Just because I want to try, it's good for learning C++ which I've pretty much only just started with.[/QUOTE]
Yeah it looks really interesting, I might try to do something like that when I get some time.
At first I thought you made the editor, too.
Wait, did you make the editor?
[QUOTE=bigdoggie;16878773]At first I thought you made the editor, too.
Wait, did you make the editor?[/QUOTE]
Um, that's GTK Radiant...
I'm working on learning javacc and jjtree grammars so I can build a parser.
Dobby is a really good modder for the Call Of Duty game series
@Jallen
That looks like a CoDRadiant for call of duty
[QUOTE=Jallen;16878847]Um, that's GTK Radiant...[/QUOTE]
I've never heard of Radiant.
[QUOTE=bigdoggie;16879010]I've never heard of Radiant.[/QUOTE]
Most games originally based on Quake 3 use their own versions of Radiant for mapping.
It's like Hammer
[QUOTE=raccoon12;16878893]Dobby is a really good modder for the Call Of Duty game series
@Jallen
That looks like a CoDRadiant for call of duty[/QUOTE]
Ah. GtkRadiant looks pretty much identical
[url]http://www.lucasfiles.com/screenshots/704941.jpg[/url]
I indeed do see the similarities, but I never knew about it.
Thanks.
Sorry for no screenshots or updates today guys - I've been assigning some work to the other guys on our team as well.
Instead, if you have firefox 3.5, you can visit the W.I.P website:
[url]www.namelezz.net/asp/[/url]
Just got back to the .map importing and what the hell, no wonder it isn't working...the co-ordinates in the file seem garbled so half of the time you get a really thin triangle instead of a normal face. Going in to Radiant and navigating to those co-ordinates sends you to some random spot along the object :/
Tweaked some code and got the internal stuff to run faster which allowed me to create a flip tile, resulting in being able to create messes such as this:
[media]http://www.youtube.com/watch?v=9jxFg_175ZE[/media]
It also allows me to up the speed of the songs by a hell load!, Super fast death metal songs D:
(There's no actual timing issues, It seems Fraps likes to mess it up somehow o.0)
Still trying to devise a way of saving the grid and reloading it, It's looking like a custom file format of sorts is best.. XML Serialization Resulted in an 80MB File It's one massive array of tile_structs :v:
that sounds hilarious :v:
[QUOTE=Tezza1234;16886614][media]http://www.youtube.com/watch?v=9jxFg_175ZE[/media][/QUOTE]
The best thing about this is it sounds like a woman is tied to the train tracks, or we're watching a silent film. Or we're watching a woman being tied to a silent train. Or something.
In other news, the build system I was working on imploded, but I found one that's really easy, and uses a lua file (of all things :v:). It's called premake and it's a bit limited (You can't rename the cc/cxx compiler), but so it works great otherwise, allowing you to have multiple solutions/projects in one script, to create one massive makefile out of all of it as well.
I'm currently adding home brew support (such as devkitPSP/ARM/Wii) as well as support for [url="http://www.tortall.net/projects/yasm/"]YASM[/url] which is a great x86/x64 assembler(it takes both AT&T as well as NASM syntax), and the developer seems interested in it, so I get to add code to an open source project and have it not suck :woop:
EDIT: For those who might want to read the book
[url]http://www.gamedev.net/reference/articles/article1698.asp[/url]
The book is mostly about assembly for the x86, (with the rest in C) but since most of us are running PC's it wouldn't hurt to see how they rocked it hardcore in the 90's.
For those of you who DON'T know who Michael Abrash he was at one point John Carmack's equal. In this book Carmack even writes the foreword. Also, if anyone wants it I happen to have Abrash's "The Zen of Assembly Language" so if you want me to upload it say the word (The book is out of print, and available for download elsewhere, but I know you guys are lazy :P
yeah let's learn assembly.
Namelezz, what is yours coded in, i'm curious.
I think he said construct or maybe that was someone else.
[QUOTE=efeX;16894435]yeah let's learn assembly.[/QUOTE]
Just because it's about one language doesn't mean you can't apply it to another. Optimizing isn't a one trick pony.
[img]http://img36.imageshack.us/img36/6325/screen1bkh.jpg[/img]
Sprites and menu states work. Except for Options. Going to try to set up a multiple sprite loader. Yes that is bloom, it's for the actual game itself.
Don't comment on the window title :v:
ohai xna
[QUOTE=efeX;16895920]ohai xna[/QUOTE]
Yeah, and?
[QUOTE=efeX;16895920]ohai xna[/QUOTE]
If you're going to belittle his work, at least have a decent go.
All the features he has implemented are conveniently covered by XNA tutorials and samples and it doesn't look like he's done more than stick them all into one app.
[url]http://creators.xna.com/samples/gamestatemanagement[/url]
[url]http://creators.xna.com/en-US/sample/bloom[/url]
[QUOTE=blankthemuffin;16897311]If you're going to belittle his work, at least have a decent go.
All the features he has implemented are conveniently covered by XNA tutorials and samples and it doesn't look like he's done more than stick them all into one app.
[url]http://creators.xna.com/samples/gamestatemanagement[/url]
[url]http://creators.xna.com/en-US/sample/bloom[/url][/QUOTE]
Funny how I don't even understand any of the shit they cover in those tutorials. Only one I actually used code from is the bloom one. Gamestatemanagement as you linked, I didn't even look at.
Oh sorry I didn't realise because someone has the same features they used already written code..It's called a base for a reason. I'm adding the gameplay as we speak.
Sorry, you need to Log In to post a reply to this thread.