This site is no longer active and is available for archival purposes only. Registration and login is disabled.

How to animate object in GapiDraw and set Timer/Delay?


How to animate object in GapiDraw and set Timer/Delay?

Postby denthorq » Jun 7, 2003 @ 1:03am

Hi There,

I'm studying GapiDraw 2.xx and I want to know how can I implement animation:

1. What is the appropriate function to use in animating object, blt, bltfast etc?

2. How can I set a delay that won't affect the speed of any ppc when my programs run?

3. If possible can you paste a simple sample code so as for others too.

The case is I want to make a walking person with only two (2) images to move.

Thanks.

** GR Moore its me again, regards. ***
It's worth the wait...
User avatar
denthorq
pm Insider
 
Posts: 447
Joined: Apr 18, 2003 @ 9:15pm
Location: USA-PHILIPPINES


Postby DillRye » Jun 7, 2003 @ 3:33am

check out www.gapidraw.com there is an outline of every function availible.

Personally I put all the frames on a single surface and move the source rect around to create animations. I know there is also built in sprite functions but I am not familar with them.

For the timer thing, there is a built in timer for gapidraw to limit the framerate. If you want to let the framerate run free while limiting other parts, you could use getTickCount() to find the current amout of time in milliseconds that have passed.
User avatar
DillRye
pm Insider
 
Posts: 477
Joined: Apr 25, 2002 @ 7:28am
Location: Iowa State University of Eng


Postby ppcStudios » Jun 7, 2003 @ 3:08pm

G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Thanks

Postby denthorq » Jun 9, 2003 @ 7:10am

It's worth the wait...
User avatar
denthorq
pm Insider
 
Posts: 447
Joined: Apr 18, 2003 @ 9:15pm
Location: USA-PHILIPPINES


Postby ppcStudios » Jun 9, 2003 @ 1:20pm

I think there is more than one thread, but this one might help get you started:

[url]
http://forums.pocketmatrix.com/viewtopi ... highlight=
[/url]
G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Blits

Postby Stainless » Aug 5, 2003 @ 3:37pm

Stainless
 


Postby Centaur » Aug 6, 2003 @ 3:57pm

Centaur
pm Member
 
Posts: 15
Joined: Aug 5, 2003 @ 2:52pm
Location: The Netherlands


Postby ppcStudios » Aug 6, 2003 @ 6:19pm

Honestly, sprite engines aren't rocket science, they just require some research and planning to get everything working efficiently. The biggest issue is the research - almost everyone is so focused on 3D engines, that 2D has fallen by the wayside and reference material is becoming much harder to locate, both in print and on the web.

Since I've been doing 2D for years, I have a ton of old game development books laying around for reference. If you don't have a good library of older dev books, you might want to consider either scouring Ebay or possibly used bookshops in your area.

On the web you should search for sprite engines, isometric engines and 2D development. You likely won't find exactly what you need, but you'll find enough bits and pieces to gain a solid understanding of what is needed for a working sprite engine.

As an overview, a sprite engine handles the drawing of an unlimited number of sprites, as well as handling collision interactions and physics. This could be as simple as creating a linked list of sprites that are traversed every cycle.

You'll probably want to consider each sprite as a series of n-frames of animation. This means you could have a sprite with 1 frame of animation (a static image) or 100 frames of animation (a very smooth animation). This animation could process forward or backward, could be looping or bidirectional, or could simply be a single pass animation (such as a door opening). Each frame would process in a certain time frame, and you may want to consider skipping frames on slower devices if required. You may want to blt each frame individually, or possibly overlapping frames to create a motion-blur effect. Your animations could utilize simple transparency or more sophisticated blending techniques.

There's much, much more you could do, and you can make a sprite engine as simple or as complex as you like. It could be somewhat generic, or could be specific to your application.

Hope this helped a bit...
G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Postby denthorq » Aug 6, 2003 @ 6:33pm

Hi GR,

What do you call your engine for Warlords? It is 3D or 2D and I think it would be cool to put your engine a name :-)

How about starcraft,warcraft and diablo (old version) do you classify it as 2d or 3d engines?

Regards.
It's worth the wait...
User avatar
denthorq
pm Insider
 
Posts: 447
Joined: Apr 18, 2003 @ 9:15pm
Location: USA-PHILIPPINES


Postby ppcStudios » Aug 6, 2003 @ 7:05pm

G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Starcraft is not 3D

Postby mlepage » Aug 6, 2003 @ 10:40pm

User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby denthorq » Aug 7, 2003 @ 12:17am

I got addictive with this Starcraft game esp Battle Net. I wish someone will port this game too for Pocket PC.

If no one does, I might hehehe :-) Just a thought.
It's worth the wait...
User avatar
denthorq
pm Insider
 
Posts: 447
Joined: Apr 18, 2003 @ 9:15pm
Location: USA-PHILIPPINES


Good luck

Postby mlepage » Aug 7, 2003 @ 5:01am

User avatar
mlepage
pm Insider
 
Posts: 1050
Joined: Aug 3, 2003 @ 4:47am
Location: Canada


Postby denthorq » Aug 7, 2003 @ 5:19am

It's worth the wait...
User avatar
denthorq
pm Insider
 
Posts: 447
Joined: Apr 18, 2003 @ 9:15pm
Location: USA-PHILIPPINES


Postby ppcStudios » Aug 7, 2003 @ 1:04pm

I'm not much of a fan of the FreeCraft, FreeCiv and similar projects - to me they are nothing more than an attempt to reverse engineer someone elses work (but thats not the topic here, and one that doesn't belong in the GapiDraw forum).

If you want to produce an authorized ppc port of a product:

a) do market research concerning the viability of the product
b) formulate a solid business plan focusing on the product
c) have extensive industry experience and proven success in bringing products to various platforms
d) contact the owners of the license in a professional, business-like manner and present a compelling reason for them to authorize the port
e) negotiate a win-win contract for the license

There's nearly as much work involved in acquiring a license as there is in porting the project over. Then there's the port itself - working with someone elses code that is usually years old, may be poorly documented, or requires non-existant 3rd party libraries. If you're not working on the project full-time, you'll never meet your contractual obligations and that license will be wasted.
G.R. Moore
President/CEO
Pocket PC Studios
www.ppcstudios.com

Image
User avatar
ppcStudios
pm Insider
 
Posts: 744
Joined: Aug 23, 2002 @ 3:53pm
Location: Canfield, Ohio


Next

Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron