473,396 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Threading Performance

Hi Again,

I'm still playing with this space invader type game, and I have the alien
wave on the main UI thread which works wuive well, I have also got a
SpaceShip on its own thread which scims acrross the top of the screen, but
the performance of the SpaceShip is a little erratic, it does not so much
slide back and forth but moreover, staggers drunkenly sometimes fast ans
sometimes slow

Does anyone know the best way to improve this performance.
--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--

Nov 21 '05 #1
7 1126
Hi,

Try setting it threadpriority higher. Maybe that will improve
performance.
http://msdn.microsoft.com/library/de...classtopic.asp

Ken
-------------------
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:us**************@TK2MSFTNGP15.phx.gbl...
Hi Again,

I'm still playing with this space invader type game, and I have the alien
wave on the main UI thread which works wuive well, I have also got a
SpaceShip on its own thread which scims acrross the top of the screen, but
the performance of the SpaceShip is a little erratic, it does not so much
slide back and forth but moreover, staggers drunkenly sometimes fast ans
sometimes slow

Does anyone know the best way to improve this performance.
--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--


Nov 21 '05 #2
Yes, this makes a marginal difference, however, I am beginning to think that
VB.NET is not the best thing to use for games programming. It's probably my
methods, but I tried to move the form while the invaders were invading and
the whole thing simply hung !

Oh Well, back to the drawing board.

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

Try setting it threadpriority higher. Maybe that will improve
performance.
http://msdn.microsoft.com/library/de...classtopic.asp

Ken
-------------------
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
news:us**************@TK2MSFTNGP15.phx.gbl...
Hi Again,

I'm still playing with this space invader type game, and I have the alien
wave on the main UI thread which works wuive well, I have also got a
SpaceShip on its own thread which scims acrross the top of the screen, but
the performance of the SpaceShip is a little erratic, it does not so much
slide back and forth but moreover, staggers drunkenly sometimes fast ans
sometimes slow

Does anyone know the best way to improve this performance.
--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--

Nov 21 '05 #3
OHM. Dont reinvent the wheel... Check out DirectX 9.0 Managed... I have a
book on game programming with direct x... I think you'll find it a much
easier interface.

You use models (.x files) that you put skins/meshes on that get painted.
All the dirty work is taken care of for you and has an incredible
performance rate...
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Yes, this makes a marginal difference, however, I am beginning to think that VB.NET is not the best thing to use for games programming. It's probably my methods, but I tried to move the form while the invaders were invading and
the whole thing simply hung !

Oh Well, back to the drawing board.

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi,

Try setting it threadpriority higher. Maybe that will improve
performance.
http://msdn.microsoft.com/library/de...classtopic.asp
Ken
-------------------
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
news:us**************@TK2MSFTNGP15.phx.gbl...
Hi Again,

I'm still playing with this space invader type game, and I have the alien wave on the main UI thread which works wuive well, I have also got a
SpaceShip on its own thread which scims acrross the top of the screen, but the performance of the SpaceShip is a little erratic, it does not so much slide back and forth but moreover, staggers drunkenly sometimes fast ans
sometimes slow

Does anyone know the best way to improve this performance.
--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--


Nov 21 '05 #4

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote
OHM. Dont reinvent the wheel... Check out DirectX 9.0 Managed... I have a
book on game programming with direct x... I think you'll find it a much
easier interface.
You have got to be kidding! To do it right, don't you have to detect the
capabilities of the monitor, before even getting to anything related to graphics?
It just seems every example I've seen so far was either buggy, or was so long
as to not be practical for a simple game.

What is the 'shortest' demo you've seen to put a single (transparent) image
on a background picture, that will work everywhere a Windows Form can
be shown? Keep in mind, a line like: frmMain.Show will show a form
wherever Windows and .Net are installed. Compare that to what would be
needed to call up a DirectX screen that would work every where Windows,
and .Net are installed. How can you say that's an 'easier interface' ???

You use models (.x files) that you put skins/meshes on that get painted.
All the dirty work is taken care of for you and has an incredible
performance rate...


What sort of 'dirty' work is that? Keep in mind his animation needs are
not 3D....

To me, it still seems like a new technology (finicky) that is often more
trouble than its worth. I have yet to see a demo that makes it look 'simple'.

Of course I'd love to be shown the error of my ways, and maybe I'm looking
at old code (DX9) but it still looks like a complicated mess just to get up
and running, much less grasp the new concepts needed to 'render' anything.

LFS
Nov 21 '05 #5

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote
Hi Again,

I'm still playing with this space invader type game, and I have the alien
wave on the main UI thread which works wuive well, I have also got a
SpaceShip on its own thread which scims acrross the top of the screen, but
the performance of the SpaceShip is a little erratic, it does not so much
slide back and forth but moreover, staggers drunkenly sometimes fast ans
sometimes slow

