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
  #41 (permalink)  
Old 12-02-2007, 02:04 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

I don't have a "system" to work with. I just write code to do what I want it to do. Sometimes I use B4PPC sometimes I use Visual Studio 2005 and C# or VB.NET. If I need performance in a B4PPC app on a device I am lucky enough to have the skills and experience to implement the code in C# in a library. When other people express a need they themselves can't fulfill I try to use my experience to help them out.

I entered this thread to try to point out the performance limitations of B4PPC that you will encounter before you wasted too much time and effort on something that is not achievable - at least not on a device and not to the standard that you seem to expect. I sorry but I don't have a solution - you will need to find and evaluate one yourself.
Reply With Quote
  #42 (permalink)  
Old 12-02-2007, 03:53 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

When I said system I meant your code. I suppose I could learn another language BUT then I need to start from scratch. If PocketSand was able to do it why can't I???

There must be a way. I think that every single modder on this forum should contribute to it an ventually i'm sure it will be done well.

Plus once BASIC4PPC V6 comes out then it should be much faster.
Reply With Quote
  #43 (permalink)  
Old 12-02-2007, 03:57 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

My code is written in C# - it is another entirely different (and more complex) language.

Quote:
If PocketSand was able to do it why can't I???
Because they used the right tool for the job and you are not.

Last edited by agraham : 12-02-2007 at 03:59 PM.
Reply With Quote
  #44 (permalink)  
Old 12-02-2007, 04:34 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

I know what C# is...
I do know of a few other PPC languages but have yet to learn them... any advice on which to pick.
Reply With Quote
  #45 (permalink)  
Old 12-02-2007, 05:05 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

You need a truly compiled language (Basic4PPC is not fully compiled. In its' present form it is effectively interpreted , hence the lack of performance and your problems) that can handle low-level graphics.

With .NET (apparently)the way of the future if you are learning a new language it makes sense to use a .NET based language but even then to get fast graphics at the pixel level you will need to learn how to lockdown bitmaps and access them directly - C# is better for this than VB as it has pointer support.

If you want to compile for Pocket PC you must make sure that your chosen development environment and language can do this there are not many around that produce truly compiled codefor a device. The obvious choices are Visual Studio or SharpDevelop in the language of your choice though I believe that the current version of Delphi .NET can target devices.

By the way. Even a fully compiled version of Basic4PPC is unlikely to match the speed of compiled C# or VB.NET if it is to maintain compatibility with its' present code base because supporting weak typing effectively means that everything is a string that is converted to numbers when required. This is inevitably slower than a strongly typed language that knows what type variables are at compile time.
Reply With Quote
  #46 (permalink)  
Old 12-02-2007, 05:09 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

How do you compile using VB or C# to get it to work on a PPC? I know some VB but very little C#
Reply With Quote
  #47 (permalink)  
Old 12-02-2007, 05:19 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

You write and compile in a desktop environment and download the resultant code via ActiveSync(XP) or WindowMobile(Vista) to the device. I don't know about SharpDevelop but VisualStudio supports remote debugging on the device or on a desktop emulator.
Reply With Quote
  #48 (permalink)  
Old 12-02-2007, 06:17 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

I'm not giving up using this... even if it is slow it will be better than nothing. I hope that everyone that has so far helped will continue to do so.
Reply With Quote
  #49 (permalink)  
Old 12-02-2007, 07:28 PM
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default hmmmm .. tricky one

Thanks to AGraham for the explanation and example. I actually think its brilliant that he has got it more than 10 times faster!
Ive learnt something. I didnt realise that SDL didnt do most of the work, but in a way thats a good thing, because that means we are not dependent on a library we know nothing about.

I can do a little C but I dont have the kit - I only have the device (no pc or SDK), nor knowhow about dlls.

Im sure that with the use of a library to do the cpu intensive bits we could do this, and the moddable functions that u want can be done in Basic4ppc.

The library would need two functions
calculatepoints(px(),py(),pdx(),pdy(),pcolor(), rules(),n) 'looks at what the points have hit, how they interact etc
plotpoints(px(),py(),pcolor(),n) 'plots them on the screen in the specified colour

I would invisage the rules array containing some data like
Rules(color1,color2)=(colourchange,dx,dy,...)
Rules(yellow,white)=(red,0,0.5,...)
i.e. a yellow hitting a white pixel will turn the yellow pixel into red and move it at half speed down)

This would be loaded in from the mods file at the start of the program (in Basic)


Just out of interest Agraham - how long did it take u to port the tt demo etc into ur ttt library? If u did could do that again for the calculatepoints physics when Ive written it in Basic then we would be half way there???
Also just curious, saw u changed the Dim x(...) to INT32. Do C procedures have to accept numbers as 32bits?, what would be the default 'type' if the INT32 wasnt specified?

Last edited by colin9876 : 12-02-2007 at 09:06 PM.
Reply With Quote
  #50 (permalink)  
Old 12-02-2007, 08:03 PM
Senior Member
 
Join Date: Oct 2007
Posts: 147
Default

The fun of it isn't just playing about with it... it is modding for it and creating cool things with it. With BS2 you can create pictures or have backdrops and make REAL games like asteroids and such.

I myself made a cyberpet mod in BS1 about 6 months ago that was very good. (made some not so good ones since then)
I even started making a pacman game for Burning Sand too... and that is just with 2 functions.

It is all about the challenge.
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 04:00 AM.


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