December 01, 2022, 12:29:22 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Recent posts

Pages1 2 3 ... 10
1
User Offerings / Re: Craft Basic Interpreter
Last post by basicgames - November 27, 2022, 12:34:14 PM
Oh, no! I would have loved to see that.
2
User Offerings / Re: Craft Basic Interpreter
Last post by aurelCB - November 27, 2022, 12:11:46 AM
well..interesting
i made AurelBasic in Emergence Basic ..but i lost code
3
User Offerings / Computer History Trivia Educat...
Last post by basicgames - November 26, 2022, 04:16:43 PM
This game is simple, but packed with information.
It's one of my favorite projects.
Please try it and let me know what you think.

If you find any of the information incorrect, please let me know so that I may fix it!

http://basicgames.xyz/index.php?page=article&id=11

EBasic code is included.
4
User Offerings / Re: Craft Basic Interpreter
Last post by basicgames - November 26, 2022, 03:41:47 PM
Hello, thank you for the invite!

I am currently not doing any updates to Craft Basic as it needs to be reprogrammed to use functions for the evaluation and not just SUBS. This will allow expressions within expressions within expressions etc. Like expressions in arrays and functions in the same like as expressions. It's what the parser needs. (among other things.)

I am not going to do this until I am done working on my other programming language called Pebble. It's a compiler and is taking a lot of my time. It's being done in Qbasic for DOS, but I will probably do a compiler in EBasic. I also want to do a BASIC compiler! It's a lot for me. There's so many possibilities when learning about programming languages.
5
User Offerings / Re: Craft Basic Interpreter
Last post by aurelCB - November 24, 2022, 12:00:04 AM
Hello
You should made account on :
http://basic4all.epizy.com/index.php

and present your interpreter

all best
Aurel
6
User Offerings / Craft Basic Interpreter
Last post by basicgames - November 20, 2022, 01:25:33 AM
Craft Basic is an interpreter written in Emergence Basic.


It is experimental and educational. It loads and runs code directly from the IDE. It has expression evaluation including floating point and negatives. Some example programs are included. There's some array support.

Craft Basic may be used as a scripting language by associating .bas files with. It may also be used to distribute pseudo stand alone apps by renaming a copy the Craft Basic exe to the bas source file name. In this mode, the interpreter skips the IDE and runs the program as if it were stand alone.

I appreciate all feedback.

More information and download at:
http://basicgames.xyz/index.php?page=article&id=16

Please email ptrworkmails@gmail.com if you have trouble downloading and I will send a copy to your email inbox.


Some examples that are included with the download...

resize 0,0,330,276
center

print "Solve For Quadratic Roots"

alert "Enter A"
input a

alert "Enter B"
input b

alert "Enter C"
input c

let d=(b^2)-(4*(a*c))
sqrt d
let e=((_1*b)+d)/(2*a)
let f=((_1*b)-d)/(2*a)

print "Roots:"
print e
print f

title "hilo"

rnd r
let r=(r*100)+1
int r

print "hilo game"
print "guess the nusmber between 1 and 100"

label loop

 let t=t+1

 input g

 if g=r then

 print "tries:"
 print t
 alert "you guessed it"
 end

 endif

 if g<r then

 alert "too low"

 endif

 if g>r then

 alert "too high"

 endif

if g<>r then loop

rem Alien Blaster
rem an example game for Craft Basic
rem by Gemino Smothers 2022

title "Alien Blaster"

let rightkey=0
let leftkey=0
let spacekey=0
let esckey=0

let npcs=10
let npc=0

dim npcx[npcs]
dim npcy[npcs]

rnd r
let r=(r*280)+1
int r
let playerx=r
let playery=215
let score=0

let bullet=0
let bulletx=0
let bullety=0

label createnpcs

 rnd r
 let r=(r*300)+1
 int r
 let npcx[npc]=r

 rnd r
 let r=(r*50)+1
 int r
 let npcy[npc]=r

 let npc=npc+1

