Two questions: on using the SmartDevice emulator and mouse events

G

Guest

Hi, I'm a CS student who's developing a game for a mobile device as an
independant study project. I'm sorry if this is a repeat question or if
there's a FAQ I've missed.

My first question relates to using the mobile device emulator. I'm using
VS.NET 2003 to develop the game, and while running the emulator by debugging
the program works fine, I was wondering how I can use the emulator without
using the VS debugger or VS in any way. Is there a way? If so, can I load a
program from my hard drive (i.e., the game program) into the emulator? This
is the first time I've used an emulator for software development, so I'm
unfamilliar with their operation. I only ask because my professor would like
to be able to run the emulator and the game without having to go through VS.

My second question relates to the MouseDown event. One of the goals I have
for my game (a turn-based tactics/strategy game) is to make the game's
execution entirely user driven, and to have the user interface strongly tied
to the capabilities of a pocket PC. In other owrds, I'd like it if all the
player has to do is tap the pen on the screen when and where he/she wants
things to happen. That is, ideally, the only type of player action that has
to be taken to make the game playable is a pen tap. In development, I've been
using MouseDown events, because they give an (x,y) coordinate pair that can
be used to determine when the user wants to interact with the game; e .g., if
the player has selected a unit, or is ordering a unit to attack another unit,
etc. at a location based on the (x,y) coordinate of the mouse click. Will
the MouseDown event "corespond" to pen taps on an actual pocket PC? Or is
there another event that can be used? Or have I missed the point on some more
fundamental level?

Thanks for your time,
GunnerJ
 
D

Darren Shaffer

A couple of thoughts for you Gunner.

Why not send your instructor a CAB file of your application and have him
deploy and run it on a real device? You're going to struggle with
performance in the emulator.
Especially with a game. The emulator is intended to be used in conjunction
with an SDK.

On the MouseDown question, I'm wondering if you are using the Compact
Framework
for your game? If so, it is more typical to capture MouseUp to determine
X,Y coordinates
of a stylus screen tap, but it is up to whatever control your game board is
contained within to
fire the MouseUp event.

Good luck with your project!

-Darren
 
G

Guest

Why not send your instructor a CAB file of your application and have him
deploy and run it on a real device? You're going to struggle with
performance in the emulator.
Especially with a game. The emulator is intended to be used in conjunction
with an SDK.

Well, there's a few reasons. My professor said that as part of the project,
he wants me to set up and install the application on an emulator. If that
isn't possible, then I guess the point is moot. (He actually hasn't used the
compact framework or worked with emulators much himself, hence it's been a
VERY independant study, which is fine because I've learned a lot.) In any
case, I'm not sure if he even has a pocket PC to run it on. And, well,
failing that... I don't know what a CAB file is. Heh.

I mean, it would be great to run it on an actual device, but I don't think
i';s strictly necessary for the project, which is supposed to be more of a
demonstration of my own learning and application of what I've learned than
anything. I don't think performance is too great an issue, in any case. The
game has a total of seven image files, six of them only 1.2 KB. It's a very
simple strategy game that operates in turns and only does things when the
user needs it too.
Framework
for your game? If so, it is more typical to capture MouseUp to determine
X,Y coordinates
of a stylus screen tap, but it is up to whatever control your game board is
contained within to
fire the MouseUp event.

I am using the compact framework, actually. I hadn't considered using
MouseUp, but if it's better for the task, it'd be easy to switch over to it.
The board is a bitmap with unit bitmaps painted onto it, and this bitmap is
in turn painted onto a form. I have working algorithms in place to convert
from pixel x,y coordinates from a MouseDown event on the form into units the
game will understand (and to convert in-game operations into displayed
graphics). It's really just a matter of what event handler to use.
Good luck with your project!

Thank you, and thanks for the reply, it was very helpful!

-GJ
 
S

Stuart Celarier

No, the emulator cannot be installed separately from Visual Studio. Even
if it were technically possible, the license prohibits you from
redistributing it, which would include redistributing it to a professor.

Cheers,
Stuart Celarier, Fern Creek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top