[QUOTE=Vbits;26040618]The code that powers that very function
[csharp]
public bool Intersects(Rectangle value)
{
return ((((value.X < (this.X + this.Width)) && (this.X < (value.X + value.Width))) && (value.Y < (this.Y + this.Height))) && (this.Y < (value.Y + value.Height)));
}
[/csharp]
Though looking at the code it should work fine on fast moving objects, if not enlighten me.[/QUOTE]
Say you have two shapes, A and B which are fairly small. A is 5 pixels across, and B is 5 pixels across, and both have the same y co-ordinates. If shape A is moving rightwards at a speed of >10 pixels horizontally, it could appear past shape B, not inside it, so it will travel straight through and the collision wont be detected. See?
The is a very valid point, Thank you for enlightening me.
[QUOTE=Robert64;26039499]Well the main problem is:
[csharp]public void Save( BinaryWriter stream )
{
stream.Write( GetEntID( this ) );
long lengPos = stream.BaseStream.Position;
// Mystery byte appears here only if this is an inventory item
stream.Write(( ushort ) 65535 ); // Will be overwritten
long startPos = stream.BaseStream.Position;
SaveInternal( stream );
long endPos = stream.BaseStream.Position;
stream.BaseStream.Seek( lengPos, SeekOrigin.Begin );
stream.Write(( ushort )( endPos - startPos ));
stream.BaseStream.Seek( endPos, SeekOrigin.Begin );
}[/csharp]
This is in the base Entity class, and works when saving everything except inventory items.
[editline]13th November 2010[/editline]
As you can see I write a ushort at one point, then after the entity has saved it goes back and writes how many bytes were saved by the entity at that position. This is where the mystery byte appears, after the first thing written and before the second.[/QUOTE]
Wanna open it in a hex editor and point out the problem?
Use Ray-Circle collision where the radius of the circle is the sum of the radius of both objects and the Ray represents the translation of the fast-moving object since the last check.
Jeez this page needs some image of something other than code.
Well if nobody else wants:
[img]http://filesmelt.com/dl/doabarrelroll.gif[/img]
do a barrel roll
Edit: Maybe a little fast.
[img]http://anyhub.net/file/yougeely.png[/img]
working on my music player
[quote=geel9;26043359][img_thumb]http://anyhub.net/file/yougeely.png[/img_thumb]
working on my music player[/quote]
i'll sue you for stealing my photo
[QUOTE=VeryNiceGuy;26043372]i'll sue you for stealing my photo[/QUOTE]
VNG is chad, ignore him.
[media][img]http://dl.dropbox.com/u/2014606/content.png[/img][/media]
Working on a RPG, does not look good but makes pretty decent content
since geel stole my glory i'll borrow it back for a bit
[img]http://filesmelt.com/dl/111111.png[/img]
Very bad shop to make it look like you made it. You have no soul, Chad.
I was thinking the same thing, looks alot like Photoshop, especially due to the fact the themes are the same.
And Reflections, and coloring, and oh look VeryNiceGuy just edited in music.
No I'm lying it's VNG's program.
[QUOTE=geel9;26043547]No I'm lying it's VNG's program.[/QUOTE]
I've dropped the civil lawsuits until further notice... :3:
[QUOTE=geel9;26043547]No I'm lying it's VNG's program.[/QUOTE]
VNG hacked in to geel9's account to frame him!
[QUOTE=Jookia;26043590]VNG hacked in to geel9's account to frame him![/QUOTE]
his password is popcorn
[QUOTE=Maurice;26042952]Jeez this page needs some image of something other than code.[/QUOTE]
behold
[IMG]http://imgur.com/9GVnd.png[/IMG]
[IMG]http://imgur.com/TtYwb.png[/IMG]
[QUOTE=Maurice;26042952]Jeez this page needs some image of something other than code.
Well if nobody else wants:
[img_thumb]http://filesmelt.com/dl/doabarrelroll.gif[/img_thumb]
do a barrel roll
Edit: Maybe a little fast.[/QUOTE]
Details please?
[editline]14th November 2010[/editline]
[QUOTE=Jookia;26043590]VNG hacked in to geel9's account to frame him![/QUOTE]
Id hardly call reading a text file "hacking"
[QUOTE=NovembrDobby;26043648]behold
[img_thumb]http://imgur.com/9GVnd.png[/img_thumb][/QUOTE]
Yay updates !
Is that .... multiplayer I see?
[QUOTE=Xerios3;26043745]Yay updates !
Is that .... multiplayer I see?[/QUOTE]
I'm afraid not, just bots. It's actually quite an old feature now (no time etc etc). There's kind of a system in place for multiple AI and human players but I'd have no clue where to start with networking.
What the hell is that
[QUOTE=VeryNiceGuy;26043647]his password is popcorn[/QUOTE]
Holy crap! That's been my password for the past 10 years D: (no joke)
[QUOTE=Richy19;26043709]Details please?[/QUOTE]
Just one of those "avoid obstacles" games except without obstacles (or a player (or a game)) yet. The 3D is just calculated points with values that "feel right", but it's just ~100 lines of code and runs at >500 fps yay.
[QUOTE=Maurice;26043967]Just one of those "avoid obstacles" games except without obstacles (or a player (or a game)) yet. The 3D is just calculated points with values that "feel right", but it's just ~100 lines of code and runs at >500 fps yay.[/QUOTE]
:O, what language is it? And you using openGL or directX?
[QUOTE=Torrunt;26043926]Holy crap! That's been my password for the past 10 years D: (no joke)[/QUOTE]It was also the password the kid whom stole Sarah Palins yahoo account chose!
[QUOTE=Richy19;26044012]:O, what language is it? And you using openGL or directX?[/QUOTE]
Nono I mean that it's not 3D. It's like if I draw a few lines on [url=http://filesmelt.com/dl/3d.png]a piece of paper[/url] and tell you it's 3 dimensional.
Also it's löve/lua which always makes me feel inferior to you C++ or C# or whatever guys.
[QUOTE=Maurice;26044042]Nono I mean that it's not 3D. It's like if I draw a few lines on [url=http://filesmelt.com/dl/3d.png]a piece of paper[/url] and tell you it's 3 dimensional.
Also it's löve/lua which always makes me feel inferior to you C++ or C# or whatever guys.[/QUOTE]
Damn straight.
Nah just kidding we love you Maurice.
Im starting to get tired of C++'s lack of pretty much everything and wondering if i should put learning C++ on hold and use C# for a bit so i can get better at general programing.
[QUOTE=Richy19;26044293]Im starting to get tired of C++'s lack of pretty much everything and wondering if i should put learning C++ on hold and use C# for a bit so i can get better at general programing.[/QUOTE]
Use Winforms
NEVER GO BACK
I very much like the .Net library and I also like the lack of header files in C#. It depends upon what you want to do with your programming - If you want a career in the games industry then C++ should be your main language. Having said that, knowing both is always a bonus.
Sorry, you need to Log In to post a reply to this thread.