smooth animation in a window - not possible?

Advanced game related topics
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post by byo »

mp303 wrote:heh, yeah - but then I might as well use the API's native language C++ then, and save myself the hassle of trying to interpret the API through a different language.

C++ is a bitch - all the pointer-juggling drives me to drink! ;)
IMHO, PB is probably the most user-friendly language when it come to the WinAPI. In most other languages, you need to declare them, import, make wrappers, etc.

I was trying DEV-CPP for my C++ learning but I found it was too much hassle to create windowed apps. It's not for me. ;)
mp303

Post by mp303 »

well, coming from the world of Pascal/Delphi, VB, PHP, Java, etc., I might should take a look at C# - supposedly it borrows from the world of Delphi and Java, and I'm used to doing OOP, so...
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

> well, coming from the world of Pascal/Delphi, VB, PHP, Java, etc.
those are five different worlds... is one additional new that hard to accept?

> and I'm used to doing OOP
fine!
...but PB is procedural, not OO.
accept it.


sorry, sure we welcome programmers from everywhere, and sure we like to profit from any other philosophy.....

but some things are just as they are (I hate me for saying this)

PB is a wonderful low-mem and superfast programming language.
the direct access to any API is just a bless.
the small size of the resulting exes is devine.
but it could be a mess when confronted with nerds who think a program has to be big to have abilities....

you had to cope with demands when you learned Java coming from Pascal or whatever combination...

now, you are here in PB.
learn it (it is good and has a lot of advantages) or leave it.
but don't spoil the forums with inadequate remarks.
noone needs them, it's just trolling.
oh... and have a nice day.
mp303

Post by mp303 »

Kaeru Gaman wrote:noone needs them, it's just trolling.
dude, you're so defensive.

I'm not trying to spoil your day - basically, my only point with that remark was, as you pointed out, that PB is not OO, and therefore probably not suitable for me, since I grew up with OOP.

... or well, not true, since I started out with Basic on C=64/128, then AMOS and Blitz on Amiga, then ASM and Pascal on PC (before Pascal was OOP).

But that was many, many years ago - and while procedural works fine for me for smaller apps, I find that OOP works better for me when I need to do big, structured projects that have to be maintained and developed for years.

The last thing I'm trying to do is strike up another OOP vs procedural war with your people. Whatever would be the point in that? I think you've made it pretty clear that you're all strongly against OOP.

The mechanics of OOP suit my way of thinking better than anything - but with that I'm not trying to say that I think it's right for everyone. If procedural works for you, well - whatever floats your boat.

I was hoping PB would be a quicker way to realizing the project I have to do - but since it doesn't provide the functionality I need in this case, it's not.

That's a personal choice, and has nothing to with PB's qualities.

...

and PS:

"nerd"? .. "troll"? .. you're the moderator, maybe you should try to moderate yourself. seriously, what are you, like, 12 years old?
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Most of us are not against OO. :shock:

Most of us want some OO but not at the cost of what we have. Extending what we have, yes. Taking it (or a significant part of it) away to get something new, no.

For some PureBasic is a language, complete.

For others PureBasic is a platform which can be extended. And which has been extended. Just check out the libraries people have put together. Including oop-ish libs. :)

Edit:

Both viewpoints are valid, btw.
Dare2 cut down to size
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

I'm not a Moderator of this forum. I'm a Moderator of the German PB-Forum.

Anyways I always speak my mind, regardless of my position.

>> you're so defensive.
hm.. I won't call that "defensive".
I was quite offensively telling my opinion.

>> it's just trolling.
well, you were definitely trolling.

>> but it could be a mess when confronted with nerds who think a program has to be big to have abilities....
did you feel adressed? well, maybe then you have a problem.

in fact I meant non-programmers who judge about programs without knowing anything.

like a Marketing-Manager saying:
"I have one App here made with VB, and another one made with PB.
the VB is fife times as big, so the PB cannot do the same, it's impossible."
that was what I meant with nerd.

oh and btw...
I'm not against OO, I just know that PB is procedural and I can live with it.
Dare stated a very good point according to this.
oh... and have a nice day.
mp303

Post by mp303 »

Kaeru Gaman wrote:did you feel adressed?
you mean, did I feel addressed when you replied to my topic?

how unnatural of me. my humble apologies.
Kaeru Gaman wrote:in fact I meant non-programmers who judge about programs without knowing anything.
>> don't spoil the forums with inadequate remarks

touché.
mp303

Post by mp303 »

Dare wrote:Most of us want some OO but not at the cost of what we have. Extending what we have, yes. Taking it (or a significant part of it) away to get something new, no.
I believe I aired exactly that view in an earlier discussion, but it was definitely not received well, except by one or two people.

I've never suggested that PB should be a pure OOP language, I've merely requested OOP syntax features.

I don't want a bulky runtime, lower performance, higher memory usage, etc. more than the next guy - those are the things that make PB powerful in it's own unique way.

Anyways, that was another discussion, and probably not one we should have again, for the sake of everyone's mental health and well-being ;)
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

mp303 wrote:
Kaeru Gaman wrote:in fact I meant non-programmers who judge about programs without knowing anything.
>> don't spoil the forums with inadequate remarks

touché.
well, that is trolling.

together with
mp303 wrote:yeah, "everybody else does it".
right on.
mp303 wrote:my smart-ass remarks usually start around the time somebody gives me an explanation like "PB does nothing else than the standard solution of DX7 does".
mp303 wrote:I guess this is the point where our perceptions differ.
In my world, accurate VSYNC is a basic, natural requirement. When would I not want VSYNC to be accurate?
But in your world, it's considered "bloat".
mp303 wrote:wow, you guys know some "big words" - I am obviously way out of my intellectual league here.
yap, you are trolling, and you're enjoying it.

