PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Pod - My First Game

Hey everyone,

First post here. My fiance bought me a new Dell Axim X5 for Christmas. Since finding out I was getting it, I started writing a game for it, and although I think the game performs quite well, I have no idea how it will perform on anything other than the X5.

It's an arcade space-game I call Pod. If you could, I'd love to get some feedback on it. I don't have all of the levels completed, but I think the GUI and dynamics are complete.

You can check it out <A href="http://www.john-till.net/personal/pod.asp">here</A> and reply to this post or send me an email with your feedback.

And although this is my first post, I've been reading the forum for a couple of weeks, and I want to thank you all for the information you've provided, and I look forward to providing feedback in return.

Special thanks to Thierry! Without you, my game Pod wouldn't exist.

-John
Conan · 20 Jan 2003, 14:40 UTC — feedback re: iPaq testing of POD
I tried your demo game on my iPaq h3650. All the game menu items work but when I take play I get an illegal operation. The game draws a screen before this error comes up.

Does this run ok in the PocketPC emulator?

happy to try next version.

ps: what are the controls on the PC version?
In the emulator that came with eVC 3.0, it doesn't run. It tells me it's not a valid application. I haven't tried any tweaks to the emulator yet. It didn't run the Blit program either, but it did do Asteroids. Any thoughts?

Controls for the PC version are the mouse (to shoot and select weapons) and the arrow keys (to move). (1, 2, 3, Enter for the hotkeys)

Thanks for the feedback, Conan.
Scratch that. I just tried Asteroids again, and it said "This is not a valid Pocket PC application."

Guess I better recheck all the posts to figure this out.
If it says it's not a valid application, that sounds like you are not setting the compile target properly. Remember that to run in the emulator you have to target the x86em... Check Build... Active Configuration (there is also a toolbar available that does the same thing, but you might not have it turned on, the menu is of course always available).

Just a guess, but I'd check that first...
Conan, I think I fixed the problem.

On the config screen, I've also added a couple of buttons to turn on FPS and X-Y coordinates. On my Axim (300MHz 32MB), I'm getting an average of about 28 FPS, but it varies between 22 and 32 FPS.

The game is available <A HREF="http://www.john-till.net/personal/pod.asp">here</A> for anyone who'd like to provide some feedback on it.

Thanks again,
John
Conan · 22 Jan 2003, 08:10 UTC — sorry, same crash
the game still crashes in the main screen but with the fps counter on I can see that it runs for a couple of seconds so it's something that happens just after the main screen is painted a few frames in.
I've tried the game on PC and it works like a charm. Took a while to get the hang of how it all works but then it's a really fun game. Strategic, yet with action. Good work.

It does however have the same problem as all other PF stuff have unless you take explicit actions. What I'm talking about is the CPU usage. If you look at the 'task manager' you'll see that the game takes (atleast on my PC) 50% or something. You can reduce this to just a few procent by just adding a Sleep() after the display->Update() in GameLoop().

You don't have to Sleep very long. Just a fraction of a second. On my '3D Rotate' I reduced the CPU usage from 50-55 down to 1-3% just by adding Sleep(10). Ok, the performance will drop some, but in most cases you won't notice the differance (depends on what you are doing, how you wrote the code, and how time-critical the application is)

I'm not shure how big a differance this corresponds to on a PDA (because I don't have a tool to meassure the CPU usage on my PDA), but I'd suspect that it does make a difference, and in that case you would be able to play your game a while longer untill the batteries go out.

I can't play your game on PC for more than 10 min. After that, the CPU gets to hot. If you could try this out and let me know, I'd appreciate it.
Just in case nobody's said this lately... You guys rock!

Conan, the game should run fine now. My background image was blitting beyond the surface. On the desktop and XScale, that didn't seem to mean much (it would wrap), but I'm betting your ARM didn't like it. So I re-worked the backgrounds to the way I really should've written them in the first place.

adde, I added a Sleep(5), but only if it's not INGAME, so for all of the menus, pause, etc, it should reduce that CPU usage.

fzammetti, thanks for the tips on getting my environment right. That's where the emulator problem was.

Anyway, I've updated the demo versions for download, so if you guys could give it another go, it'd be much appreciated.

Thanks again, John
What, no MIPS build?!?

Yes, the Rodney Dangerfield of PDA CPU's continues! :)
Presto wrote:
adde, I added a Sleep(5), but only if it's not INGAME, so for all of the menus, pause, etc, it should reduce that CPU usage.


Well, like I said. You only have to Sleep a few miliseconds in order for the CPU to recover. It's like running an electrical motor. You don't give it constant voltage when you want it to run. If you did, the motor would over heat and possibly burn. You have a PWM (Pulse Width Modulator) that sends a square wave signal calculated to have the same effect. Or in other words: you send x 0 x 0 x (where x is the calculated voltage) in a rapid pase so that the motor acts like it's running with a constant speed, but it doesn't generate as much heat.

Anyways. The Sleep(5) you added does make a huge differance. On my computer (i586-550cel) the CPU usage dropped from 50-55 down to just a few percentages. You should be able to add this to the game as well. But, like I said before. I don't know how effective this is on a PDA.

Thanks for trying out my theory =)

Also, but this is not really an issue on a PDA I guess (since you almost always only run 1 application at a time), the GameLoop should Sleep if it's suspended. Or better still, WaitForSingleObject. This is rather simple to implement (using the Set/ResetEvent() and a manual Event), but you must change the code for the game object/class (or to be more precice, the OnSetFocus()/OnKillFocus() and Run() functions).