Does anyone know the best way to improve this performance.

Can I suggest you use a background thread to provide logistical calculations
(positions, hit tests, etc) and the UI thread to just do the drawing? However,
since you've stepped away from dozens of threads handling the invaders,
I would think the whole thing could be done on the UI thread alone. I mean
if a 1.7 MHz chip can do a fair job of running the game, certainly something
a thousand times faster should be able to handle it without problems... ;-)

LFS
Nov 21 '05 #6
As a matter of fact, I think I was already thinking along those lines. Using
the UI thread for the drawing does look to be the most consistent way to do
it using .NET's libraries, but it leaves me feeling like I'm back in the old
days writing code for a Micro computer.
Hey ho !

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Larry Serflaten" <se*******@usinternet.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote
Hi Again,

I'm still playing with this space invader type game, and I have the alien
wave on the main UI thread which works wuive well, I have also got a
SpaceShip on its own thread which scims acrross the top of the screen,
but
the performance of the SpaceShip is a little erratic, it does not so much
slide back and forth but moreover, staggers drunkenly sometimes fast ans
sometimes slow

Does anyone know the best way to improve this performance.

Can I suggest you use a background thread to provide logistical
calculations
(positions, hit tests, etc) and the UI thread to just do the drawing?
However,
since you've stepped away from dozens of threads handling the invaders,
I would think the whole thing could be done on the UI thread alone. I
mean
if a 1.7 MHz chip can do a fair job of running the game, certainly
something
a thousand times faster should be able to handle it without problems...
;-)

LFS

Nov 21 '05 #7
This is definately a learning curve for me as all my .NET stuff has had
little graphics animations in it, I will take a look at it though.

Thanks - OHM

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
OHM. Dont reinvent the wheel... Check out DirectX 9.0 Managed... I have a
book on game programming with direct x... I think you'll find it a much
easier interface.

You use models (.x files) that you put skins/meshes on that get painted.
All the dirty work is taken care of for you and has an incredible
performance rate...
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Yes, this makes a marginal difference, however, I am beginning to think

that
VB.NET is not the best thing to use for games programming. It's probably

my
methods, but I tried to move the form while the invaders were invading
and
the whole thing simply hung !

Oh Well, back to the drawing board.

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> Try setting it threadpriority higher. Maybe that will improve
> performance.
> http://msdn.microsoft.com/library/de...classtopic.asp >
> Ken
> -------------------
> "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
> message
> news:us**************@TK2MSFTNGP15.phx.gbl...
> Hi Again,
>
> I'm still playing with this space invader type game, and I have the alien > wave on the main UI thread which works wuive well, I have also got a
> SpaceShip on its own thread which scims acrross the top of the screen, but > the performance of the SpaceShip is a little erratic, it does not so much > slide back and forth but moreover, staggers drunkenly sometimes fast
> ans
> sometimes slow
>
> Does anyone know the best way to improve this performance.
>
>
> --
> OHM ( Terry Burns ) * Use the following to email me *
>
> Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
> For i As Int32 = 0 To ch.Length - 1
> ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
> Next
> Process.Start("mailto:" & New String(ch))
> --
>
>
>
>



Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

65
by: Anthony_Barker | last post by:
I have been reading a book about the evolution of the Basic programming language. The author states that Basic - particularly Microsoft's version is full of compromises which crept in along the...
6
by: akash shetty | last post by:
hi, im developing a code which requires searching a large database(bioological) for certain patterns.the size of the file is 3.5GB . the search pattern is a ten letter string.the database...
37
by: ajikoe | last post by:
Hello, Is anyone has experiance in running python code to run multi thread parallel in multi processor. Is it possible ? Can python manage which cpu shoud do every thread? Sincerely Yours,...
8
by: Rodd Snook | last post by:
I have an application which makes extensive use of the Scripting.Dictionary object. I'm not doing anything silly like putting them outside the page scope -- just creating quite a few of them and...
4
by: smoody | last post by:
I have an ASP.NET application which uses a .NET Web Service as a wrapper to a COM+ DLL. Performance for a single user is very good. However, I have noticed that when multiple requests are made...
4
by: Bill Thorne | last post by:
We have a COM object that has been wrappered for use in .NET and which can make calls which can take a while to execute. These are mainframe integration calls that might perform a lot of data...
11
by: Paul Sijben | last post by:
I am stumped by the following problem. I have a large multi-threaded server accepting communications on one UDP port (chosen for its supposed speed). I have been profiling the code and found...
17
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. ...
19
by: frankiespark | last post by:
Hello all, I was perusing the internet for information on threading when I came across this group. Since there seems to be a lot of good ideas and useful info I thought I'd pose a question. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.