Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Simple 2D Camera

Author
Message
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 8th May 2007 20:41
Simple 2D camera I made for the RTS I am working on.



In theory, there is no difference between theory and practice. But, in practice, there is.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 9th May 2007 02:38
Looks good, but I haven't examined the code too much. Then again, what would I be able to tell?

Anyways, my mouse easily left your app and moved onto my second monitor. I know it's not something most programmers think of, but I just thought that I'd rant here...

"There will always be evil, for, without evil, the good shall lose their virtue."
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 9th May 2007 03:27 Edited at: 9th May 2007 03:29
Thanks Ankillito, I Didn't think of anyone having two monitors when doing this. I think this might work But im not too sure cause I dont have two monitors to test it.



In theory, there is no difference between theory and practice. But, in practice, there is.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 9th May 2007 03:39
Great start, but a screen has 4 edges.

adding the other two gives



It doesn't work though. I'll try and figure out why, but I'm pretty busy, so I dunno...

BTW, now I'm thinking it may not be a good idea to put this in, because it will slow down the app, even for one-screen users. What do the experts think?

"There will always be evil, for, without evil, the good shall lose their virtue."
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 9th May 2007 03:47
I knew I needed to do the other side of the screen, honest I did
Slow down the application. Is that as in the scroll speed or the performance speed of the program?

In theory, there is no difference between theory and practice. But, in practice, there is.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 9th May 2007 03:49
performance. it's one more thing that the computer has to do each loop...

"There will always be evil, for, without evil, the good shall lose their virtue."
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 9th May 2007 03:54
DarkBasic is slow enough at rendering 2d stuff as it is . The extra code shouldn't slow it down much more, I hope.

In theory, there is no difference between theory and practice. But, in practice, there is.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 9th May 2007 03:59
Can you have negative FPS?

"There will always be evil, for, without evil, the good shall lose their virtue."
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 9th May 2007 16:27 Edited at: 9th May 2007 21:04
Quote: "
Can you have negative FPS?
"

lol, Ill let you know once my RTS gets to that point

In theory, there is no difference between theory and practice. But, in practice, there is.
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 10th May 2007 01:11
In my math class, we have a class set of TI-83 calculators, and I put a program on one called "Easy Answer." Some cheater is going to run it, and it starts to load, but goes slower and slower until it starts to unload. They're going to be so confused!!! Oh, and there's no way out of the program! Well, besides pressing the "on" button, which few know about...

I feel evil.

"There will always be evil, for, without evil, the good shall lose their virtue."
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 10th May 2007 01:33 Edited at: 10th May 2007 01:39
You mean like this?



My math teacher resets my calculator every test because she's afraid I wrote a cheating program on it.

I think I'll stickan easter egg in the beta version of my next game, the fps gets slower and slower until it's negative and all the people walk backwards!

"Once there was a polygon mesh who was very sad because he was only Gouraud shaded."
Ankillito
17
Years of Service
User Offline
Joined: 10th Dec 2006
Location: Litigious California
Posted: 10th May 2007 02:06 Edited at: 10th May 2007 02:06
AHHHHHHHHHHHHH!!!!!!!!!!

By the time I noticed "Disable escapekey," it was to late to stop compilation!!!!!

"There will always be evil, for, without evil, the good shall lose their virtue."
Lourg
20
Years of Service
User Offline
Joined: 20th Dec 2003
Location:
Posted: 1st Jun 2007 18:04
Mind If I use your code in a program? Very nice and its what I'm looking for to use. If you don't mind then I will be sure to give you credit for my program when I'm done.
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 10th Jul 2007 03:05
Sure go ahead

In theory, there is no difference between theory and practice. But, in practice, there is.

Login to post a reply

Server time is: 2024-11-22 18:46:27
Your offset time is: 2024-11-22 18:46:27