473,320 Members | 1,910 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,320 software developers and data experts.

Sprites in C# sans DirectX

All:

Does anyone have a sample (or a quick explanation) of creating a simple
sprite with C#? I want to write a simple game for my children.

Is it as simple as creating a PNG w/ a transparent color and "blitting"
(I am using C#, so "rendering" might be a better term here) the graphic
onto my background -- or do I need to handle the transparency myself
somehow?

Many thanks,
John

Nov 16 '05 #1
2 8195
Take a look a the new article on animation in Windows Forms Tips and Tricks.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<jp******@mvisiontechnology.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
All:

Does anyone have a sample (or a quick explanation) of creating a simple
sprite with C#? I want to write a simple game for my children.

Is it as simple as creating a PNG w/ a transparent color and "blitting"
(I am using C#, so "rendering" might be a better term here) the graphic
onto my background -- or do I need to handle the transparency myself
somehow?

Many thanks,
John

Nov 16 '05 #2
Bob,

Thanks for the answer, but I did not see a direct relationship to my
question in this article. I am looking for rendering bitmaps (in the
generic sense) from say, an image strip, onto a background. My main
question is, do I need to handle transparency myself, or is there a
call I make to tell the GDI+ rendering engine to make a certain color
transparent --- ?

Thanks,
John

Bob Powell [MVP] wrote:
Take a look a the new article on animation in Windows Forms Tips and Tricks.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<jp******@mvisiontechnology.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
All:

Does anyone have a sample (or a quick explanation) of creating a simple sprite with C#? I want to write a simple game for my children.

Is it as simple as creating a PNG w/ a transparent color and "blitting" (I am using C#, so "rendering" might be a better term here) the graphic onto my background -- or do I need to handle the transparency myself somehow?

Many thanks,
John


Nov 16 '05 #3

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

Similar topics

7
by: kastillo | last post by:
Im trying to install directx 9.0 c , but i simply cant . When i run the installer it just says " The installed components are ready to use". This is the report on directx.log : 09/10/05...
2
by: Akkadian123 | last post by:
Hi guys, I'm a student of c#, and I was wondering how one would take advantage of multimedia in most c# apps/games. I assume one would use directx9, since there doesn't seem to be any support...
2
by: Michael Mayer | last post by:
First of all, sorry for the cross-post. Seems like there should be a managed directx newsgroup. I'm trying to open the following sample application that comes with the DirectX SDK....
6
by: ammd | last post by:
Hi, I installed Microsoft DirectX 9.0 SDK (Summer 2004) but when I create a project and try to add the necessary references I can't find them. Does anybody know where to look for them? BTW, I have VS...
4
by: Junaid Hussain | last post by:
Hi, I am thinking about developing a 3D pool game in C# using DirectX, however when I compile a C# at the command prompt using; csc PoolGame.cs , I get the following error message; The type or...
9
by: Mike P | last post by:
Problems, problems... Im trying to create DirectX Projects within C# and to also look at the latest DirectX C# Samples. I have just installed MS Visual C# .net Standard Edition on my Windows...
0
by: Harvey Cohen | last post by:
Hello all, I have some C# code that implements calls to DirectX.DirectSound. It compiles under both VS .NET 2003 and VS 2005 and runs under VS .NET 2003 and VS 2005 on a Compaq laptop (Windows...
14
by: Jessica Weiner | last post by:
I am writing an application in C# which need to plot graphs and simple shapes (polygons, circles, squares etc). Which library is better for this purpose and why? Thanks.
2
by: Paulos | last post by:
Hello, I'm trying to use DirectX 9.0c to create a small game. Although drawing sprites on screen is not a problem, I can't find any information about how to make a drawn sprite respond to simple...
11
by: raylopez99 | last post by:
I just downloaded the apparently free SDK for DirectX 9, all 200+ MB of it, but as I read about WPF I wonder: is DirectX obsolete? Should I even bother learning how to use it? After all, the end...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.