and then some statements like
mp303 wrote:heh, yeah - but then I might as well use the API's native language C++ then, and save myself the hassle of trying to interpret the API through a different language.
PB is not an interpreter, didn't you notice?
the API-Calls are simply the same as if you call it from a program created with C++
I'm not trying to spoil your day
hm... are you always that effective in doing things you are not trying?
I've been programming for 20 years.
and I for 24 years so what?

you're just enjoying the trouble you spead, and there's a word for that: Troll.
oh... and have a nice day.
Brice Manuel

Post by Brice Manuel »

*sighs*
mp303

Post by mp303 »

Kaeru, look back through the friggin' thread - you spent your first five posts trying to explain to me that this was standard DX7 behavior, like I didn't get it the first time.

Instead you seem to intentionally ignore my point, which is that standard DX7 behavior isn't good enough. I think I made that point as clear as anyone could have possibly made it? Still, for some reason, you choose to lecture me and give me backtalk, instead of just acknowledging a pretty obvious, straightforward problem.

By your own definition, that's "trolling".

I call it ignorance, but you can label me as you please, what the hell do I care...
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

mp303 wrote:I was hoping PB would be a quicker way to realizing the project I have to do - but since it doesn't provide the functionality I need in this case, it's not.

That's a personal choice, and has nothing to with PB's qualities.
That is a fair enough comment. Go with the language that makes it work for you.

Earlier you wrote:heh, yeah - but then I might as well use the API's native language C++ then, and save myself the hassle of trying to interpret the API through a different language.

C++ is a bitch - all the pointer-juggling drives me to drink! ;)
Have an ale with me. I prefer to get a headache that way than the C++ way. The drink induced headaches go away after a while. :)

Just interested in the native api bit. If you go linux won't you have issues with cross-platform within linux derivatives?

Aside:

It seems to me there is no "The Linux OS". There is the GNU OS and a linux kernel which has been modified left, right and centre and then zillions of api-like dlls which have been lumped together, with linux released under different brands. This equals chaos for inter-OS compatibility.

Linux derivatives have shot themselves in the foot, even windows is more compatible OS to OS.

(Not a shot at you, btw, just wondering if there is a potential headache if you are going to have a linux version of your app, regardless of language used to create it. And with the caveat that I am not a linux guru, so maybe the issues I encounter are superficial.)
Dare2 cut down to size
mp303

Post by mp303 »

Dare wrote:Just interested in the native api bit. If you go linux won't you have issues with cross-platform within linux derivatives?
no idea. probably. Linux is messy ... although I think most of the major Linux vendors agree on enough API to keep things "cross-Linux" compatible - and as long as vendors ensure that drivers and desktop environments (K, Gnome, etc.) are working on their Linux-variant, I guess you're already 99 percent of the way ;)

anyways, the particular application I have to make here is going to run on one platform, on one machine.

in case you're curious, it's an information display / news ticker for the newspaper I work for - it's going to be running on a 200-inch LCD-screen across from central station...

currently they have a Flash player running on it, and it turns out (like most Windows apps, apparently) that it doesn't do VSYNC and can't play back without dropping frames - which means that, especially, the news ticker (horizontally scrolling text) looks very jagged and jerky.

so I need to write a new app, one that is completely smooth. preferably windowed, but it's not a requirement - it could be running full-screen, but then it must run on the secondary video-output on a dualhead card...
Brice Manuel

Post by Brice Manuel »

in case you're curious, it's an information display / news ticker for the newspaper I work for - it's going to be running on a 200-inch LCD-screen across from central station...
If that were the only monitor having the issue it would be easy to blame the problem on what is likely a slower than normal response time on an LCD of that size. However, since you are having the issue on "normal" systems, that doesn't really apply.

I don't have the problem with my DX stuff, but I am also doing much of projects without DX. I would be curious to what kind of performance you would get purely using the method used in this tetris game listed on the tools page:
http://freak.purearea.net/tools/tools.html

Direct URL:
http://freak.purearea.net/tools/Tetris.zip

This is the method I am using for my non-DX games, and I haven't had any issues unless I try and bounce around a LOT of sprites. Performance isn't as good as my old GDI based C++ engine that used transblt, but for my needs, this PB method is working better than I expected (so far).
mp303

Post by mp303 »

Brice Manuel wrote:If that were the only monitor having the issue it would be easy to blame the problem on what is likely a slower than normal response time on an LCD of that size. However, since you are having the issue on "normal" systems, that doesn't really apply.
right, that was my first thought as well - inconsistency between the refresh rate of the LCD display controller and the graphics card's refresh frequencies.

but I talked to the techie who maintains the screen, and he explained that a screen of this size doesn't actually have a refresh frequency, it just switches the LEDs on and off whenever needed ... so in theory, it can do any refresh rate, it's entirely determined by whatever signal you feed the controller. (in fact, the way he explained it, the only reason why flat-screen computer monitors and TVs have a fixed set of frequencies that they operate at, is because a controller is built into them that 'simulates' the way CRT monitors worked, so that regular graphics cards will work with them...)
Brice Manuel wrote:I don't have the problem with my DX stuff, but I am also doing much of projects without DX.
I need to draw large sprites with alpha channels, I need to resize images with anti-aliasing, etc. - so I'm afraid I do need DX for this one...

I looked at the Tetris example, but it doesn't use any kind of synchronization at all? How would I be able to make something scroll at one pixel per frame then? Manually polling the timer probably won't be near accurate enough to avoid rounding errors, since a frame is only about 16 msec...
Post Reply