Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Basic4ppc Wishlist
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Basic4ppc Wishlist Missing any feature?


Sprite attributes (properties)


Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 06-30-2009, 07:49 PM
Junior Member
 
Join Date: Jul 2007
Location: Oakville, Ontario, Canada
Posts: 43
Default

I just downloaded and unzipped it myself and it runs fine (not counting the exception).

Here is a zip of with just the source and the images without the exe and dlls.
Attached Files
File Type: zip Game0Source.zip (33.9 KB, 11 views)
Reply With Quote
  #22 (permalink)  
Old 07-01-2009, 08:15 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,357
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by enonod View Post
There seems to be a download problem, the file has some ID on the front and registers as corrupt.
4171d1246351689-sprite-attributes-properties-sprite1.23.zip
I don't see that, it downloads fine for me, both by left clicking the link and right clicking then selecting "Save Target As".
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #23 (permalink)  
Old 07-01-2009, 08:29 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,357
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

This has grown into a much more extensive exercise that I anticipated!

Version 1.24 has the following changes.

CollisionMouse events now occur in the order you might expect. That is Sprites added later, and so drawn on top of other Sprites, raise the event first. Sprites may now be modified in the CollisionMouse event without the possibility of raising an exception. This is also true for the other events.

Previously the Tick routine drew the Sprites then moved them ready for the next Tick. This left the position of the Sprites as reported by their X and Y properties different to their screen position. This made clicking a fast moving Sprite difficult as the user saw the current screen position but the collision test saw the next screen position. Now Tick moves all the Sprites then draws them leaving their reported X and Y positions equivalent to their screen positions.
Attached Files
File Type: zip Sprite1.24.zip (7.4 KB, 23 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #24 (permalink)  
Old 07-01-2009, 03:31 PM
Junior Member
 
Join Date: Jul 2007
Location: Oakville, Ontario, Canada
Posts: 43
Default

thanks for the great work agraham. the effort is appreciated. sprite.dll is now a really useful library for games development.
Reply With Quote
  #25 (permalink)  
Old 07-02-2009, 08:38 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,357
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Attached is a provisional help file for version 1.3. There is a description of the additions and changes in the Overview topic.

I will wait a few days to see if anyone comes up with any isuues or requests for changes then I will pass the library and help sources over to Erel for issue as an official library. The official release will include the source code so that the library may be merged when optimised compiled.
Attached Files
File Type: zip SpriteHelp1.3.zip (25.4 KB, 22 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.

Last edited by agraham : 07-02-2009 at 06:35 PM.
Reply With Quote
  #26 (permalink)  
Old 07-02-2009, 06:31 PM
Senior Member
 
Join Date: Oct 2007
Location: U.K.
Posts: 185
Default

Thank you so much agraham, anything extra with sprites is a Godsend. The movement change is especially good news, even though I was unaware of the cause of the difficulty.
I don't know what happened with the download, 1.24 and help both work fine.
Well done.

[Edit] Weeellll, there is one question. Would it be possible to attach data to a sprite? For example an array or list or perhaps a pointer, but not so good.
__________________
You never stop learning until you die.
Sometimes I think I am dead.
Sometimes others think I am dead!

Last edited by enonod : 07-02-2009 at 06:40 PM.
Reply With Quote
  #27 (permalink)  
Old 07-03-2009, 09:34 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,357
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Version 1.25 adds two properties to a Sprite, Data and DataArray. These may be used to hold data individual to each Sprite.

Sprite.Data : String [I/O] : Gets or sets a single data item.
Sprite.DataArray : String() [I/O] : Gets or sets a single dimensioned array of data items.

A small demo is in the archive.
Attached Files
File Type: zip Sprite1.25.zip (8.1 KB, 16 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #28 (permalink)  
Old 07-03-2009, 09:49 AM
Senior Member
 
Join Date: Oct 2007
Location: U.K.
Posts: 185
Default

Quote:
Version 1.25 adds two properties to...
When I read that I thought I had missed it in some very old version, then I read it again...
WoW this is marvellous, thank you.
Have you ever been in the situation where a fruit machine pays out and gets stuck... then every coin you put in causes another payout?
I notice with 1.25 that there are 4 digits left!!

Much obliged, I'm thinking hard...
I haven't tried this new bit yet and can't think quick enough to remember 'data items' types, so I will ask. Does the data item in the array permit an x,y coord as one entry?
__________________
You never stop learning until you die.
Sometimes I think I am dead.
Sometimes others think I am dead!
Reply With Quote
  #29 (permalink)  
Old 07-03-2009, 10:08 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,357
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by enonod View Post
Does the data item in the array permit an x,y coord as one entry?
No, as it's a single dimension array but you could use

arr(0) = x & "," &y

but it's more efficient just to use individual elements. You could use a structure, which is actually an array, to make it easier.


Dim Type(x, y, z, name)Spritedata
....

Dim Spritedata(4) ' make a new array
... ' set it up
Sprite.DataArray = Spritedata() ' assign it to a Sprite
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #30 (permalink)  
Old 07-03-2009, 10:23 AM
Senior Member
 
Join Date: Oct 2007
Location: U.K.
Posts: 185
Default

Thank you agraham that is excellent.
__________________
You never stop learning until you die.
Sometimes I think I am dead.
Sometimes others think I am dead!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembly properties Pachuquin Questions & Help Needed 1 05-05-2009 05:42 PM
Compiled Properties Zenerdiode Basic4ppc Wishlist 4 03-06-2009 08:54 PM
Properties module - useful module for working with properties / ini files Erel Code Samples & Tips 0 11-07-2008 08:01 PM
Evaluate properties Offbeatmammal Basic4ppc Wishlist 0 06-02-2008 06:23 AM
More properties for panels RandomCoder Basic4ppc Wishlist 0 07-12-2007 08:48 PM


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0