
ThePentiumGuy
Avatar/Signature-
Posts
1152 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by ThePentiumGuy
-
DirectSound?
-
:o! Don't use timers. Slow. Bad. Namespace Game.Util Public Class clsFPSCounter Public count, curr, start As Integer Public gFPS As Integer Public Sub CalculateFPS() curr = Environment.TickCount If start + 1000 <= curr Then start = Environment.TickCount gFPS = count count = 0 Else count += 1 End If End Sub Public ReadOnly Property FPS() Get Return gFPS End Get End Property End Class End Namespace .... Private fpsctr As New clsFPSCtr+ FPSCounter.start = Environment.TickCount Do while Not GameOver FPSCounter.CalculateFPS() 'Other stuff End While messagebox.show(fpscounter.fps)
-
Setting Transparent Colors for Bitmaps
ThePentiumGuy replied to music7611's topic in Graphics and Multimedia
Hmm. It's still only a tool :D, even though it's for a game :cool: , I still doubt it would affect your performacnce a lot, except for that one time where it has to update the new color. You're really not storing 512x512 images, since you store it back into the original bitmap (or array of bitmaps) anyways. So give it a shot. Yeah it would probably be a performance hit but just for a second or two while it updates(if you're using HUGE amounts of tiles, but your 256x256 scenario would take a lot less time, depending on the size of the image) -The Pentium Guy -
Setting Transparent Colors for Bitmaps
ThePentiumGuy replied to music7611's topic in Graphics and Multimedia
Oh yikes. Just add a boolean check andsee if you've already made it transparent.... oh wait, then how would you remove the previous transparent color? Hmm. I guses your only choice is: Public Sub ChangeColor(mynewcolor as color) Dim temp as new bitmap(mybitmap.image) temp.maketransparent(mynewcolor) mybitmap = new bitmap(temp.image) mybitmap = temp End Sub Since youre not really making a game, i doubt it would make a performance hit in yoru application since you're not rendering objects every frame...etc -TPG -
A "GoTo" command... they had this in QBASIC
ThePentiumGuy replied to ThePentiumGuy's topic in General
I'll look into that. Thanks. -TPG -
Setting Transparent Colors for Bitmaps
ThePentiumGuy replied to music7611's topic in Graphics and Multimedia
Yeah just call myBitmap.MakeTransparent(Color.Something) only once and only for one color -TPG -
Gaming programming topic
ThePentiumGuy replied to EFileTahi-A's topic in Suggestions, Bugs, and Comments
This has already been discussed here. Gamedev.net is a great source. You can check out my site (See Signature) for the "Newbie" directX (and GDI+... basically game programming) tutorials. Other sites to consider are PlausiblyDamp's site (Just google it. It's a great site, althoguh no one knows about it), gamasutra, and gamedev of course. -TPG -
A "GoTo" command... they had this in QBASIC
ThePentiumGuy replied to ThePentiumGuy's topic in General
Is there a built-in INI parser for .NET? Or must I stick to the typical StreamReader? -TPG -
A "GoTo" command... they had this in QBASIC
ThePentiumGuy replied to ThePentiumGuy's topic in General
Lol. Guys. He said version after longhorn. That's not going to come out until 2010 or something. Longhorn was supposed to be released in like 2004 now it's being pushed till 2006 (and somehow I feel it'll come out in 2007). That'll buy me some time to patch up stuff :), about 5 years. -TPG -
Hmm, Form1_Load: me.setstyle(allpaintinginwmpaint,true) me.setstyle(doublebuffer,true) me.setstyle(userpaint,true) Edit: You said panel right? Change "Me" to "Panel1".
-
Heh. Thanks guys :P. Thanks for the book recommmendations too. Yeah when I get messy code I usually redo everything from scratch and I end up fixing hundred's of problems that way. -TPG
-
A "GoTo" command... they had this in QBASIC
ThePentiumGuy replied to ThePentiumGuy's topic in General
But .NET doesn't have any way to parse INI files. "MS have no plans to remove the Windows API or prevent it to be called" thank you GOD. -TPG -
Try www.themexp.org to change: -Windows styling -Boot up screen (ex: Change "Windows XP Professional Edition... <loading>" to "Windwos XP Pirated Edition") -Login screen -.. and more you'll need a program like StyleXP to apply the changes. It changes everything natively so you don't have to worry about overuse of memory (in fact my system performacne hasn't been affected at all). -TPG
-
Well, I clean out my desktop every like 3 months or so. And I gotta admit, EVERY SPACE is filled before I clean it out. So yeah. I was being a hypocrite earlier :p. My code is messy for gods sake (See other thread in random thoughs). I'm a disorganized person but .... if i take the time to organize stuff..... then...................................................... it will be come disorganized soon anyways ;). But currently it's organized. .... I just threw everything into a folder called Junk adn put it in my docs. -TPG
-
Ever work on a project and find out that the code was messy? And when you start cleaning up the code the project doesn't work? What do you guys do to keep your code neat? I'm a horrible organizer so ... you'll see half the code commented, half the comments saying "THIS DOESNT WORK" or "IF YOU UNCOMMENT THIS LINE, THEN YOU NEED TO CHANGE THIS OTHER LINE TO <something else>". I think it just takes some dedication and patience I guess. -The Pentium Guy
-
Awesome. Your desktop is quite messy :p. I sort of removed all the icons from my desktop (except for the recycle bin, which i don't htink you can remove). -The Pentium Guy
-
Some of the advanced features in unmanaged DirectX didn't make it to Managed DirectX (I heard). Search through MSDN and look for CreatePixelShaderFile() and see if it exists somewhere else
-
A "GoTo" command... they had this in QBASIC
ThePentiumGuy replied to ThePentiumGuy's topic in General
The best way which I found was to use an INI Parser (Thanks to Faith at XVBT) An INI has sections like this: [beginning] [Middle] [End] And in the INI parser (I forgot the exact API name), you can change the section name. If anyone would like more info, you can check out: http://www.xtremevbtalk.com/showthread.php?p=924066#post924066 -The Pentium Guy -
It's amazing what you can do with the registry, hex editors, and stuff like that. I found a hack to rename the recycle bin, and rename the title bar of internet explorer (Mine is "Internet exploder provided by Macrohard Doors"). -TPG
-
WOW. It took me forever to find this quickreply box (I had to scroll right quite a lot before I found it). I guess you could say that the vb6 tags work better than the vb.NET tags. HOWEVER, taking a look at this post(http://www.xtremedotnettalk.com/showpost.php?p=434566&postcount=8), on this forum seems to convince me otherwise. They're screwed up sometimes but other times... they work perfectly fine! What the hell lol. -The Pentium Guy
-
So I'm assuming it works now? Edit: I read too quickly. Scratch that. -TPG
-
I haven't had the time to check all the vertices yet, but plot them on a peice of paper and be sure you're drawing the triangles in teh cube clockwise. Turn off Culling if you don't feel like doing that. (I beleive its' d3ddev.renderstate.cullmode = cullmode.none). Also, if that doesn't work, a screenshot might help :). -The Pentium Guy
-
A "GoTo" command... they had this in QBASIC
ThePentiumGuy replied to ThePentiumGuy's topic in General
Thanks for the advice on GoTo. I'll have a look at each of your code. Coldfusion, I don't think your "manual" method will work because I want it to be scripted (read from a textfile). Thanks anyways. Heh, Himo, you used ' as a VB comment then immediately switched to C# style comments ;). Thanks a lot guys, I'll need to copy the code onto a floppy to my computer with .NET (No internet). I'll give it a try and get right back to you. -The Pentium Guy -
There's a VB tag problem on this forum which is not present on the XVBT forum. If you want some examples I can show you plenty :). One reason being that if there is one comment in the source code, it thinks the rest is a comment. line = reader.readline If Not line.contains(":") Then 'Read it like normal 'This is easy Else s =line.split(":") if s(0) = "Choice" then LookAtChoice(line) End If End If Public Sub LookAtChoice(line as string) Dim colonSplit() as string Dim commaSplit() as String Dim numberofchoices as integer colonsplit = line.Split(":") 'Split "Choice:Yes,No:Would you like some money?" texttodisplay = colonsplit(2) ' "Would you like some money" commasplit = colonsplit(1).Split(",") numberofchoices = commasplit(0) ' I'll create a DisplayChoiceList function somewhere else. ' The game will only be able to hold 2, 3, or 4 choices if numberofchoices = 2 then DisplayChoiceList(numchoices, commasplit(1), commasplit(2)) if numberofchoices = 3 then DisplayChoiceList(numchoices, commasplit(1), commasplit(2), commasplit(3)) if numberofchoices = 4 then DisplayChoiceList(numchoices, commasplit(1), commasplit(2), commasplit(3), commasplit(4)) UpdateTextToDisplay() End Sub 'Later, when the player chooses a choice: Public sub CheckForChoices(myChoice as String) Reader.readline() 'The #Choice line is just for cleansiness Dim numLines as string loop until reader.readline = myChoice & ":" 'The line looks like " Yes: " numlines = cint(reader.readline) ' the 2 in the line after Yes: .. or No: for x as integer = 1 to numlines texttodisplay = reader.read UpdateTextToDisplay() next Loop until reader.readline = "#EndChoice" 'Skip the rest of the choices Wend Wend End Sub The VB code tags are MUCH cleaner on the other forum: http://www.xtremevbtalk.com/showpost.php?p=922655&postcount=1 I realize that you don't have access to the source code from iNET. However, I thought the 2 forums were based off the same source code. So why is this even a problem? And I know it's not your fault :). -The Pentium Guy