
ThePentiumGuy
Avatar/Signature-
Posts
1152 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by ThePentiumGuy
-
I hope you guys keep safe :). MAN that must be scary .. living through a hurricane storm. "My Thoughts are with you (or something like that)" I'd sugest you guys umm... run? I think tornado season's coming up, and one almost hit us hard (in mass) a few years ago, but it wasn't a "5" tornado probably a 2 or a 3. Well anyways, <i know nothing about hurricane saftey> - try to keep under the ground or something (or is that for tornadoes) ;). -The Pentium Guy
-
DAMN good idea! :). I just hope they don't misplace the period (ex: Pro.Motions daily when i've blocked Prom.otions Daily)
-
Hey, Has anyone ever gotten spammed by ... spammers? :P? Well, for me, Hotmail doesn't seem to be blocking Spam from certain people - these peeps have stuff like "Dai.ly Promotion" "Info D.Aily" stuff like that in their but their "email account" is a bunch of random letters and numbers - so when I hit block, they get a NEW address the next time (a different bunch of random letters and numbers). I get these emails in sets of 4 or 5, with attachments (about 250 kb or so). After 6-8 hours, i get flooded with 4 or 5 more emails. *Sigh*. Normally I could care less because I can just hit delete ;). But now I'm starting to realize that if I don't check my email every 6-8 hours or so, my email will uhh... "overflow" (go beyond the 2 mb limit of hotmail). Heh, I checked my mail one day (after about a week or so) and I found it nearly 100% full. I would have found a LOT more, but hotmail has a policy or whatever that when you go beyond the limit, it prevents you from receiving more mail. THIS IS BAD :) <-- this prevents me from receiving mail from my friends, family, newsletters and such. Remember, I cant hit block becuase the address is randomly generated.... and yes, my junk mail filters are set to High. Anyone know of any solution to this dilemma? -The Pentium Guy
-
I rarely use Ref. A function like: Add2Numbers(a,b,Result) wouldn't make sense but something like Result = Add2Numbers(a,b) 'just an example :), obviously you wouldn't create a function for that. Functions are more useful as well. For example if in the function you decide to... i dunno, instantiate 200 classes (just.. some random example), and you don't feel like typing that in Using a return type, you'd have to specify Add2Numbers(1,2, Result) something like that, and oyu'd have to declare 'Result'. Using functions: Add2Numbers(1,2).. there you go, you dont even have to have somethign to the left of the equal sign, and now your function instantiates the 200 classes <REALLY bad example, but i hope you know what i mean :)> So using functions, its not necessary declare the extra variable if you don't want the return type (thus using it as a Sub) The Pentium Guy
-
You could use an FPS-limiter. I forgot about the mecahninsms behind it. But work out something like: every 85/1000 milliseconds: run the game loop Pent
-
Woah!!! Lemme try this and get my start time down below 5-7 seconds :-D!!!!!!!!!
-
Going to msconfig and unchecking everything on the list seemed to help :P. Zone alarm worked with SP2 lol. Pent
-
Everything is out of control of our hands
ThePentiumGuy replied to ThePentiumGuy's topic in Suggestions, Bugs, and Comments
Heh. Thanks :-). By "Our" forums i meant EDNF (or XDNT) specifically :P. Pent -
I have a quick question: I don't mean to be rebellious, and if I seem to be, I'm sorry - but why did we give our site over to iNET? Ever since the switch, I've seen numerous forum bugs that are out of our control. iNET should at least give us a copy of their source code for each MessageBoard (for example, 1 for XVBP and 1 for XDNT) so that we can use it to fix up our forums. They don't seem to be doing anything about anything.. ya know? I mean if they won't fix their problems, why cant we fix it ourselves. If we screw up the source(knowing you guys, we wont :)), its our forum that's goign to be messed since its a copy of the source just for our servers. Have any other forums complained? Seriously lol. Is it just our forum? (I hope not, so that we all can address the issues) - The Pentium Guy
-
VB Code tags.. Smileys..etc
ThePentiumGuy replied to ThePentiumGuy's topic in Suggestions, Bugs, and Comments
They should realize that this is a programming forum. This is the kind of thing that we need :D. Has anyone from XVBF(Sister site) complained yet? I was hoping maybe we both can ask them - seriously we're their(iNET's) community - they should at least privide us with some support, trying to upgrade their forums as such. I realize that other forums(such as their "OC forums") don't need this coding support. But man, all forums need smileys lol. I hate it when it replaces the smileys with the hyperlink to the image of the smiley. My suggestion: Email them once in a while asking them to patch up some minor issues(make it sound wicked minor, "we just want our code to be indented and not doublespaced". And do that for other problems as well) - The Pentium Guy -
ARGH! I restarted my comp (after 3 days after installing sp2 lol), and i just realized its SO SLOW!!! There's no spyware, I did a registry cleanup, i did everything... is this SP2 that's causing it to do this? My new computer is going SLOW, first time this happened! Should i reinstall sp2? It takes almost a full 30 seconds to boot up and log in!!!! It used to take from 5-7 seconds before sp2 (heh, yep i timed it :)), but 30 seconds.. you've got to be kidding me. That's a LONG wait... the only programs I have are: Zone Alarm (I isntalled Zone Alarm Security Suite trial over my Zone Alarm Pro trial and hehe - something in the install screwed it up and its not a trial anymore) Far cry, Doom3, and .NET. (and Adaware + REgistry Cleaner), it has no reason to go slow. An extra 25 second wait is totally unacceptable for a new comp (p4c 3.0, 1 gb ddr3200) Is anyone else experiencing these symptoms? My comp is only slow when i start it up (when I boot up, it takes like 5 seconds just to show the Welcome screen, I see a black screen and then a few seconds later i see a mouse cursor.. then a fwe seconds later it loads the blue welcome screen)... and logging in is a pain as each icon takes about 5-6 seconds to load pent
-
I installed SP2 10 min ago. It works fine for me :-). I only noticed a couple new changes: "Advanced Security" - Windows detects your AntiVirus, Firewall and Automatic Update status. and my "network connection status" icon now animates.. O_o. All my programs work fine im happy, but i noticed a deal with MSN messenger - it had to "Repair" the installation (does it automatically) after installing SP2. Other than that, my friend with XP Home noted that the status bar (the one that's under "Windows XP" when your computer boots up) changed from green to blue (making it more like XP pro) lol. Oh i noticed more: Popup blocker The "Download" box says Run and Save rather than Open and Save... and now it asks whether you want to install the file or not o_O! Pent
-
Hey, I read a number of pages saying stuff like ".NET Doesn't work with SP2" - has this been resolved, if not, is there a way to get around this? Should I even get SP2 in the first place? becuase i heard a bunch of programs don't work with SP2 now :(. Pent
-
hmm, why don't you try transforming and/or scaling the world (if they're different sizes) rather than than drawing 2.. btw, could you please explain what these arguments are: s.Draw2D(t,new Point(32,32),0,new Point(32,32),Color.White); s.Draw2D(t,Rectangle.Empty,Rectangle.Empty,new Point(512,384),Color.White); Im confused as to which is Width/Height and which is x,y,z pent
-
Pocket PC Reccomendations for .net development
ThePentiumGuy replied to Denaes's topic in Water Cooler
Look into BestBuy, they've got the best warrantees + good customer support -
:D yeh :-).
-
Its Acura RSX :D. <- my dream car for under $20,000.. modded with Mugen :D (drifts off again ... daydreams ...)
-
lol sam' date=' im not getting a new car.. my [i']parents [/i]are :D, so if our car dies by then, its possible that i could drive it to school :rolleyes: (man oh man i wish, a 270hp V6 TL with nav............*daydreams and drifts off*..........) edit: Yeah its 16 ;p
-
Heh. Kia eh? It's a good car for that price range. But I don't like the fact that they copy EVERY SINGLE car company ;p. Look at the new amanti: http://www.kia.com/amanti/index.php - doesn't that look like a Benz or a Jag? (The grille looks like a Jaguar grille, and the lights are either oversized Jaguar lights or E-class lights with a twist), and the lights in the back sort of look like the V12 Vanquish o_O. This isn't the only car that does that :p, Hyundai does it plenty of times. Pent
-
Really? Wow i'll have to look into that good deal :D What car?
-
Hey, I kind of got curious about what kind of cars you guys have. *Shrugs* My dad has a '96 Camry(http://www.xtremedotnettalk.com/x_images/images/smilies/frown.gif) and a '03 Sienna (double http://www.xtremedotnettalk.com/x_images/images/smilies/frown.gif). We might purchase an Acura TL, an Infiniti G35 or an Acura MDX soon. (the G35 might be ruled out though, becuase of some mechanical defects - so basically we're deciding on a Car (TL) or an SUV (MDX)) I'm not a big fan of BMW's as they're totally overpriced (by about $7k or $8k, in some cases - even more!). I mean - for ~$39,000 you get a 187hp 5 series with virtually no options except leather ;p. Their styling appeals to me. VW: Boring looking. They're also a bit overpriced Audi: Cool looking, but they've got a VW flavor (they are owned by VW) to them and they're quite common Lexus - The majority of their cars are aimed for old people, but their cars are nice (but overpriced) Acura - ;D. My fav (I like all their cars except for the NSX (TERRIBLY OVERPRICED - ~$90,000 and you get a V6 ~290hp car!) and the RL (for old people lol) - well priced (except for the NSX http://www.xtremedotnettalk.com/x_images/images/smilies/smile.gif) Honda - Great reliability, great price, excellent resale value, great car (wish we bought the Accord rather than the Camry at that time.. but I wouldn't have known that this was the car that would appeal to my tastes back when i was like.. 6) Toyota - ... eh, we own 2 and we haven't had good luck with 'em(radiator leaked twice within 20k miles, braking problems, eh.. you can't find any good modding kits for them http://www.xtremedotnettalk.com/images/smilies/biggrin.gif, whereas you can find a ton for honda). I have nothing really against them other than that. Well - tehre is 1 more thing: I'm urging my parents to drive the Camry until it dies so that when (actually the better word is if ;p) I get my license next year, the car will be dead before I get it ;p. Ah cmon - seriously, I don't want to drive a Camry, and there's no way I'll drive a minivan! Heh, basically I like Honda/Acura (Acura is the honda luxury division in the US) The Acura TSX = European Honda Accord. And I honestly think that European cars are overpriced and underpowered (look at benz - i mean you can't get a CD PLAYER standard for the S600 (i think) which is over 100,000.. or that could have been a rumor http://www.xtremedotnettalk.com/x_images/images/smilies/smile.gif. Pent
-
Managed DirectX 9 (Part 2) - Drawing a Sprite
ThePentiumGuy replied to ThePentiumGuy's topic in Tutors Corner
The next thing to do is instantiate our VertexBuffer: vBuffer = New VertexBuffer(GetType(CustomVertex.PositionTextured), 4, dxDevice, Usage.WriteOnly, CustomVertex.PositionTextured.Format, Pool.Default) 'GetType(CustomVertex.PositionTextured) - This VertesBuffer will hold CustomVertex.PositionTextured vertices '4 - It'll hold 4 vertices (4 vertices make up a square right) 'dxdevice - It'll use this device 'Usage.WriteOnly - We're only going to write to the buffer, not read from it 'CustomVertex.PositionTextured.Format - DirectX is retarded and wants the argument again? Can't think of an explanation for this :). 'Pool.Default - Specifies how we want to handle the memory pool. Woah we're not going to mess with this so we'll let Direct3D choose how it wants to handle the memory. Before setting the vertex positions and such, we need to lock the vertex buffer. If we don't lock the buffer - it can lead to memory problems. 'Lock the buffer before use. 'The reason for the equal sign is basically, you're telling the Vertices 'to store/accept its data into the buffer Vertices = vBuffer.Lock(0, LockFlags.None) '0 - Lock the entire buffer. Any number greater than 0, you're only going to lock that offset in bytes 'LockFlags.None - Just lock it.. whatever, don't specify any more options Imagine the vBuffer as a row of data going from left to right <0123456789> The offset specifies how much you want to lock it. For example, since we specified 0, we're going to lock the entire buffer. If we specified 6, we'd lock: <6789>. The next thing we're going to discuss is Tu and Tv. They essentially specify what corner of the texture goes where. Tu and Tv are written like coordinates.. for example (tu,tv). Here's a quick example of how tu and tv work: A tu,tv of (0,0) would be the topleft of the square. A tu,tv of (1,1) would be the bottomright of the square. You'll understand more as we go along. Now that we've locked it, we're going to tell the vertices where they are! 'Set the vertices. The arguments are written like (X,Y,Z,tU,tV) 'We set its Z to 1 so that it appears "Forwards" a bit. Setting a Z to 0 would make it too close to the screen. Setting a Z of like.. 8 would make it too far 'View the tutorial for more information on how all this works 'TopLeft Vertices(0) = New CustomVertex.PositionTextured(topleft.X, topleft.Y, 1, 0, 0) 'TopRight Vertices(1) = New CustomVertex.PositionTextured(topleft.X + width, topleft.Y, 1, 1, 0) 'BottomLeft Vertices(2) = New CustomVertex.PositionTextured(topleft.X, topleft.Y + height, 1, 0, 1) 'BottomRight Vertices(3) = New CustomVertex.PositionTextured(topleft.X + width, topleft.Y + height, 1, 1, 1) So now you see how tu,tv work? Let's recap. The first line (where you set Vertices(0)) has a tu,tv of (0,0). That means that the top left of the texture goes on that vertex. Vertices(2) has a tu,tv of (0,1), that means that the bottomLeft of the texture goes on that vertex. Btw, the 0's and 1's work like X and Y coordinates. (0,0) = TopLeft (0,1) = TopRight (1,0) = BottomLeft (1,1) = BottomRight I'm sure you understand the other arguments (for X and Y, the Z argument is explained in the comments). The last line in the load sub: 'Unlock the buffer - we're ready to render this thing ;D vBuffer.Unlock() Now its time to create a Render sub: PublicSub Render() 'Sigh, set the vertex format AGAIN :). dxDevice.VertexFormat = CustomVertex.PositionTextured.Format 'We're going to draw whatever is in the buffer. dxDevice.SetStreamSource(0, vBuffer, 0) '0 - StreamNumber. Saying 0 draws all the [memory] streams (meaning vertices) in the buffer 'vBuffer - Draws the content of our VertexBuffer '0 - Offset. Draws the entire content of the buffer 'Draw the texture over the square we've just drawn. dxDevice.SetTexture(0, SpriteImage) '0 - Refers to the TextureStage(?) 'SpriteImage - The image we draw on our quad 'Draw our shape dxDevice.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 2) 'PrimitiveType.TriangleStrip - We draw using a TriangleStrip as opposed to a TriangleList '0 - Our startvertex is 0 (remember the Vertices() array, the first vertex is Vertices(0)) '2 - The PrimitiveCount.. meaning 2 Triangles("Primitives") :). EndSub Heh, I hope you've understood that - it's all in the comments ;D. Basically you: Set the vertices Set the texture over the vertices Draw the textured box. Now go back to GameClass, in the globals, Dim Alex As clsSprite At the end of the Initialize sub: Alex = New clsSprite(D3Ddev, "down1.bmp", New Point(0, 0), 32, 32) In between BeginScene and EndScene: Alex.Render() Run it! :). You should see the sprite of your choice rendering. Err.. not really. You have to turn off lighting (do this at the end of the Initialize sub): 'Our object is so close to the screen that the lighting conflicts with its visibility,'making it appear black, so we disable lighting. D3Ddev.RenderState.Lighting = False That's it for this tutorial, the next one will be about Matrices/Transformations The source code below is compatible with both 9.0a and 9.0c. VB.NET 2002 users shouldn't have a problem with this source. VB.NET 2003 users can easily convert by opening the file and clicking OK when it asks. Mods, the exe was removed from the bin and obj folders. TexturingAQuad.zip -
I will be making a set of 5 or 6 tutorials, each of which include source for Visual Basic.NET 2002 and Visual Basic.NET 2003. C# tutorials may or may not follow. These tutorials are to give you guys a jumpstart to some Direct3D. I hope you enjoy these. edit: ARGH! Font got screwed up on this one. Stupid thing doublespaces it automatically. The source code got 'squished' together. I patched up as much of it as possible. Please bear with me, but the source code is fully commented and follows along with this tutorial - so it might be better to paste from there rather than here. This tutorial will teach you how to display a textured quad(square). In this tutorial we're going to get into some hardcore definitions as we move along. Well the first thing you need to know: What's the simplest polygon? A triangle of course! This is why Direct3D constructs all of its shapes from triangles. A square is 2 triangles of course (draw a diagonal line from corner to corner and voila). This is how we're going to construct our square in this tutorial. We'll get into more terminology as we move along. Create a new project. Copy the same GameClass as the previous project ("Initializing The Device"), and use the same Form1 code as before. For this tutorial, we're going to make an adjustment here which we'll discuss in the next tutorial(dealing with Matrices/Transformations). Go to your GameClass (in your new project), and at the very end of the Initialize sub, type this in: D3Ddev.Transform.View = Matrix.OrthoOffCenterLH(0, DP.Width, DP.Height, 0, 0, 10) Again, don't worry about this line in this tutorial, I'll explain more in the next tutorial. Create a new class called clsSprite and at the top, Import the 3 DLLs which you usually import: Imports Microsoft.DirectX Imports Microsoft.DirectX.Direct3D Imports Microsoft.DirectX.Direct3D.D3DX Dim the following global variables in your class. 'Holds a copy of the device to be used in the class Private dxDevice As Device 'Holds the image that will be drawn onto the square Public SpriteImage As Texture 'This is the buffer in which the vertices of the square will be stored Public vBuffer As VertexBuffer Create a contstructor: Public Sub New(ByVal lDevice As Device, ByVal ImageName AsString, ByVal TopLeft As Point, ByVal Width As Integer, ByVal Height As Integer) 'Store a copy of our device in the class dxDevice = lDevice 'Load the image, we specify the arguments that we need to create a square Load(ImageName, TopLeft, Width, Height) EndSub Don't worry about the error, we're going to create a Load sub in a minute http://www.xtremedotnettalk.com/x_images/images/smilies/smile.gif. First, a quick note: We can create a square given the TopLeft coordinate. the Width, and the Height. It works like this: TopLeft = (TopLeft.X, TopLeft.Y) TopRight = (TopLeft.X + Width, TopLeft.Y) BottomLeft = (TopLeft.X, TopLeft.Y + Height) BottomRight = (TopLeft.X + width, TopLeft.Y + Height) With some simple sketches, you'll realize that this holds true. Now its time to do some hardcore coding. Create a sub called Load: Public Sub Load(ByVal ImageName As String, ByVal topleft As Point, ByVal width As Integer, ByVal height As Integer) The next thing we're going to do is talk about Direct3D Vertices. The thing about these vertices is that they are different from Math vertices. A D3D Vertex can hold various proprties. Some of it includes Position - Just like a math vertex Color - .. yes, color, vertices can hold colors Texture - you can place an image on top of the vertices Normal - Stuff to do with lighting In our case, we want our vertices to hold the Position and the Texture. So in the Load sub, 'Declares an array of vertices that will make up the square. Dim Vertices() As CustomVertex.PositionTextured Now we have to set the texture: 'SpriteImage will hold our .. Image :D. SpriteImage = TextureLoader.FromFile(dxDevice, ImageName) ----- Now for a quick note. We know that a square is composed of 2 Triangles. That means that we'd need 6 vertices (3 per triangle) to make up a square! Nope ;0, thank goodness Direct3D has a way around it. Later in our code, we're going to set the PrimativeType (Primitiave means Triangle). The primitave type specifies how our shape will be creative. The 2 most common PrimativeTypes are: PrimativeType.TriangleList - Using this method, we'd have to create 6 vertices for a square PrimativeType.TriangleStrip - Using this method, we only need 4 triangles per square. Take a look at these links from MSDN, they have pictures with explanations to help you understand what this is all about. TriangleList - A triangle list is a list of isolated triangles. They might or might not be near each other. A triangle list must have at least three vertices. The total number of vertices must be divisible by three. TriangleStrip - A triangle strip is a series of connected triangles. Because the triangles are connected, the application does not need to repeatedly specify all three vertices for each triangle. So when we create our square, it is better to use a TriangleStrip. This way, There are 3 vertices (TopLeft, TopRight, BottomLeft) for the triangle - and D3D senses that 4th vertex (BottomRight) is "alone" and connects that vertex with the TopRight and BottomLeft. Thus, I opted to use a TriangleStrip to save memory. -Splitting post into 2 to overcome character limit
-
Hehe - www.vbprogramming.8k.com - my site It doesn't have platform game specific tutorials, but it has tutorials for game programming. Pent