Basic4ppc - Windows Mobile Development  

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

Open Source Projects The place to discuss Basic4ppc open source applications.


Pocket Burning Sand (Open Source)


Reply
 
LinkBack Thread Tools Display Modes
  #81 (permalink)  
Old 12-09-2007, 03:29 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

I didn't realise how popular this program would be when I released it... So far it has about 4 times as many posts as the others.

The creator of the PC version did warm me of the slowness that may occur but it sounds god that you seem to have sound a fairly fast way.

would it be possible to use the liquids with the pensizes and such and so be able to make it release the liquids in a more circular format first. (it is not spread out when created like in the PC version)

Also these things don't need to be implemented straight away... As long as the basis of the game is created that is all that matters at the moment, then things like moddability, speed and other things will be implemented later.
Reply With Quote
  #82 (permalink)  
Old 12-09-2007, 05:10 PM
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default wider pen

Easy to change the pens, do u mean like this? Ive just used Agrahams superfast library with a bigger pen footprint. U need to run this from the same folder with the bithandler.dll done for ttt

Note to AGraham.
I want to give Neil what Ive done so far so we can integrate it into his nice BS program, and require a change to the bithandler?
Now I know u said u werent that keen on graphics, but I notice that uve only been off doing Maths (boring lol!) instead so ur talents would be appreciated here!

need varible 'spread' sent to bithandler and
px(i)=px(i) + rnd(-spread,spread)
in the loop before the pixels are plotted.

e.g. Spread might be say 0.6 so all pixels get num ranging from -.6 to +.6 added to px each move down

1) N.B. dont need any variation on y velocity just that change on px.
2) Im not sure how the random num generator works in C, does it just give u a num between 0 & 1?
if so I guess it will be px(i)=px(i) +(RND-0.5)*2*spread or something like that. Im sure u know how to do it as u like Maths so much!

If u can do it will u add it to the bigpenttt below, Ive changed the way boundry checking is done so its faster
Attached Files
File Type: sbp bigpenttt.sbp (713 Bytes, 5 views)

Last edited by colin9876 : 12-10-2007 at 11:54 AM.
Reply With Quote
  #83 (permalink)  
Old 12-09-2007, 09:51 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

Where is the BMP handler? I can't find it in the libraries?

Hold on i read your post and i'll go try it out.

EDIT: pretty fast but when I use blnDRAG = 1 thing tomake it draw it when the stylus is down and no when it was up, then it works on the computer but when on a PPC it waits untill you let go. Why is that?

Last edited by neilnapier : 12-09-2007 at 10:03 PM.
Reply With Quote
  #84 (permalink)  
Old 12-10-2007, 09:24 AM
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default Agraham Bitmaphandler.dll

I actually tried to do the library change myself but no progress. I downloaded the microsoft free c# sdk, and the .net sdk (VisualStudio2003) but cant even get hello world to run yet. Its not user friendly. This just confirms my allegence to Basic4ppc!

Just out of interest tho would Agraham post the c# from the bithandler.dll? Would be interested to see how u did it?

Would still like the one line added if u will do it?

Last edited by colin9876 : 12-10-2007 at 09:32 AM.
Reply With Quote
  #85 (permalink)  
Old 12-10-2007, 10:04 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,690
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by colin9876 View Post
Would be interested to see how u did it?
Txt added as the forum will only upload certain type of files.
Attached Files
File Type: txt BitmapHandler.cs.txt (1.2 KB, 4 views)
Reply With Quote
  #86 (permalink)  
Old 12-10-2007, 11:47 AM
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default .Net library or C command

Thanks - nasty stuff C language by the looks of it!
whats the rnd function in C?
I see .Net framework has
double RandomNumber = RandomClass.NextDouble();
so extra line could be
public int timer(int[]x, int[]y, int n, double spread)
..
px(i)=px(i)+(2*RandomClass.NextDouble()-1)*spread

Is it better to use the c# function for generating a random number or the .Net RandomClass function - or are they both the same thing?

Last edited by colin9876 : 12-10-2007 at 11:52 AM.
Reply With Quote
  #87 (permalink)  
Old 12-10-2007, 02:29 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,690
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by colin9876 View Post
nasty stuff C language by the looks of it!
Not all. It's beautifully elegant, very safe to code but just not what you are used to. BTW you keep typing C - this may be shorthand on your part but this is C# - which is different to C in many ways

Quote:
whats the rnd function in C?
As this is C# not C there are no standard functions/libraries - it relies upon the .NET Framework.

Quote:
I see .Net framework has
double RandomNumber = RandomClass.NextDouble();
That's the one (or one of several)

More completely and with correct syntax. You need a new Random object to create the numbers and the C# compiler will complain that it can't convert a double to an int (because doubles are larger than ints so information can be lost) so you will need to cast it to an int yourself

Code:
Random rand = new Random();

public int timer(int[]x, int[]y, int n, double spread)
{
    ... 
    x[i]=x[i]+(int)((2*rand.NextDouble()-1)*spread);
    ...
}
Here I've done it for you, with source. I haven't time to test it as I have lost the B4PPC test prog I used but as it got through the compiler it is probably OK.
Attached Files
File Type: zip BitmapHandlerDll.zip (2.4 KB, 7 views)
Reply With Quote
  #88 (permalink)  
Old 12-10-2007, 04:06 PM
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default fab

Looks much better! Thanks Agraham - Im sure Neil will think its a step in the right direction
Attached Files
File Type: sbp bstest.sbp (714 Bytes, 7 views)
Reply With Quote
  #89 (permalink)  
Old 12-10-2007, 04:21 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

Much better, well done!

I have altered it slightly so that the mousedown function is on but i'm not sure if it will work on PPC as I havene't tested it on it yet.

All that I have done is add a few lines

EDIT: Also has anyone noticed that sometimes when a stuck one falls then ir reappears at where it was stuck at and falls again. Is there any way to sort that?
Attached Files
File Type: sbp test2.sbp (869 Bytes, 6 views)
Reply With Quote
  #90 (permalink)  
Old 12-10-2007, 04:45 PM
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Neil, dont worry about the stray pixels, its just because I didnt clear a value - I will correct it
As to ur changes - What did u hope to achieve? They dont make any difference on the PPC because you have to do a MouseDown before u can do a MouseMove. Are u wanting this program to run on the desktop aswell or is it soley aimed at the ppc?
If it is just a ppc app I would say leave those lines out because all its doing is (fractionally) slowing it down?

Last edited by colin9876 : 12-10-2007 at 04:56 PM.
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
Tippy v.1.0 [open source] N1c0_ds Share Your Creations 4 Yesterday 10:08 PM
Personal Pocket PC Wiki tsteward Open Source Projects 120 11-11-2008 09:55 AM
Another Pocket Wiki digitaldon37 Open Source Projects 1 09-17-2008 11:01 AM
Pocket Burning Sand neilnapier Questions & Help Needed 2 11-05-2007 08:53 PM
dzSpy - Spy and Task Manager App - Open Source dzt Share Your Creations 3 07-15-2007 06:21 AM


All times are GMT. The time now is 05:17 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0