![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Open Source Projects The place to discuss Basic4ppc open source applications. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Yes basically I said to AG that I wanted to be able to adjust the library. I had been trying to cram the c# code into the midway C file produced by v6, but he said it would be much better to download SharpDevelopment or something and do it properly.
Have u got Visual Sudio 2005 - its free I believe. Im just going to google this SharpDevelopment. We need that so I can put the rules code into the library Edit- an u do me a favour and find the C code for MicroBurningSand, its only 10lines of C and its posted on the BS website somewhere. Then can u post it here - I want to look at it? Last edited by colin9876 : 12-20-2007 at 05:37 PM. |
|
|||
|
Here is microsand.
EDIT: oops wrong one. Code:
#include <SDL/SDL.h>
int main(int,char**){SDL_Surface*s=SDL_SetVideoMode(640,480,8,0);SDL_Event e;
int r,u,x,y,a=-1,b,h=s->h,z=s->pitch,q[]={0,r=91,u=140,200};Uint8*o,*p=(Uint8*)
s->pixels+z;SDL_WM_SetCaption("MicroSand 2 by Max Nagl",0);while(!SDL_Flip(s))
{for(x=0;++x<s->w;p[x-z]=p[(h-2)*z+x]=1);for(o=p+(h-2)*z;--o>p;){if(*o-200)if
((*o>(b=*(o+z)))&&((r*=5)%((*o-b)/5+2)>5)){*(o+z)=*o;*o=b-1?b:0;}else if((b=*o)
>*(o+(y=1))&&((r*=7)%97)>1||b>*(o+(y=a))){*o=*(o+y);*(o+y)=b-1?b:0;}}while(
SDL_PollEvent(&e)){switch(e.type){case 2:u=q[e.key.keysym.sym%4];break;case 12:
return 0;case 4:case 5:SDL_MouseMotionEvent m=e.motion;for(y=m.y-9;y++<m.y+9&&
m.state;)for(x=m.x-9;x++<m.x+9;)if((x>a)*(x<s->w)*(y>a)*(y<h))p[y*z+x]=u;}}}}
Last edited by neilnapier : 12-20-2007 at 05:43 PM. |
|
|||
|
Thanks - thing is we need C for some of this because basic uses strings to store variables. So numbers like px,py,pcolor etc all get changed to strings and back again and thats delay we cant afford.
We need fast number crunching for the main engine loop Ive just downloaded SharpDevelop. Its free. U get it too? Lets have a pay around with it and chat in a day or so. |
|
|||
|
Don't you think it would help if I knew any C coding whatsoever?
If you give me the coding I will download it and use it as long as it has a decent understandable UI. I have only ever used the basic languages and I am sure they are very different by looking at comparisons on the net. Sometimes the line and circle pen changes after clicking on liquids to solids. EDIT: how did you get it if it is for desktop comuters only? |
|
|||
|
Has it downloaded yet... lol?
Also just to give you some information about things that, once MiniBS is complete, can still be worked on. There is bias in BS which causes things to expand at different speeds. BS updates from top to bottom and therefore never makes a pefecrt expanding circle. Also a glitch that has been noticed on many sand games that are in early stages is that when something like Code:
Interaction Fish Water Water Fish 1000 Last edited by neilnapier : 12-21-2007 at 05:38 PM. |
|
|||
|
no, it didnt download properly but I had more luck with C# express 2008 but that doesnt allow dlls
Also I downloaded VisualBasic2008, its actually quite fast but Microsoft have managed to make that more complicated than VB6, u have to define a graphics class to just draw a line! Basic4ppc is definately more user firendly. I watched some youtube videos yesterday, carbombs, burning Homer, electricity generator ... I can see now all the things that can be done by mods. Anyway need to sort out how to rewrite this lib, I realise now there are some more speed increases possible but I need to be able to adjust the C# Last edited by colin9876 : 12-22-2007 at 12:57 PM. |
|
|||
|
Merry Xmas everyone!!! Tomorrow I should be getting a BASIC4PPC licence.
How would it be possible to load and save sandboxes? That thing that I used before to save it worked but the images weren't loadable on a PPC. We could load the image into the fore or background easily but getting liquids and gases to move might be difficult. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pocket Chess Database | JamesC | Share Your Creations | 3 | 07-27-2008 04:07 AM |
| Pocket Burning Sand | neilnapier | Questions & Help Needed | 2 | 11-05-2007 07:53 PM |
| print class for pocket pc | tanrikuluahmet | Basic4ppc Wishlist | 1 | 10-01-2007 09:10 AM |
| dzSpy - Spy and Task Manager App - Open Source | dzt | Share Your Creations | 3 | 07-15-2007 05:21 AM |
| Pocket Outlook Object Modell | sloopa | Basic4ppc Wishlist | 12 | 06-02-2007 08:05 AM |