anyone making a tutorial on antialias pixels? or can i make it?
Printable View
anyone making a tutorial on antialias pixels? or can i make it?
btw. i can make one about motion and rotation too...
Hehe....have you read the FAQ thread (at the bottom).. I have only posted links to threads where we two discussed rotation some time long ago. In both BitBlt and DDraw. But if you want to make a tutorial on it. It would be great. Just tell me more spesific want you want to do/write about. And I will set you up on the list so no one else does it.
antialias pixels sounds nice...I have no clue there. But what do you meen by motion? Motion Blure or motion as in moving? I have made a tutorial on how to move objects using KeyPresses.
by motion, im talking about moving things at an angle and speed.
i haven't read everything on the faq yet, so i dont know what's already done.
Like in a 2D platform game wher Newton is pulling it down? Or like a car game where you look at it from above? This sounds intresting, just give me some more input so I am 100% sure that you are not making something that is done before.
Just let you know my site still contains many BitBlt and game programming tutorials.
i was not planning on reffering to any type of game, but you're right. like a car game viewed from above.
Quote:
Originally posted by Fox
Just let you know my site still contains many BitBlt and game programming tutorials.
I know but the problem is that Brad don't like us to link to other sites. That's why I have made so many tutorials on my own and posted them here. But I will have a look at it,
Quote:
Originally posted by cyborg
i was not planning on reffering to any type of game, but you're right. like a car game viewed from above.
Using physics? Or just move as the keys are used? Becuase if you are not bringing anything more to it, it will be just as my tutorial.
You could link to the sample projects, but that's just the results of each step. Without reading the sites one might not be able to understand the code...
I will look at it tomorrow. Are on my way out clubbing now. I have some links to other sites, but won't try to push it tooooo far....
just using sine and cosine and moving a character in an angle specified by mouse movement or keypress.
Yeah that you can do. But if you are kind, you can read through the KeyPress tutorial that I wrote. At least look at the code I wrote so you can use some parts of it as needed. So you don't confuse the hell out of the new programmers here at the site...:D
yeah, sure!
btw, you've got mail!
I saw it now...thanks...I am toooo drunk right now. But will have a look at it tomorrow if you don't mind....but I guess your work is quality work...so I guess it is fine...:d
You know what the FAQ is lacking? Some 3D stuff, unfortunatley I'm not really all that used to 3D to write a tutorial or anything but if anyone else reckos there up to it I think it would be a good Idea.
Yeah I have thought of it....Keda came with some topics that has something to do with 3D. I am not good enough in 3D to do it right now. But I will see what I can do in the future. For now we just have to live without it...:(
An other option that is not there. Saving in other formats then BMP
Cyborg saving JPG here
http://vbforums.com/showthread.php?s...&highlight=jpg
Sastraxi is making a PNG lib
Will find the link later
hey! i didn't make that jpeg code originally. so don't thank me for it ;)
about 3d. maybe some guys would like to know how 3d rendering really works...i could write a tutorials that shows the really basics on how to draw 3d without using a library like OGL or DX.
Yeah that could be intresting. But don't take too much work on your shoulders now....but if you think you could handle it. You are welcome, and we are greatfull.
How to load and animated skinned meshes would be good question. I have been searching for that for long time like many others, finally i found some c# code on MSDN japan that i worked out for visual basic.
See this topic for the sample source
http://www.vbforums.com/showthread.p...hreadid=280764
Greets nightmare
Thanks. Will have a look at it tomorrow. Too drunk right now...:d
What you mean your always p*ssed :D.Quote:
Originally posted by NoteMe
Thanks. Will have a look at it tomorrow. Too drunk right now...:d
Yes I am. But today I am not in the mood to drink...:D....And I promisse to both look at that Mesh code (BTW it isn't that hard to load a mesh, but I havn't got to the chapter where you start to animate it, so I am glad somebody else know how to animate it), and Cyborgs code that he sendt me. And finishing the collision detection code...:D..so I guess I have an other long sunday in fron of the computer....I just love it.
After seeing the other post about QueryPerformanceFrequency, maybe I should add an tutorial totaly like the other one, expcept it will use the QueryPerformanceFrequency in stead. Even if I can't 100% see the point in using it. GetTickCount will be more then good enough for most games.
The QueryPerformanceCounter is alot better for games mainly because its accuracy, when you think a game loop should only last 20ms and on XP the GetTickCount is only accurate to 15ms that means your frames can only be 15ms or 30ms and thats dependant on the OS :D.Quote:
Originally posted by NoteMe
After seeing the other post about QueryPerformanceFrequency, maybe I should add an tutorial totaly like the other one, expcept it will use the QueryPerformanceFrequency in stead. Even if I can't 100% see the point in using it. GetTickCount will be more then good enough for most games.
BTW did you see the example I gave for using it in that thread you mentiond? If your gonna use it you'll need to clean it up as you'll have saw ;).
Are you sure that it is 15ms on XP. have you tested it. I only have an old version of MSDN on my PC, but it looks like it should be faster and I have tested it on Win2K and they have the same kernel:
QueryPerformanceFrequency on the other hand is more accurate. But it uses more system resources and is not working on all machines. It is hardware dependent. And I can't see that a game need more then 100FPS anyway, so what is the problem?Quote:
Windows NT 3.5 and later The system timer runs at approximately 10ms.
BTW yes I saw the code you had posted. I have it wrapped up in a module on my PC. Have used it for speed test, but never had to use it in any of my games at all...;)...
:ehh: ow well, I don't actually use this method normally but I've been advised it better. My normal method would be to have a loop that no matter how long the loop took it would run again, and to keep everything appear to run at constant speed I would work out the TickDiff using GetTickCount :blush:. This however forces extra load on the processor because it never gets a break at the end of each loop :( and on me new PC this shows because using this style the processor heats up and the fan speeds up quite a lot more.
The idea I suggest which I would guess is used in the GameLoop tutorial (which I haven't had a chance to read yet sorry) is where you get to the end of a loop and you dont start the next frame untill a duration is up. only problem is that using GetTickCount (assuming accuracy is 10ms) this can only be 10ms, 20ms or 30ms and if the loop took 20.1ms then you've missed the 20ms and will need to wait another 10ms.
BTW 20ms would work out at 50FPS ;)
As far as it not being on all machines I believe its supported on most new boxes :D. So it could be an idea to have code there for GetTickCount that is only used if the initialse test for Freq = 0.
:)
Heres a GameTimer class that I got given, I didn't write it myself BTW though. (Its in C++)
No no no...it will not be skipped if it is more then 10ms. You just check if it has used equal or more then 10ms...;)....not exactly 10ms...;)...and the rest of the code should written so that it moves the right speed and animation rate. Never had a problem with it in my whole life. And most PCs can't have a 100Hz Screen in a game anyway. The computer slows down the refresh rate of the screen automaticaly under CPU intensive wrok like in a game...;)
Doh, yeah what was I thinking, think I must still be asleep.Quote:
Originally posted by NoteMe
No no no...it will not be skipped if it is more then 10ms. You just check if it has used equal or more then 10ms
Din't get this bit though:
Quote:
Originally posted by NoteMe
The computer slows down the refresh rate of the screen automaticaly under CPU intensive work like in a game...;)
Quote:
Originally posted by Electroman
Heres a GameTimer class that I got given, I didn't write it myself BTW though. (Its in C++)
Incredible welll documented...:D It's more or less the same as what I have for VB. Maybe we could add it too the game loop tutorial later on. I am finishing off the collision detection tutorial right now. Hope to get my part done in a couple of hours. Then Manavo are going to do the rest. Maybe I have some time to do it then. Thanks
Quote:
Originally posted by Electroman
Doh, yeah what was I thinking, think I must still be asleep.
Din't get this bit though:
If you set the refreshrate of your monitore to 80Hz, it will not be stable at 80Hz, it will be up to 80Hz, if the computer uses to much CPU it will actually slow it down. I was testing some clocking on my CPU once, and it ended up with refreshing the screen so slow that my screen couldn't show it anymore. So I had a black screen...:D...so if your screen can't refresh it's self more then 100Hz, why have a game that refresh the screen more then 100 FPS...
As said before it would be 50FPS ;)Quote:
Originally posted by NoteMe
If you set the refreshrate of your monitore to 80Hz, it will not be stable at 80Hz, it will be up to 80Hz, if the computer uses to much CPU it will actually slow it down. I was testing some clocking on my CPU once, and it ended up with refreshing the screen so slow that my screen couldn't show it anymore. So I had a black screen...:D...so if your screen can't refresh it's self more then 100Hz, why have a game that refresh the screen more then 100 FPS...
I think I was meaning before say you want each loop to be 25ms then GetTickCount would be telling you its only been 20ms all the way untill it had been 30ms then it would update and say 30ms which by then its too late and you've missed it by 5ms :(. And it wouldn't help setting the limit to 20ms because you assume that it will update every 10ms because its not consistant :(. I see your point tho because I used to think the same way till I was conviced otherwise. When you think of it the extra processing is justified because unless it takes 5ms in the example just given it would serve an advantage. ;).
I was taking to a lecturer for some reason the other day about using light guns with a PC monitor and he reckoned you could use one if you made the screen flash white for one frame now and again, he explained how light guns work, I'll assume you know but I'll explain if you dont? Thought it was rather interesting but maybe a big disadvantage lossing a whole frame every now and again.
But how often do you need a game to be exactly 25 ms and so on. It's just to make the objects move at the right speed and animation rate at 10ms or 20 ms, and the accuracy you are talking about commes from the strain of the CPU. Not that GetTickCount is slow. The same things that can happen with the Sleep API with context changes and so on. That will happen to any call. I can't see one reason for not fixing the game to a set speed of 50 or 100FPS so it's actually nothing to discuss...:D....I will let you use it if you are not good enough to make the game work anyway...:D:..just kidding. BTW I havn't seen one game programming bok yet that is using QueryPerformanceFrequency...;)
And about the light gun. Are you talking about those guns that you hold like on the old Nintendo 8Bit console and so on...I have always wondered how they work. Never figgured it out...please explain if it is not to hard. Does it have anything with reflection to do?
I was suprised to find this out becuase I had some wierd ideas on how it could work. It works on the fact that when a TV refreshs it isn't like instant it draws left to right and up down so depending where you point the gun it can work out where it is by seeing what part of the screen is being drawn. So it is in fact a little camera in the gun and the TV is none the wiser that its being shot :D. Ow yeah it is them guns you used on the old consoles :D.
(Might be drawn right to left, but thats not important ;)).
Wow, never knew that...maybe I should make a game with tht kind of gun...:D...fix up my old Nintendo gun, and attach it to my PC..:D
He didn't say he'd tried it but he said in theory it should work on a PC if you did that painting a white screen for a frame now and again. Would be really cool, you never see games that use them anymore :(. Have you got a GameCube by anychance?
No sorry....it is only you taht have the chance to fool around with that all the time...:D...I havn't bought a console sinze the Nintendo 8bit.
BTW why do you have to print the screen white every now and then? If you have to click when it is white you have a big chance of not hitting anyting at all.
And BTW I still can't 100% see how the gun can tell where on the screen it did hit even if it know that it both refreshes horizontale and verticale....BTW a PC screen does that too..:D