Sign in
|
Join
|
Help
Pavel's Blog
Pavel is a software guy that is interested in almost everything
software related... way too much for too little time
Home
Contact
About
RSS
Atom
Comments RSS
Go
Tags
.NET
.NET 4
.NET 4.0
.NET 4.5
.NET2
64 bit
AI
AJAX
Algorithms
ASP.NET
Audio
Azure
BUILD
C#
C# 3.0
C# 4.0
C# 5.0
C++
C++/CX
C++0X
C++11
CLR
CLR Explorer
COM
COM Apartments
Console
courses
D&D
Debugging
DEV
Developer Academy 3
Device Drivers
DirectCompute
DirectX
food
Fun
Games
Graphics
Intel
Intellisense
Internals
Interop
ITPRO
LINQ
LINQ to XML
Mathematics
Media Foundation
MEF
Memory Map Viewer
Metro
MFC
Multithreading
Native API
Native Development
NLP
Numerics
OFFTOPIC
OpenDay
PARSING
PDC2008
ReSharper
Robotics
Roslyn
Silverlight
Silverlight 2
Task Parallel Library
TECH
teched
teched_il
TechEd2010
TechedIsrael2008
thoughts
Threading
Tips
Tutorial
video
Vista
Visual Basic
Visual C++
Visual Studio
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2012
WebTech
Win32
WinDbg
Windows 8
Windows Devices User Group
Windows Phone
Windows Phone 8
Windows Phone User Group
Windows Platfrom User Group
Windows Runtime
Windows7
WPF
XAML
XNA
מכללת הי-טק
Archives
May 2013 (2)
April 2013 (2)
March 2013 (3)
February 2013 (2)
January 2013 (2)
December 2012 (3)
November 2012 (3)
October 2012 (5)
September 2012 (6)
August 2012 (4)
July 2012 (2)
June 2012 (4)
May 2012 (5)
April 2012 (4)
March 2012 (7)
February 2012 (7)
January 2012 (6)
December 2011 (6)
November 2011 (5)
October 2011 (5)
September 2011 (5)
August 2011 (5)
July 2011 (3)
June 2011 (3)
May 2011 (3)
April 2011 (3)
March 2011 (8)
February 2011 (4)
January 2011 (5)
December 2010 (5)
November 2010 (13)
October 2010 (4)
September 2010 (5)
August 2010 (7)
July 2010 (1)
June 2010 (3)
May 2010 (4)
April 2010 (1)
March 2010 (2)
February 2010 (2)
January 2010 (3)
December 2009 (1)
November 2009 (4)
October 2009 (5)
September 2009 (3)
August 2009 (1)
July 2009 (4)
June 2009 (3)
May 2009 (2)
April 2009 (3)
March 2009 (2)
February 2009 (5)
January 2009 (3)
December 2008 (2)
November 2008 (4)
October 2008 (7)
September 2008 (6)
August 2008 (5)
July 2008 (6)
June 2008 (3)
May 2008 (5)
April 2008 (2)
March 2008 (9)
February 2008 (4)
January 2008 (9)
December 2007 (6)
Navigation
Home
All Posts
RSS
Popular Tags
Browse by Tags
All Tags
»
Graphics
(
RSS
)
.NET
.NET 4
Algorithms
Android
C#
C# 5.0
C++
DEV
DirectCompute
DirectX
Fun
Games
Interop
MFC
Native Development
Numerics
OFFTOPIC
Shaders
Silverlight
TECH
thoughts
Tutorial
Visual Studio 2010
VS 2010
Windows Phone
WPF
XAML
XNA
מכללת הי-טק
Towers of Hanoi–WPF Style (Part 2)
13 February 12 10:45 PM
|
pavely
| with
no comments
In the first part , we saw how to recursively solve the Towers of Hanoi problem in C#. In this post I want to show a graphic view of the solution. This is a starting position with 7 discs: This is how it looks when the problem is solved: In between, the discs move with animation from pole to pole, as the solution dictates. Options include speeding up the process (with the slider, very useful), pausing the animation and resetting to the initial state. Here’s something in the middle: The Poles The...
A New Android Game in Town (by my brother)
05 February 12 10:36 PM
|
pavely
|
4 comment(s)
Anyone who has ever written a game knows it’s hard to get it done from start to finish. Sure, I can put on a demo of some game I’ve created in several hours. But creating all the graphics, sound, animation, levels, transitions, scoring, etc, from start to finish is quite a challenge, especially for a single developer. That’s why I’m very proud of my young brother, Yaniv , that has worked hard for the past 10 months (while maintaining a proper day job!) on an awesome fun game called Micro Wars , targeted...
WPF Tip: Displaying Images in different Pixel formats
30 January 12 12:25 AM
|
pavely
|
3 comment(s)
If we want to show an image in WPF, we typically use an Image element and connect its Source property to some image resource within our project: < Image Source ="Penguins.jpg" /> The Source property is not a string, it’s an ImageSource – an abstract type with several concrete implementations that provide a “real” image source. The above markup works thanks to the help of a type converter, that makes the source a BitmapImage – one of the simplest sources, that presents the image as...
Using the Async CTP With Windows Phone
07 January 12 12:05 PM
|
pavely
| with
no comments
The Async CTP that exposes C# 5.0 features to be used with asynchronous programming is not just for the full .NET Framework. There are versions for Silverlight (4 and 5) and even Windows Phone (which can be viewed as Silverlight 4, but has a separate supporting assembly). To demonstrate, I’ve adapted my sample of the Mandelbrot set to Windows Phone, while taking advantage of the async features to keep the UI responsive. After creating the initial Silverlight for Windows Phone project, I’ve added...
The Future of Silverlight
14 November 11 06:33 PM
|
pavely
| with
no comments
There’s been a lot of talk lately about Silverlight. Will Silverlight 5 (to be released this month) be the last major version of Silverlight? I don’t know, but here are my thoughts on the subject. Silverlight will stay in the context of Windows Phone, that’s seems pretty sure, but what about the web at large? Is Silverlight (and its rival, Adobe Flash) doomed? In recent years, there has been gravitation towards standards – that is, world wide standards, not Microsoft’s or anyone else’s for that matter...
Windows Phone: Combining Silverlight & XNA in a Single Page
26 October 11 09:30 PM
|
pavely
|
2 comment(s)
There are two very distinct ways to program on Windows Phone 7.x: Silverlight & XNA. Silverlight is about UI, retained graphics and is event driven. XNA is about immediate mode graphics, based on a timer and polling; Very different models indeed. Each has its strengths and weaknesses. One of the new features in WP7.1 (“mango”) is the ability to combine the two to get the best of both worlds. Here’s a typical scenario where this need may come up: suppose you’re developing an XNA game (2D or 3D...
Porting an XNA game from Windows to Windows Phone (Part 2)
14 August 11 03:40 PM
|
pavely
|
2 comment(s)
In the first part we got our introduction screen up and running, with the starfield scrolling by. However, we couldn’t actually start playing because the game was waiting for a key press… which is nowhere to be found on a Windows Phone device. We simply need a little touch. Adding Touch Support Touch is something the XNA version of Windows and XBOX 360 have no notion of. This is specific for Windows Phone. Touch input information is available as “raw” data (touch points, with positions, etc.) and...
WPF For WinForms (and MFC) Developers, Part 1
11 January 11 04:00 PM
|
pavely
|
3 comment(s)
WPF has been around for more than 4 years now (since the release of Windows Vista), but only in the last couple of years there is increased move from Windows Forms to WPF. However, the transition is anything but easy. This is not just because WPF is relatively new, or because people are people, and as such don’t like change for the sake of change. I mean, WinForms is ok, isn’t it? MFC may be old, but it works, doesn’t it? The term User Interface (UI) has served us for years. In recent years, this...
Visual Studio 2010 SP1 Beta: What’s new in MFC?
25 December 10 03:23 PM
|
pavely
| with
no comments
The recently released Visual Studio 2010 SP1 Beta brings many enhancements and bug fixes found since the product’s launch, most of them in the managed world. However, there are new enhancements to the good(?) old MFC , namely wrapping of some of the Direct2D interfaces. Direct2D is a new layer in the DirectX world, sitting on top of Direct3D, providing high performance and flexible 2D graphics. It was introduced with Windows 7 and Windows 2008 R2, but it’s also possible to install it on Windows Vista...
XNA 2D Game Tutorial (Part 11)
17 November 10 07:25 PM
|
pavely
|
6 comment(s)
Previous posts in this series: Part 1 : Getting started Part 2 : Drawing something Part 3 : Input handling Part 4 : Game Components Part 5 : Animation and Sprites Part 6 : Handling Projectiles Part 7 : Sound Effects Part 8 : Setting Up Data Part 9 : Creating Aliens Part 10 : Collision Detection In the previous part we did some collision detection between the player’s missiles and the aliens. If hit, the alien disappeared gradually (as opposed to a big explosion). Let’s add some more collision detection...
XNA 2D Game Tutorial (Part 9)
14 November 10 10:20 PM
|
pavely
|
3 comment(s)
Previous posts in this series: Part 1 : Getting started Part 2 : Drawing something Part 3 : Input handling Part 4 : Game Components Part 5 : Animation and Sprites Part 6 : Handling Projectiles Part 7 : Sound Effects Part 8 : Setting Up Data In the previous post we prepared the data for the aliens and for the game levels. In this post, we’ll put that data to action. The first thing we’ll do is create a custom Alien class, that extends the Sprite class and adds some specific alien attributes. This...
XNA 2D Game Tutorial (Part 6)
09 November 10 01:20 PM
|
pavely
|
10 comment(s)
Previous parts in this series: Part 1 : Getting started Part 2 : Drawing something Part 3 : Input handling Part 4 : Game Components Part 5 : Animation and Sprites In the previous part, we added animation capabilities to a general Sprite class. Our next step is to add firing capabilities to the player. The first thing we’ll do is move the player logic to its own component. This would make it flexible (allowing us to disable it in a title screen, for example) and easier to maintain. Add a new Game...
XNA 2D Game Tutorial (Part 5)
07 November 10 10:17 PM
|
pavely
|
15 comment(s)
Previous parts in this series: Part 1 (Getting Started), Part 2 (Showing Something), Part 3 (Input Handling), Part 4 (Game Components). What do we have at the moment? A ship we can control with keyboard and stars flying by, implemented as a DrawableGameComponent for flexibility and modularity. Although the ship seems to move, it’s still too static. Its engines are not changing. What we want is some animation. Perhaps toggling between two images such that the engine would seem to fluctuate? Animation...
XNA 2D Game Tutorial (Part 4)
06 November 10 12:06 AM
|
pavely
|
10 comment(s)
Previous posts in this series: Part 1 , Part 2 , Part 3 . Our sprite ship is moving with the help of the arrow keys. But it doesn’t seem to be travelling through space. Perhaps we should add some starts going by, as the ship travels forward at incredible speeds… We could continue with the same basic idea we use with the player’s ship: Add appropriate variables, update stars position in the Update method and draw them all in the Draw method. This will cause some bloating of Update and Draw , not to...
XNA 2D Game Tutorial (Part 2)
02 November 10 12:18 PM
|
pavely
|
14 comment(s)
In the first part we just created a black window. It’s time to see something more interesting. The first thing we’ll do is change the window size. The window size is important for practical purposes – all our sprites (soon to be drawn) need to be with a good relative size, the space for movement must be sufficient, etc. The other thing is full screen mode. In a typical game, immersion is the keyword. To immerse the player inside the game, she should not see the taskbar, messenger popping up, etc...
More Posts
Next page »