Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Animation & Graphics

timer animation

  • Please log in to reply
15 replies to this topic

#1 danrivers

danrivers

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 25 January 2009 - 10:18 AM

Hello. I'm new to c# but not new to c++. With c++ I'd create a picture box and draw to that (handling transparency using xor & and (with masks)). My c# book is telling me to create a control to do the animation (that I can drag & drop out of the toolbox).

I got this working & created a timer to move the image. This works but is it the way to go? It's annoying as it moves & animates in design mode (when it's not running) which makes it hard to modify.

Is this the way to go about programming games, or is there a 'proper' way to do it?

Dan
  • 0

#2 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 28 January 2009 - 12:15 PM

So it's active in the design mode? I guess that's a bug from your UserControl... now that's strange! I doubt that is the way it's meant to be.. I mean.. in design mode timers arent even active!
  • 0

#3 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 28 January 2009 - 12:17 PM

If you are using C#, I would recommend the XNA Game Framework, which is designed specifically for game programming.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#4 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 28 January 2009 - 09:01 PM

But he is using some c# book.. so he is just following a set of instructions. I doubt the book is showing you the way to go.. but anyways, what is the name of the book?
  • 0

#5 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 29 January 2009 - 12:40 PM

In any case, for a book you could get XNA Unleashes by Chad Carter.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#6 gaylo565

gaylo565

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 258 posts

Posted 31 January 2009 - 12:09 AM

I agree with Xav...Ive done a bit of game programming with c# and it is fairly difficult without an API specifically for games or graphics. I used your method (using a timer and modifying the position and visual properties of the control for movement) for most of my easy games like tetris and centipede, but when I tried to work with more difficult graphics tasks I found that it was much easier once I learned an API. XNA is a pretty good bet as far as gaming goes.
  • 0

#7 Termana

Termana

    CC Devotee

  • Just Joined
  • PipPipPipPipPipPip
  • 971 posts

Posted 31 January 2009 - 12:23 AM

since the XNA API is just a wrapper around the DirectX DLLs it is generally going to be good however you could also use SlimDX or if you prefer OpenGL you could use the Tao API
Posted via CodeCall Mobile
  • 0

#8 Anju

Anju

    CC Lurker

  • Just Joined
  • Pip
  • 3 posts

Posted 12 February 2009 - 03:59 AM

can any one suggest me how can we create animated logo for our site .our site is related with entertainment ,dance and music .i'll waiting for your reply
  • 0

#9 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 12 February 2009 - 08:53 AM

Flash or an animated gif come to mind.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#10 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 12 February 2009 - 12:42 PM

At least don't use animated gifs on webpages. They look unbelievably tacky.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#11 gaylo565

gaylo565

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 258 posts

Posted 15 February 2009 - 08:56 AM

Use flash...This is your best way to go for small animations on webpages.
  • 0

#12 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 15 February 2009 - 12:43 PM

Just bear in mind that they may be blocked by ad blockers (eg AdBlock Plus).
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?





Also tagged with one or more of these keywords: timer, animation

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download