Author Topic: Uffo2  (Read 11377 times)

0 Members and 3 Guests are viewing this topic.

kryton9

  • Guest
Re: Uffo2
« Reply #30 on: June 04, 2012, 04:08:27 PM »
It runs slow on my computer, but I like it slow as it helps me score better :)

It must be the graphic mode as Peter mentioned Aurel. Check what the older version was setting the screen to, I think you said version 036.

Aurel

  • Guest
Re: Uffo2
« Reply #31 on: June 04, 2012, 09:59:14 PM »
Im not sure what is wrong here but for example all GDI examples in folder...GDIWindow
like fern,fade...etc work with excellent speed on my both computers with XP
and all this examples use window.inc  version 039(Inprogress)
window.inc there is written in old way without call.
Why Peter change way of his header is a mistery to me... ::)
And i was wondering why change something if work fine with good speed?

About using other graphics engines i can say that i try HGE wrapper for EB once and work
perfect.so what about that?

kryton9

  • Guest
Re: Uffo2
« Reply #32 on: June 04, 2012, 10:07:39 PM »
It is funny Aurel that you didn't like it with calls either. I went ahead and changed mine to run without calls. attached is the win.h file.
win.7z unzipped will be win.h without calls, interesting to see if it runs better.

Aurel

  • Guest
Re: Uffo2
« Reply #33 on: June 04, 2012, 10:19:06 PM »
Refuse to compile properly... ::)
Oh mine...what a mess. >:(

kryton9

  • Guest
Re: Uffo2
« Reply #34 on: June 05, 2012, 12:00:29 AM »

Aurel

  • Guest
Re: Uffo2
« Reply #35 on: June 05, 2012, 01:31:49 AM »
yes Kent i have.
problem is in wFunc or other things (i mean includes)
i do it like this:
Code: [Select]
Sub WaitFrames(Frame as long)
Sleep Frame                                             
End Sub

And now i can set wait time.
Some problematic things about speed i found in this api calls:
Code: [Select]
Declare Function QueryPerformanceCounter   Lib "kernel32.dll" (ByRef lpPerformanceCount As LARGE_INTEGER) As Long
Declare Function QueryPerformanceFrequency Lib "kernel32.dll" (ByRef lpFrequency As LARGE_INTEGER) As Long

In older inc are declared as LARGE_INTEGER

Code: [Select]
Type LARGE_INTEGER
lowpart AS INT
highpart AS INT
End Type

In newer are defined as quad.
Which cause some trouble with work to.
So do you can imagine what amount of incompatibility is in game?
Peter work on headers are fine and i respect
but i repeat again why work something if work ok,right?
This only increase confusion...

Aurel

  • Guest
Re: Uffo2
« Reply #36 on: June 05, 2012, 02:29:25 AM »
Peter i try this of course...

Quote
A full declaration with parameters works anytime sure.
Bingo...!

Quote
'Call' is super and the best friend of the programmer.
I don't agree with you at all.
It looks to me that call is another word for import like some
other languages have.

But as i say i don't see any advantage to use this way because don't
work properly for me ,but old way with old wFunc work and
looks that i will use this old method.
First looks simplier to me and is quite better to understand what is what.

PS.Peter
You say that GDI is slow and i agree that GDI is slower then hardwer acelerated graphics
BUT i see many GDI examples written in C which work excellent.
I must investigate this thing much closer. ::)

Charles Pegge

  • Guest
Re: Uffo2
« Reply #37 on: June 05, 2012, 04:56:54 AM »
I found that, Uffo got a lot faster when the background image was replaced by clsColor. Perhaps this large element was causing problems for Aurel.

One advantage of using bind is that the compiler knows that all the defined symbols are procedures, then call is automatically inserted. You can still use call with any procedure, if that is your preference.

I have included a compact version of uffo with the latest Oxygen, filed in projects/games, along with win.inc. But I'll continue to support projects/GDIWindow/window.inc, as we have many demos that depend on it, and I think most Basic users would prefer a prototyped API, where the compiler takes care of type conversions and referencing.

I am delighted we have a complete game, Peter, small enough to include in the OxygeBasic zip :)


Charles
« Last Edit: June 05, 2012, 05:01:58 AM by Charles Pegge »

Aurel

  • Guest
Re: Uffo2
« Reply #38 on: June 05, 2012, 05:35:01 AM »
I agree with Charles...
And i just tested many gdi examples with win64.inc and most of them work fine ;)

kryton9

  • Guest
Re: Uffo2
« Reply #39 on: June 05, 2012, 06:45:42 AM »
Hi Kryton9,

There is no more speed  with 'Bind'. 'Bind' is not sure !
Many of the Opengl declarations and GdiPlus with 'Bind' did  not go, at least here.
A full declaration with parameters works anytime sure.

'Call' is super and the best friend of the programmer.

Try this to see how many frames has 'Kryton9 Win.inc' and 'Peter win.inc'.
 
I got  (1080-1082 frames).
I just found a wave file and bmp file, nothing to run Peter.

kryton9

  • Guest
Re: Uffo2
« Reply #40 on: June 05, 2012, 06:53:59 AM »
Don't give up Peter. You and Charles are the only ones that make headway with assembly and bringing headers to the rest of us. I am studying all the headers I can to learn, but it is all very confusing as there are so many ways people do it in so many languages.

Aurel

  • Guest
Re: Uffo2
« Reply #41 on: June 05, 2012, 07:43:15 AM »
Yes i agree with Kent, don't give up man... ;)
I hope that you don't interpret in a wrong way my observation.
I like & follow your work all the time...