As it is now, the game will keep on running and using CPU resources, even though it lost focus.
fzammetti, I added MIPS and SH3 builds. :D

-John
Conan · 25 Jan 2003, 16:46 UTC — POD is go on iPaq now
Yes, that seems to have fixed it, Ive had a quick play. I like the particle implementation, very nice.

I would suggest EZSetup for the installer as it's the one most people use ( ie: those who want a free install maker )

Are you selling as shareware when it's fully tested?
Conan, that's the plan. =)

I read your tutorial on EZSetup. Very nicely written. I got it working my first try, even though there wasn't any substance to my readme or eula.

I've still got some work to do on the real game yet, as far as adding content. In a couple of weeks, I hope to have the game posted on Pocketgear and Handango.

Thanks for your help,
-John
Conan · 26 Jan 2003, 09:23 UTC — Shareware selling
I get about 60% sales from download sites who then use ShareIt! to register, 55% from Handango and 5% from PocketGear. I've actually dropped PocketGear as it's too much trouble to bank the small cheques they were sending.

It's worth e-mailing their marketing people to see what kind of deal you can get for a banner add as you may make lots more than you pay out through extra sales.

If you do post to download sites don't post to all of them first time round as you will find mistakes & have to go through the re-post process again. Download.com and ZDNET are by far the largest.

Most of my support e-mails are about installation and much later re-installing on new devices.
Just played the game for a little while on my E-125 (so obviously it runs on MIPS). Very nice job!

I was seeing around 20-25FPS pretty steadily. There was a noticeable slowdown sometimes though when the playfield scrolled, but of course we're talking about a 150MHz device, I'm sure it's fine on any current device.

One suggestion I might make, and this is for anyone doing PF development (well, ANY PocketPC development at all really)...

What I like to do is pick a baseline device, in my case my E-125. I determine what frame rate will work good for my game, then I make sure that my 125 can manage it steadily. Assuming it does, I put in code to limit the frame rate accordingly.

This has the benefit of assuring that my game runs at the same speed on all devices (ignoring SH3 for the most part, but even my current project will manage the 30FPS I choose on those devices). It also means that, since I checked the frame rate on the baseline device at the point in the game with the greatest potential for slowdown, that I will have a very constant FPS no matter what is happening in the game.

This just makes sense to me, maybe someone can point out a reason why it's not a good idea, but in the absence of that, I suggest this approach for everyone.
Just wanted to drop a note for the author that the mips demo build of Pod runs smooth and is very fun on the casio be300. I run expod gold on mine. I am very impressed with the game and once the full version is out i'm sure this will be a best seller. Thank you for making a mips version :D
Conan - PocketGear 747 downloads (http://www.pocketgear.com/software_detail.asp?id=7600) Handango 32 (http://www.handango.com/PlatformProduct ... atformId=2) Conan are you sure you app was listed pn PocketGear not PalmGear ;)
Conan · 14 Apr 2003, 07:14 UTC — PocketGear question ?
What a strange post by anonymous & I'm not sure what it means ???
Yes... I'm sure it was PocketGear my game was listed on. That's the name on the cheques & I can tell the difference between a Palm and a CE device. I dropped PocketGear as their sales were very small compared to Handango & Shareit! I will use them again in the future. Currently Handango sales are taking a bigger & bigger % of sales. A trend I notice is that one sale is followed quite quickly by a few others. Maybe that means that in some way the game is more visible to buyers after sales take place though as I don't frequent Handango I can't tell. I'm actually deliberately not advertising Space Treker 2 in any way as I want to make a splash when my current project is ready.
Yeah. That is a weird post.

Those numbers posted were for Pod, the first game I developed. I haven't figured out myself why it's been downloaded from Pocketgear 700 more times. I think it's just gotten lost in the shuffle on Handango.

Overall, all of my games have been downloaded from Pocketgear more than Handango. Pod is just the extreme example. (23:1 ratio)

Amazingly though, in 3 days, my Freeware Tic-Tac-Toe game was downloaded more than 500 times between the two sites. Since then, I've had a few more sales of both Pod and Dr. Pocket.

I've begun re-working Pod to put in Multi-player. Hopefully its sales really pick up afterwards.

Marketing truly is everything.

-John
Presto - what are you planning on using for network lib? I'd really like to make my game DevilDarts multi-player over TCP minimum and maybe bluetooth/GPRS

I have a basic understanding of networking fundamentals and have written some very basic socket code but have not extended this to any type of game programming.

I think the only info that has to go over the wire is the players power and angle for each throw, 2 int vars - all other game info would be calculated locally. Peer to peer should work fine...

In essense this should be a very easy straight forward project but I'm a bit timid about getting started.

Picking a lib or using win sockets is my first stumbling block...

My other reserve is the GUI stuff needed to enumerate available pocketPC's to play against and choosing multi-player options (not a huge programming effort but still would take extra time)

Probably the best thing for me to do would be to write a simple networked pocketPC game where the cients pass two ints back and forth like x,y loc of a sprite and see if I can get that working then move on from there.

Please let me know what you are up to as it may motivate me to add this feature that I've been putting off for many months now!!
I plan to go with DirectPlay for Pocket PCs. It seems to be the only DirectX component available for PPCs.

http://www.microsoft.com/downloads/deta ... laylang=en

It shouldn't be too much trouble getting it to work, but anyone using it will have to install the runtime and it'll only work on PPC2002.
:?:
:lol:
It's a spam bot that digs up old threads and tries to improve google stats by adding links to the site... I got one of these posts in my forum, which I removed.