if npc<npcs then createnpcs

resize 0,0,330,296
center

bgcolor 0,0,255
cls

alert "Alien Blast"
alert "Don't lest the aliens pass you!"
alert " Press arrows to move, space to shoot, and esc to quit."

label loop

 button rightkey,39
 button leftkey,37
 button spacekey,32
 button esckey,27

 fgcolor 0,0,255
 fill on

 if rightkey=1 then

 rect playerx,playery,20,20
 let playerx=playerx+4

 if playerx>300 then

 let playerx=280

 endif

 endif

 if leftkey=1 then

 rect playerx,playery,20,20
 let playerx=playerx-4

 if playerx<1 then

 let playerx=20

 endif

 endif

 if (spacekey=1)&(bullet=0) then

 playwav examples\pew.wav
 let bullet=1
 let bulletx=playerx+9
 let bullety=playery

 endif

 fill off
 drawbmp examples\player.bmp,playerx,playery

 if bullet=1 then

 fgcolor 0,0,255

 let x=bulletx
 let y=bullety+5
 line bulletx,bullety,x,y

 fgcolor 255,0,0

 let bullety=bullety-5

 if bullety<1 then

 let bullet=0

 endif

 if bullety>1 then

 let x=bulletx
 let y=bullety+5
 line bulletx,bullety,x,y

 endif

 endif

 let npc=0

 label movenpcs

 if bullet=1 then

 if (bulletx>=npcx[npc])&(bulletx<=(npcx[npc]+20))&(bullety<(npcy[npc]+20)) then

 fgcolor 0,0,255
 fill on

 let a=bulletx
 let b=bullety+5
 line bulletx,bullety,a,b

 let x=npcx[npc]
 let y=npcy[npc]
 rect x,y,20,20
 fill off

 playwav examples\boom.wav
 let score=score+1
 let bullet=0

 rnd r
 let r=(r*300)+1
 int r
 let npcx[npc]=r
 let npcy[npc]=1

 endif

 endif

 rnd r
 let r=r*2
 int r

 if r=0 then

 fgcolor 0,0,255

 let x=npcx[npc]
 let y=npcy[npc]
 rect x,y,20,20

 let npcy[npc]=npcy[npc]+1
 let y=npcy[npc]
 drawbmp examples\npc.bmp,x,y

 if y>playery then

 alert "Game over!"
 end

 endif

 endif

 let npc=npc+1

 if npc<npcs then movenpcs

 fgcolor 255,255,0
 cursor 1,1
 print "Score: "
 cursor 4,1
 print score

 wait

if esckey=0 then loop

end
7
General Questions / Re: CHR$(0) Problem
Last post by ids065 - November 13, 2022, 08:25:45 AM
Hi, thanks for the replies yes I agree null is 0 and I have tried to make a variable equal to it but again it can't be put into any form of string because it is the end of string marker.

I thought I had tried using the IWSendByte and it worked fine for all values other than 0 but I will try it again.
8
General Questions / Re: CHR$(0) Problem
Last post by ckoehn - November 13, 2022, 07:10:15 AM
The command to use is IWSendByte( port, char).

The help example uses:

int port = 5
char oc = 63  'could be 0 instead of 63

if IWSendByte(port,char)
  print "success"
end if

This should work.  I use to use this library all the time and I too needed to send chr$(0).

Later,
Clint
9
General Questions / Re: CHR$(0) Problem
Last post by Bruce Peaslee - November 12, 2022, 03:01:42 PM
My ASCII chart shows zero (0) for NULL.
10
General Questions / Re: CHR$(0) Problem
Last post by Brian - November 12, 2022, 08:38:17 AM
That's funny, because my current program has a few references to NULL:

hIcon=NULL
IF pDB<>NULL THEN dbDisconnect(pDB)
IF dbName[0]=NULL

IDE Version: 3.05
Compiler Version: 2.095

Brian
Pages1 2 3 ... 10