Omnimaga
General Discussion => Technology and Development => Web Programming and Design => Topic started by: Eeems on April 30, 2010, 06:33:00 pm
-
http://future_history.freehostia.com/jBasic/jBasic.html
I am working on making a JavaScript library to help people transition from TI-Basic to JavaScript. I have only made a text() command and a dispScrn() command. dispScrn() is used to create the screen area so all other commands work.
I'll work on a tutorial soon, well after I make a few more commands.
-
nice will this be some new language that is parsed as javascript but has a syntax like TI-BASIC? It would be nice to be able to do web apps this way
-
no, its a JavaScript library, so kind of like added commands that are more familiar to TI-Basic users. It will also have it's own look and everything that will remind you of the TI-Screen.
EDIT: added a pixelOn() command, so now you have basic drawing capabilities :D
EDIT2: added a sprite() command for displaying images anywhere and at any size.
-
Tutorial
<html>
<head>
<title>
Page Title
</title>
<script src="jBasic.js"></script>
<script>
function setup(){
//Place code here.
}
</script>
</head>
<body onload="gScreen = document.getElementById('window');setup();">
<div id="window">
</div>
</body>
</html>
Use this basic setup and place any JavaScript in the '//Place code here.' line. Add any content you want between the <body> tagsCommands
dispScrn(w,h,x,y)
creates the window that the content is displayed in.
w = width in pixels
h = height in pixels
x = x location from the left of the screen in pixels
y = y location from the top of the screen in pixels
text(x,y,size,text)
Writes text on the screen.
x = x location from the left of the screen in pixels.
y = y location from the top of the screen in pixels.
size = text size in pixels
text = text content, can include html code for more advanced purposes.
pixelOn(x,y,color,w,h)
creates a block on the screen.
x = x location from the left of the screen in pixels.
y = y location from the top of the screen in pixels.
color = color of the block, can be in hex or named.
w = width in pixels
h = height in pixels
sprite(x,y,w,h,src)
places an image on the screen.
x = x location from the left of the screen in pixels.
y = y location from the top of the screen in pixels.
w = width in pixels
h = height in pixels
src = the source of the image, can be a relative URL or a direct link.
jBasic.js can be found here: http://future_history.freehostia.com/jBasic/jBasic.js
-
Nice, seems like it could do some interesting stuff :)
-
Thanks :) I've put way too much time into figuring out the basic stuff x.x
I'll be adding more later, and I'll probably make an extended set for more functionality as well
-
Cool :D
/me hopes Eeems didn't kill his calc projects including ADE, tho o.o
-
Well ADE kind of already died, but i haven't killed my mario physics engine yet. I'm just focusing on projects that get me marks at school right now.
-
aw sorry to hear :/ why did you kill it btw? I hope you aren't slowly quitting calc stuff x.x
-
I killed it because i needed to get on to more projects so i can get my full credits in computers. I may come back to it later though.
No I'm still into programming calcs, but i dont have the time to do it much right now.
-
Oooh ok phew, I was getting worried since most of your posts in the last month were non calc related. I hope when school is finished that you can do calc stuff again (and get your calc back)
-
Don't worry, I'll code for calcs for a very long time. Its what got me started on programming after all :p
I just added a line() command and a clrGraph() command as well.
line(Ax,Ay,Bx,By,w,color)
Draws a line on the screen.
Ax = the initial x location in pixels
Ay = the initial y location in pixels
Bx = the second x location in pixels
By = the second y location in pixels
w = the width of each line piece on the line
color = the color of the line. Can be hex or color name.
-
nice :D
-
Interesting. For now the code will look much like JavaScript but later when you added most stuff, it will be similar to BASIC, I think.
Don't forget to bring the Math.functions to a normal function.
I will keep updated about this.
-
I wonder, in Javascript, are there any possibility of interaction from the user by pressing keys? Otherwise I guess a point and click game could be awesome too when it has more commands
-
Actually i intend to add getkey() and randInt() and maybe more later. Im currently trying to figure out how to let you clear specific areas of the screen and i just might end up making each thing you draw have id's so you can do things with them without clearing the whole screen each time. I'll try my best to make it like TI-Basic, but there are going to be differences due to the object orietatedness (sp?) of JavaScript.
Hopefully it isnt too hard to pick up though.
I may make a XUL app to help you with it too. Who knows, this could be big :p
-
an editor would be nice, so we dont have to use notepad, save, test, etc.
But yeah it's some nice stuff you have already. The cool thing is that those games can be played in a browser. I could easily embeed some into posts I think.
-
Yeah that was my thought :)
I'd also give you menu based addition of code, so it will give you a color selector and you enter all the other stuff and it would give you a preview of the element, then it would insert the code at the pointer in the text area. I would also give you the option of running the code withought saving. And when i get good enough maybe a visual designer...who knows :p
I have big plans for it right now :p
-
Nice :D
I also wonder if JS execution heavily depends of computer speed... on newer computers, would it be possible to setup timers to make sure code wont run too fast?
-
Well speed can be a problem, but yes you can set up timers :p setTimout("code",milliseconds) can be used to run something once setInterval("code",milliseconds) can be used to have it run every however milliseconds.
I have just made a randomInt() command. Click on the screen area in the demo to see it in action
randomInt(a,b);
Returns a random integer between two numbers.
a = the lower boundary
b = the upper boundary
-
ook nice to hear ^^
About speed my guess is that the timer would just need to be set at lower framerate
Btw I hope you are planning for cross browser compatibility?
-
actually, it measures its time based on the computers clock, so it will only have slowdown with the code running, but that probably shouldn't become a problem except on really slow computers.
actually it should work on all browsers that support JavaScript right now. I may run into problems with allowing people to make circles, but that will only be with browsers that don't support CSS5 (only FF and Webkit browsers support it right now) but I haven't tried to make them yet. Right now I'm focusing on figuring out how I'm going to let people delete specific objects on the screen but in a way that makes it seem like it is TI-Basic...
-
Aaaah I see. Good luck!
-
thanks!
ok, I've added a way to delete objects, currently it will return the pointer to the object that you draw, so all you have to do is:objectPointer = Line(0,0,100,200,10,"black");
pixelOff(objectPointer);
to remember the object and to delete it :) simple as that :)
I've updated the demo with the commands.
New commands:
pixelOff(pointer);
deletes an object on the screen
pointer = a variable pointing to the object. You can save variables to objects by adding aobjectPointerName =
before each object you draw that you want to be able to delete.
screenOff();
Makes the screen and all its contents invisible.
screenOn();
Makes the screen and all it's contents visible.
EDIT: just aded the circle command, so this only works on FF, and webkit browsers, but as soon as CSS5 becomes standard, this will still work :D
circle(x,y,radius,color);
draws a circle on the screen.
x = the x location of the top left corner of the circle in pixels
y = the y location of the top left corner of the circle in pixels
radius = the radius of the circle in pixels (half the width)
color = the color of the circle. Can be hex or colorname.
-
i need to start messing around with this when I get some time. I assume there'll also be the control commands, right? (if/else/endif/while/repeat/etc)
-
well if/else/endif/while are all the built in javascript ones. This is because I have no idea how to make them from scratch x.x
I'm going to add in keycontrol commands soon.
New Commands:
object(type,css,html,x,y);
creates an object on the screen, good for prebuilt characters and such.
type = the tag name. Must be a string. eg: 'div' or 'span'.
css = the css of the object. Note that position is changed to absolute and that top/left are changed to y/x respectively.
html = the innerHTML of the object, must be a string.
x = the x location of the top left corner in pixels
y = the y location of the top left corner in pixels
getkey();
returns the most recent key to be pressed is returned in string form. the command is not completed yet.
-
i am confused by what you mean by character, do you mean char sprites or text?
-
I mean like animated characters and such, things that you built using HTML and you want to just include that.
also, getKey() doesn't work...but I'm working on it.
-
ooh ok I see but what's the link between HTML and animated chars? Do you mean for example displaying an animated gif with <img>?
-
well that and if you have a pre-designed character built with html (using tables and such) then you can use this to add them.
ok, GetKey() and getKeyCode() works now :D they require the addition of<form name="keyform">
<input id="getkey" style="visibility:hidden;" readonly="readonly" type="text" value=""></input>
<input id="getkeycode" style="visibility:hidden;" readonly="readonly" type="text" value=""></input>
</form>
between the <body> tags
try pressing the arrow keys in the demo :P
-
aaaah ok ^^, I'll try later I guess. I hope you write some tutorials that comes with this later ^^
-
Yeah I intend to write some tutorials :) hopefully they will help :)
Now to figure out how to get multiple keypresses.
-
ok, I've been making some progress on jBasic, so far I have just added some support for getting and setting the x and y position of objects, so this will make it easier to move stuff on the screen. It's hard to make an object orientated language work like TI-Basic, so there will be some differences, mainly, it's still object orientated. I'll probably be adding more object manipulators, like something that checks if it is still within the screen, etc.
For the Key's I have text identifier support for the arrow keys, shift, ctrl, alt, pause/break and enter, any more I should make easily accessible? Keep in mind I still have the Key-codes so you can check for all the keys :P Multiple key-presses are still not supported, but I will be adding them possibly soon.
New Template:<html>
<head>
<title>
Title
</title>
<script type="text/javascript" src="jBasic.js"></script>
<script type="text/javascript">
function setup(){
//put code here
}
</script>
</head>
<body onload="gScreen = document.getElementById('window');setup();" >
<div id="window" >
</div>
<form name="keyform">
<input id="getkey" style="visibility:hidden;" readonly="readonly" type="text" value=""></input>
<input id="getkeycode" style="visibility:hidden;" readonly="readonly" type="text" value=""></input>
</form>
</body>
</html>
-
is the language mostly meant for game development? If so, I guess not too many keys might be needed. Just some easy to reach ones with fingers for general 2D games
-
I wonder, in Javascript, are there any possibility of interaction from the user by pressing keys? Otherwise I guess a point and click game could be awesome too when it has more commands
Yes, gladly you can get mouse and keyboard input. I think it is not very cross-browser so it requires some code for each browser.
-
yes, this will be meant for game development, so which key's would you want?
-
Shift, Z, X and C might be good. A lot of PC games use those for platformers, especially Game Maker games. Else, some games use SPACEBAR for jumping.
-
yeah..well I got multiple keypresses working, but now I can't support the way I had it before, so:
http://www.webonweboff.com/tips/js/event_key_codes.aspx keycodes are here, and the new format for getKey() is:
getKey(e)
returns true if the key is pressed and false if it is not
e = the keycode you are checking for
-
seems like I might go with shift and the nearby keys then. Idk if I feel like using pageup/down or the like since both my hands would be on top of each others while playing x.x
Btw I like how getkey looks like axe
-
Thanks :) yeah, its the best way to use it :p
I'll try to add string based testing later for the more used keys, but its not a priorety.
-
ok, I've added a keySim() command for all of those who want to give the users out there without a proper keyboard a way of using it :P
keySim(key);
simulates a key-press. key is down for 100 milliseconds, then the key is "released".
key = the key-code of the key pressed
EDIT: added objLocWidth() objLocHeight() and objCheck(). they are untested though, so I don't know if they work.
objLocHeight(obj);
returns the y location of the bottom of the object
obj = the pointer to the object
objLocWidth(obj);
returns the x location of the right side of the object
obj = the pointer to the object
objCheck(obj);
checks to see if the object is within the window
obj = the pointer to the obj
-
Keys for JavaScript:
Shift, Ctrl, Space,
arrows keys, W,A,S,D,
Q,W,E,R,A,S,D,F,Z,X,C,V
This is my choice having in count usual games and emulators.
-
This is a neat project Eeems! ;D
Good luck with this! :D
-
Thanks!
I'll be making some more progress later on today as i have time to work on it.
-
keep up the good work!
-
thanks!
I just added an easter egg btw for all those who want to see it ;)
-
yeah I saw it was pretty great. People should check out
-
I updated the demo to flow smoother, and I also added a command, collision().
collision(obj,obj2,a);
returns true if obj and obj2 are overlapping.
obj = pointer to the first object.
obj2 = pointer to the second object.
a = area around obj2 to include.
-
nice to see collision detection. However, when you have about 15-20 objects, does it measn you need to check for each objects one by one? I wonder if that would be kinda slow
-
well, it's not working quite yet, but it's almost done.
yes, with this command it will be, but it wont be as slow as on calc, in fact 15-20 shouldn't be that bad of a slowdown.
-
aaah nice ^^
so what kind of games would be possible for this btw? And we can use whatever image we want, right? Could we even use animated gifs?
-
I'm currently working on collision() with builderboy, so it should work very soon. collision() is going to be square collision detection though, so you will have to make your own for circles.
any game would be possible, as long as you have the patience to code it, and the computer has the speed to run it.
yes you can use whatever image you want, as long as the browser supports it.
also collision() is changed to this: collision(obj,obj2,x,y)
x is for the x extension on the check, and y for the y one.
EDIT: fixed it! yay!
-
By any games, does this includes games with highscores/save data?
-
Yes actually, I'll have to make some routines, but making highscores shouldn't be to hard. You just save/recall from a text file, or if you want to store lots of data in one file, an xml file will do the trick. I'll have to do some looking into how to parse xml with javascript due to the fact that i've only done it with php.
Hmm, any other good ideas? I want to be able to stuff as much as I can into this :p
-
Aaah ok. Wouldn't highscores be very easy to hack that way, tho? Again, the user could code some sort of encryption himself so if the user modify a highscore the wrong way, they're deleted
-
Hmm, true...well I'll have to figure a good way to encrypt it and such.
If anybody has a command idea let me know, I'm open to suggestions.
-
lists and strings would be cool, and for the later, a Sub() command. Those would come handy for data storage, text convos and tilemapping.
-
Actually they already exsist in javascript. To make a string you just do: var varname = "string"; they have a few more powerful and different versions of sub as well. How you use them is varname.command(); I'll include them in the tutorial when I make it.
To make an array you can do:1: var myCars=new Array();
myCars[0]="Saab";
myCars[1]="Volvo";
myCars[2]="BMW";
2:
var myCars=new Array("Saab","Volvo","BMW");
3:
var myCars=["Saab","Volvo","BMW"];
and to call from an array you can do this:myCars[#];
and do whatever you want with it. Arrays can hold any data type, even another array! This will make multidimensional arrays :)
-
Aaaah ok I see. It would be nice to have the command integrated in a TI-BASIC-like syntax in your stuff
-
Thars true, although i feel like im reinventing the wheel, for tge arrays, its pretty much TI-Basic syntax, but I guess I'll make a command for sub()
-
Idk I just had a bad experience with arrays in Js before, now that I remembered the syntax, it seemed too confusing for me and I could never get anything to work. :/
Sub() would be enough for me, though, because this is what I used in VB for tilemapping :P
-
Yeah arrays are a little annoying at first. I usually forget to define then before i start assining things to them.
Ill work on sub() because it isnt thay hard to make.
I am working on a small physics demo to show off how easy it is to make things with jBasic.
-
Cool to hear, can't wait for the demo
-
http://tinyurl.com/jBasicPhysics
take a look :P
also, it's not quite done, but there are some physics :P and they are bouncy!
-
Its not working for me :( The url just turns into about:blank, and nothing loads. Im in chrome btw, although it was working earlier when we were testing things.
-
try this: http://future_history.freehostia.com/jBasic/jBasicPhysics.html
-
Ya, same here. Tried it on Firefox, IE, Safari, and Chrome and got nothing. :(
Oh ok, that one worked.
-
same...stupid tinyurl...
-
Ya, but the direct link works. That is pretty cool only glitch I found was that if you hold down right when on the ground the boxes will continue outside the box and will just keep going.
Chrome: Runs to fast.
Firefox/IE: Runs at a speed that seems like the intentional speed.
Safari: Runs in the middle of the two speeds.
Great job though :)
-
yeah it should be fixed now, I've been working one that...
I made it on FF so that's why it works right, and it shouldn't run any faster on chrome/safari, because it's timed...it only runs the movement every 1ms...wait....that must be because they are a little faster at parsing JavaScript...
EDIT: just fixed some problems, check it out.
-
Ah ok. Ya, it seems to still run fast in those to and still doesn't work in IE for what ever reason ???
But ya, the going right issue seems to be directly fixed though it is still possible to get them out while jumping (I think, its harder to recreate). Also, it went through the floor once too though I don't know how that happened. Um, last thing I noticed is that when you hold right you will come to a stop but holding left will still make it do "jumps."
-
wow nice!
Later I'll give this a try on my old computer just to see how it loads :)
-
Yeah i havent quite figured out all the kinks, what errors does IE give?
DJ: let me know how fast it runs, I might decide to try and add more objects if it runs fast :p
-
Well for me it will show the boxes dropping at the beginning but then it isn't recognizing any key presses so you can't move the boxes. also it doesn't seem to be loading the right and bottom of the box (like the edge).
-
Hmm, strange...I'll have to look into it. Does it report any javascript errors? (bottom left corner open it if it does and let me know).
-
I never liked JBasic, too tough to use. Plenty of other langauges.
-
You might want to be careful to when you reply to people projects, though. I think you are thinking of another jBasic project somewhere else Stephan. Also I think what Eeems did is quite good because it allows people to make some JS stuff easier. I gave you a thumbs down for that comment.
-
I'm making some changes to the Physics demo, now it will give you a prompt to start the demo and to set the gravity/friction/bounce friction :) I'll upload it in a little bit.
EDIT: uploaded! I haven't finished the objects amount yet, but it will be fun to play with :P it will randomly place them as well as make them random sizes, and if you add more it will keep the ones you have already :P
I also found out why it doesn't like IE, for some reason it doesn't like what I do for multiple kepresses, I'll do some work and figure out how to fix it.
/me grumbles at IE's lack of ability to follow the standard
-
This is looking great! Nice job Eeems! ;D
-
thanks! ok, big update, you can add objects now! it can handle around 300 fine on my computer (slight slowdown) and I've had 5000 before :P but it was about a frame a second x.x maybe less.
I've added a command randomColor()
randomColor(format);
returns a random color
format = format of the returned number. 'hex' or 'rgb'
EDIT: You can delete now! yay if you ever get 10,000 objects on the screen now (I did that it was fun :P) you can get rid of them all without waiting for a reload! (which is actually faster for that many x.x). I might add a colour scramble button tomorrow....
-
@ eeems wow awsome and what did you need >9000 objects for XD
@ stephan yeah please be sure your not confusing what you are talking about so far i think this is a great project . so i had to vote you down as well
-
lulz nice stuff. However, for most values I typed the boxes would go off the screen and keypresses would quit responding :(
Opera btw. Also I get about 3 fps in that browser with 10000 boxes, 2 fps and sometimes 3 with 100000
-
Lol, i was just testing the slowdown :p
Have you encountered any random bugs? Other then the random moving out of bounds one (no idea why it does that...)
Dj: thanks! Hmm, well what values were you putting in? Also, dont put gravity to 1 or friction to 0, and try to keep gravity below 7. Also, of course it would be that slow x.x thats quite a lot of objects x.x i dont expect to have more then 100 in any game i make with this (I'll first have to make object collisions x.x).
-
No other bugs I think, so far. And lol with 10000 I just wanted to see. I personally will never use more than 200 I think, and even then, it might just be a bit above 100.
As for values, I had 2 and 3 for gravity the last two times, same for friction
-
Ah ok lol
Well, if friction is the same as gravity, no movement will occur, and if friction is more then gravity, then wierd stuff happens x.x I'll have to add some checks later.
-
Well the going out of bounds thing seems to be fixed now :) Well that is until you mess with the friction and make it above the gravity, in which case you sink into the floor lol. Um, other bugs, lets see...if you delete either the gravity or friction value while in the air it will disable the ability to jump, once values are entered, and you will be hovering in the air. Oh, and the only other thing I see is that sometimes when you land you are constantly jittering. Sometimes you're at rest but not always. Great progress though :)
-
Yeah the friction is understandable, and the jittering is wierd, but i've expirienced it.
(btw, you dont jump, its apply gravity elsewhere ;) ) yeah, its because it grabs the value from the text area every 10 checks, so thats why it stops.
-
Oh ok. And wouldn't it be more like taking away gravity from everywhere? It just looked like jumping to me haha. And ok, gotcha.
-
Sorry to sound like a noob, but where can I try this? Thanks! :)
-
just type in http://tinyurl.com/jBasic and it will be there :)
-
http://future_history.freehostia.com/jBasic/jBasicPhysics.html
I think the tinyurl failed for some people
-
that was the other tinyurl, it just lead to a blank page for some reason x.x this one works though.
-
Oooh ok I see
-
I just uploaded a new version. When you turn off/on the screen it will also halt/start the physics engine, so you can "save" what is happening and not have to close the tab if it is using too much ram.
-
Aaaah nice to hear :D
-
Thanks! I can't wait to try it! :)
-
Sorry about that DJ. Yes I was thinking of a totally different project not related to here. I was thinking of Visual J++, which I did not like. I don't know how I got the two confused. Project recognition is NOT my forte. XD I am a complete moron and I feel like an ass for saying that. Sorry Eeems, I did check it out a little bit, it actually is very good. Again, I mixed up jBasic and Visual J++, and thats why I said that. Sorry. :(
-
Its ok stephan, just try and read the first post first before you assume :)
-
I did, I just didn't follow because I mixed the two things up. My bad :D.
-
I think I found a bug:
Some objects fall out of the screen with gravity 4, friction 2 and 100 objects after playing a bit.
I can't repeat but first I tried a massive number of objects, stopped the script in Firefox changed the settings and after playing a bit some objects exit start to exit the screen.
-
Aaah ok I see, yeah it's good to read the first post carefully to make sure to know what's the topic about, espeically when it's large, otherwise there can be misinterpreting x.x
-
the bug would be due to friction, it's a bug I haven't figured out how to solve... I'll probably have to add a small check to each movement part of the code to fix it.
does anybody have some good object collision detection pseudo code? I kind of have no idea where to start x.x
EDIT: oh yeah, I've been working on adding in some built in debug console stuff so far you can set it up, send variable changes to it, send a normal message to it, and send errors to it. keep in mind though, you have to set up your own error traps :P
I also fixed the randomly deleting one more object then necessary bug. I also might be revamping the screen creation so you don't have to have the tag's already in the HTML and it will build it for you :P.
-
I've taken out the ability to edit friction, because it really messes up the collision detection, instead now just use gravity to effect the speed...
also I'm adding in checks to help with gravity change.
-
aaah ok, I'll check later
-
ok, now you can not make your gravity smaller then 2 and the debugger on the bottom is fully functional btw, it will spit out errors if you get them...which you shouldn't I've made a lot of checks.
I'm going to make a check to make sure that the debugger doesn't get too large, because it slows down if it does. how lines should it max out at?
-
Hmm how are you doing the friction? Maybe i can see why weird things are happening
-
Take a look at the source its commented enough.
-
Urm, where can i find that? I can only find the links to the webpage.
-
Look at the page source in your browser (View > Page Source in Firefox).
-
ok, I've updated some of the commands, and I think that my fps counter works...tell me what you think :)
-
it works but not consistently. SOmetimes it will stop working completly, then suddently it will start working again. I had many times where it was 0 fps
-
hmm, strange... I haven't experienced this yet. It sounds like the browser is lagging a little bit, how many objects and what's the gravity set at?
-
1 object and gravity was 3 (tried with 4 too)
-
Hmm, how long did it stop for?
-
about 2 seconds I think
-
That seems like your browser is trying to catch up with JavaScript execution, mine sometimes does this for about half a second.
I just uploaded a new version with object collision detection, which you can turn off or on, but it drastically slows down the framerate with it on.
-
aaah I see, maybe that's why. Weird, though, considering I'm on a quad core computer with 8 GB of RAM :P
-
Yeah, well it doesnt Mean it wont pause, i dont have anything that powerful, but i know my ram and cpu arent fully loaded down at all when it happens
-
Hey DJ, does it happen on other browsers? Maybe its Opera :O
-
I'm not sure, haven't tried yet. That said it would be good to make sure it's cross-browser compatible, else it might not be useable by many people D:
-
Mmm thats true, although it could see if its a computer problem, a browser problem, or a code problem. I dont see any jump on my side though, using Chrome ^^
-
well just tried in Firefox and same problem
-
Interesting, somehow your super computer is having the opposite effect on the applet ;D Silly windows.
-
it might be Windows. I know Opera had issues with WIndows 7 64 bit.
-
Hey, just checked out the new update.
Things I noticed (only skimmed what you guys said so if I repeat and such sorry):
-The little delay thing that, I believe, you guys discussed earlier.
-When landing objects on others they won't land properly. Always at a jitter.
-Some how managed to get two blocks to go though one another.
-When you have multiple objects sometimes they don't all come to rest, at constant jitter.
-Not sure how, but with multiple objects and kinda just moving them around I not only got a couple to go through one another, and stay there (like small box then big box behind it), but they went out of bounds to.
Great progress though, I really like it :)
Oh ya, I'm using Chrome.
-
Yeah ive had all the same problems. Im still unsure how to solve them, but im working on them.
-
Ah ok. Well good luck.
-
ok, I'm unsure how to solve the problems with the object collision...but I have changed up how you make the screen, now it will draw it for you! also I have made a project page for jBasic on my site here is a link (http://future_history.freehostia.com/jBasic).
I will now start writing a tutorial :D hopefully some of you will pick it up and maybe program one or two things with it :)
-
If you want I could give you some diskspace on this webspace so you can host the tutorials and the page, because I can't load your URL atm (due to crappy Freehostia). All I get is a blank page
-
hmm, strange...well the tutorial is here: http://future_history.freehostia.com/jBasic/tutorial.html
and it works for me...and the other link works for me too... strange...
-
It came in for me. Wow, Eeems. your site looks really nice! ;D
-
thanks :D
-
aaah ok that one works fine. But yeah it would be nice to include all of those in one place at one point in case Freehostia shutted down their free service or something
Looks nice btw. I can't guarantee I'll program much for it yet, though, since I'm still learning Axe and have trouble learning multiples languages at once
-
ah ok, well I don't think they'll shut down for a while, and I have a hard copy on my usb stick, and soon I'll put it on my laptop.
thanks! well maybe after you master AXE :P
-
So I just tried out the physics demo again today. Looking good still. Odd things were going on though. First thing is that when I added more blocks it just created the new ones and stopped using the original (like it created the right amount of blocks and such). Then with more blocks I was just able to pass though the bounds really easily.
The website looks really cool by the way :)
-
Well it definitively looks like your new version now breaks in Opera so I will prbly quit testing until compatibility is back :(
-
Hmm, what are the errors? I'll have to get a copy of opera to keep compatability.
-
I just see a blank page :/
No loading bar or something, just an empty blank page
Source is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" />
<!----!>
<!--default--!>
<link rel='stylesheet' type='text/css' href='http://future_history.freehostia.com/iWebkit/themes/default/css/navbar.css' media='screen' />
<script src="../iWebkit/javascript/functions.js" type="text/javascript"></script>
<link rel="apple-touch-startup-image" href="../iWebkit/startup.png"><title>Future History - jBasic -</title>
</head>
<body>
<div id="topbar">
<div id="title">
jBasic
</div>
</div>
<div id="navbar">
<div id="leftnav">
<a href="..">
back
</a>
</div>
<div id="navbar">
<div id="rightbutton">
<a href="../themechoose.php">
themes
</a>
</div>
</div>
</div>
<div id="content">
<ul class="pageitem">
<li class=textbox" style="text-align:center;">
jBasic is a Javascript transitional library for anyone use to TI-Basic. It incorperates many commands that TI-Basic has, as well as more commands making it easier to make games. jBasic specializes in games, but anything is possible with it.
</li>
</ul>
<ul class="pageitem">
<li class="menu">
<a href="tutorial.html">
<img alt="php" src="http://icons3.iconfinder.netdna-cdn.com/data/icons/lingo/Game.png" />
<span class="name">Tutorial</span>
<span class="comment">A jBasic tutorial to get you started with it.</span>
<span class="arrow"></span>
</a>
</li>
<li class="menu">
<a href="jBasic.html">
<img alt="php" src="http://icons3.iconfinder.netdna-cdn.com/data/icons/lingo/Game.png" />
<span class="name">jBasic Demo</span>
<span class="comment">A basic demo of jBasic</span>
<span class="arrow"></span>
</a>
</li>
<li class="menu">
<a href="jBasicPhysics.html">
<img alt="php" src="http://icons3.iconfinder.netdna-cdn.com/data/icons/lingo/Game.png" />
<span class="name">jBasic Physics Demo</span>
<span class="comment">A small physics engine (ish) made with jBasic</span>
<span class="arrow"></span>
</a>
</li>
<li class="menu">
<a href="jBasicPhysics.html">
<img alt="php" src="http://icons3.iconfinder.netdna-cdn.com/data/icons/lingo/Game.png" />
<span class="name">Gunner</span>
<span class="comment">A small point and shoot game using the jBasic Physics Engine.</span>
<span class="arrow"></span>
</a>
</li>
</ul>
</div>
-
Ok, thats not jBasics fault...but that webpages fault...no idea why its doing that....ill have to find a way around it.....
That page does not use jBasic its just my project page with all my links and such. Hmm, opera mini on my ipod is havibg the same problem...
-
aaah ok I hope you can find a solution x.x
-
Yeah...i thi k it will be as simple as adding a none mobile version of the page....but that will require a lot of css coding D:
-
ouch x.x
Good luck! I hate CSS. TOok me so long to get that forum skin to work
-
thanks...hopefully it's easy to fix. I think what is throwing off opera is setting the screen...
<meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" />
so I'll have to find a way to make it work with that. I'll probably have to make a whole new style-sheet but who knows...I might even just make a new template for a none-mobile site and use that...
-
mhmm that might be that. I never seen that code before. Maybe it's not really a W3C compliant command?
-
Well it should be from what I know, it's defining the view screen...
-
ok, I've updated the tutorial a bit, and made a really nice menu :P have fun playing around with that ;P
I'll have some more updates next week as I am at a Youth Conference all weekend.
-
Cool ^^
And can't wait to see you back! Have fun there!
-
Thanks :D it took me about half an hour to perfect it.
I am :D same with Beautiful Ending :)
-
Oh btw I'm glad you got round borders to work in Opera in your tutorial (on Unsyntaxsoft site they don't D:)
-
Yeah i looked at the code and was wondering why i only had mozilla css there and so then i added in webkit, iwebkit and standard css3 border-radius values, so it should work on all major browsers but IE
-
Ok I have released a game in jBasic, just a basic point and click shoot the blocks in 30 seconds and hope for the best :P try it out here:
http://future_history.freehostia.com/jBasic/gunner.html
-
Oooh nice :D
I scored 37541
-
lol, really? that doesn't seem right...it should only give you 30 seconds...it might be because you are on a slower computer though...
-
I was kidding :P
I got 38 :P
And lol, a Intel i7 2.80 GHz quad core computer with 8 GB of RAM slow? No way :P
-
lol :P well the best I got is 56 right now. lol wow that is nice :P
-
I got 60. Woo :P
What is with the blue box that surrounds the cross hair part way through?
-
Your game causes issues for resolutions that can't fit the whole screen at once. If you scroll down, it won't accept any clicks on the boxes as hits. =(
-
Yeah I've noticed that, you can fix it by zooming out though.
@meishe91: what blue box?
-
Do you think the game can be made so it's stretched based on your resolution?
-
Oh, well then something happens when a filled blue box will surround the cross hair.
Here is a picture. I just secluded it to that for size reasons.
-
What browser and system are you on?
I have not encountered this...does the shooting look normal, like a gunshot effect? What steps did you take to re-create this?
-
I'm on XP using Chrome. Ya, the shooting looks fine. Everything just has the blue tint when that is over it. All I did was play again. I'm not sure what I do when it happens.
-
Hmm, strange...I can't replicate that in FF...so i don't know whats causing it...:/
-
Hmmm, ok. Well I'll test it in other browsers in a little bit and tell you what happens.
-
ok thanks :) hopefully I can find the issue.
-
Ok, so here is what I got:
IE: Cross hair works but the game it self does not. Like no blocks fall down or anything and doesn't time out after 30 seconds. The "bang" works though.
Safari: Same result as here on Chrome. The blue box shows up. Only thing wrong is that it doesn't pop the score up, you have to look in the debugging box for it.
FireFox: Seemed to work perfectly fine.
-
So i guess it works fine in both Firefox and Opera then?
-
It should.