Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GG Basic (iOS Universal)

Author
Message
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 22nd Jul 2012 04:43 Edited at: 1st Oct 2012 20:18
GG BASIC (iPad Only)

This is my last work using AGK.
This is a complicated app with hard mixing AppGameKit with the OBJ C.

GG Basic wanna give the possibility to learn programming and of course create and share code builded directly on the device.
Of course users need to launch the GG Basic before run any code (like on commodore 64), as Apple rules request.

The file system is on a dedicated server.
A programmer can choose to save a file in RW or Read Only and the color will be red or green on the list.
Each user can open the online list.


Features so far :
- Color parser
- Cursors Buttons
- Error control with specific command error, line, percentage bar on preprocessing.
- Help reference button
- Cursor position
- Time and date
- News scroller (realtime)
- Radio streaming while coding with the title (and url to chose in settings)
- Settings (checkboxes to switch on / off some features like the radio)
- Anticrash with autosave (reload after crash the last code)
- Speech system

Command added :
Cls - Print - For - Next - TextColor - TextFont - BgColor - TextFont - Speech - Point - Box - Circle - Line - Input
If - Then - Render - Timer - Date - Sprite - SpriteCom - Gosub - Return - StreamMusic
StreamMovie - StreamVol - StreamTitle - SubStr - WaitTap
Button - DelButton

Suggested by AGK/TGC users:
Fast Command by list view suggested by BraindeaD

Some screenshot to see how it appear:
This is the editor...


Another great feature is the SPEECH system. You can use the SPEECH command to get the device talk.... for example:
Speech ("Hello TGC Team")

Suggestion are really apreciated!

Long life to Steve!
BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 22nd Jul 2012 08:04
Hi GEKKO,
Very interesting app!
Have you thought, in order to make more easily writing code for the user, assign one touch key commands instead to write all the letters of a command? something like ZXSpectrum 48K (rubber keys) basic editor?
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 22nd Jul 2012 15:38
Yes this can be a good idea, maybe i can show a UIListView where to chose a command to insert in the code.

Long life to Steve!
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 22nd Jul 2012 15:50
Any chance of an android version?
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 22nd Jul 2012 16:01
Well, i don't think. I'm sorry.
Cause i use Obj C mixed with AppGameKit when i code.
It would be too hard to translate it on Android.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 22nd Jul 2012 17:38
This is the test on graphics command using a for and expression evaluator...



and this is the result on screen



Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 23rd Jul 2012 06:11
Well i'm testing some Point functions but i discovered that doing a sprite for each point take the iPad veeeeery slow to draw.

I tested also the backbuffer and than render but no luck. when i reach 1000 sprites it go down.
There is a way to speed up?

In other tests i used a pre-drawn box, circle and line with various sizes, but is clear it's not like using pixels.

Hmmmm, if i think, i can test capturing the image on the screen and delete the last sprites, and paste again the screen capture.... hmmmm.....
If someone has a good idea to manage much sprites or other way, please suggest.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 23rd Jul 2012 15:42
No luck with capture GetImage()....
I tested to capture and delete the sprites used to draw points but it go slow anyway.
Is this an AppGameKit performance limit?

If i map a portion of Sprites ID as the screen size, is there a possibility to use
CreateSprite(map_point, image)
as faster than the
int im = CreateSprite(image)
?

Maybe we need some graphics command?
I use the Bresenham's line algorithm, can be this to slow the calculation?

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 24th Jul 2012 16:14
I tested all i could test and is too slow with AppGameKit, so i started to code in OBJ C a CGContext in a CALayer to bring over the AppGameKit view and use the UIGraphic functions directly.
So i will not use sprites for the graphic any more...

I will post some screenshot when ready.
This solution makes me think why AppGameKit don't have the property to create new layers?
Why AppGameKit don't have the functions to draw 2D point, line box, circle?


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Jul 2012 04:13 Edited at: 25th Jul 2012 04:28
Ok after some big tests i solved the problem.
Now using CGContext without subclassing the view....

While on AppGameKit takes 3 min on CGContext directly takes 3 sec.

If someone need help to draw on Obj C without subclassing can ask me whenever he want.
Another lesson learned on Obj c.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 25th Jul 2012 16:46 Edited at: 25th Jul 2012 16:50
This is the last test for GFX with the CGContext....
The code


The Result


The next step is to do text in the same way and bring it to front.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 28th Jul 2012 03:08 Edited at: 28th Jul 2012 03:12
Another new command is done : INPUT
Now working on the IF
As on the old basic and the C64 i added the input command to retrieve some info from the user.
I used a trick to let it appear as in the old basic way.

I also changed the way it check the main loop mixing it with the AppGameKit main loop.
So now can be added breakpoints and break and end in the middle of a code.

Some screenshoots :

The code


Running it


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 6th Aug 2012 13:01
Time to return to the GG Basic after i completed the ICNS Icon Creator.
I losed 7 days to port some of my games to mac and mix together the multiplayer for iOS and Mac.

New command done : IF - THEN

Long life to Steve!
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 6th Aug 2012 15:36
Nice work.
How come its your last work with agk?

Nice grafix effects and its sad that agk are so slow with its own.

Android 2.3 Gingerbread , ZTE Skate , 480x800 , 800 mhz cpu , Samsung Galaxy Y , 240x320 , 832 mhz cpu
Android 4.0 Sandwich , Dmtech 3g 9738B , 1024x768 , 9.7 inches , cortex A8 1.2 cpu , 1 gb ram.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 8th Aug 2012 03:23 Edited at: 8th Aug 2012 03:44
Well i interrupted it for 4 days to do the ICNS Icon Creator, cause i tough it could be very useful for developers like us. As i'm using it personally and i'm happy, but yes using AppGameKit to do some sprite to create graphics like lines and circles is very slow.
Anyway the CGContext method work fine.

I'm doing the last optimization and i will publish it cause i wasn't happy of the old graphic i used.

I changed also the font to code, to be more readable and added the stop button to work to stop a bad coding loop, in case of stuck.

For the if condition i used the Evaluation in Javascript.

This work is much important for me, i say the truth, i started coding a window os for iOS, but after 1 week i read that apple reject all windows like apps.
So i switched to a coding language.

This experience give me the possibility to create other 4/5 apps in some days:
GG Notepad (thx to experience on editor i done)
GG Speech Translator (thx to the experience on speech i done )
GG Paint (Thx to experience on graphics)
GG Radio Player (Thx to the streaming experience i done)
GG Vocal Memo with Speech
and many others.


Long life to Steve!
3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 8th Aug 2012 06:49 Edited at: 8th Aug 2012 09:36
Xgekkox nice app looks very promissong. I think that this format might be good for a compact app exporter. I need too look at your app and give pointers. I think I need to learn objective c. I think you should load a text based game with it and have people try it out.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 8th Aug 2012 16:08 Edited at: 8th Aug 2012 16:20
Well i agree with you as i always look in the past to decide which game i can port to the 2012.
Usually i look at C64 as i'm 35 years old.Y

Just some days ago i looked at Labyrinth (the game with David Bowie) that i played when i was kid, and i idealized something.

As Apple have hard rules to follow, one of this say thet we can't launch an app from another app or doing an app that have other app inside and an app can't be similar to the dashboard...
So i tought that doing an app similar to a C64 basic, where we can load files to edit or to run, can be a good solution.

Sure in the beginning will be a little limited, as for example the IF THEN can be done only in 1 line, but if the app will be used i will add END IF and other blocks here and there.

For the OBJ C you are right. When i started i hated it cause for me was strange, but now i must admit that is very easy and full of good library. AppGameKit used with a good obj c can complete all.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 8th Sep 2012 10:12 Edited at: 8th Sep 2012 10:23
I'm working again on the basic...
I worked on the refresh system for the Graphic avoiding flickering and it work very well.
Today i will work on the suggestion from the user BraindeaD to insert a fast command list with reference.

I will release it in some days.

I have added some commands :
- Timer
- Render

Here some screenshots of the demo program i will include in the list of files hosted on the server.

Editor:




Run :


Long life to Steve!
IronGiant
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 27th Feb 2012
Location: the great state of madness
Posted: 9th Sep 2012 18:35
pretty cool, nothin like basic on the go to make a programmer happy, well that and a new tron movie. keep up the good work!

It's Bird! , It's Plane!, No its a rocket powered Squirrel holding some acorns and a smile!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 12th Sep 2012 11:38
New command added :
- date with the formatter ---> date("HH")
You can use all the combinations used in the Obj C like HH:mm:ss and dd:MM:YY

Now i'm working on the system functions like STRLEN and some others.

If you wanna suggest some system functions names it will be appreciated.
I'm very happy cause it is coming out very well...

The bad part is when i will do the copy/paste

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 18th Sep 2012 12:45 Edited at: 18th Sep 2012 12:47
After some days i couldn't work for a surgery, i just improved the variables and the PRINT function.
The evaluation of the var contents are better now. We can do some things directly in the command...
You can see it at line 17 and 18
I also improved the float VS int comma position.
I'm using the C64 painted background just to not have a black and white screen
Here you can see also the date function in action.



And this is the result...


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 20th Sep 2012 17:57
Another update from GG world...
I've finally completed the code to insert fast functions as BraindeaD suggested.

Some screenshots :
Clicking on F.LIST we can see a table view with all commands...


And after clicking 2 times on the preferred command...


We can see it add at the cursor position what we tapped 2 times.
Next step will be the copy/paste.


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 28th Sep 2012 04:14 Edited at: 28th Sep 2012 04:16
Well it's basic time, so i added 2 new commands...
- Sprite (to create a new sprite)
- SpriteCom (to execute some commands on a sprite)

Those commands doesn't use the AppGameKit sprite to create the sprite, cause i don't believe i can transfer an image loaded from web into a AppGameKit Image.
So i'm using UIImageViews in a C++ array.

Some screenshots :
In the editor...

While running...


The next command i will add will be GOSUB so we could use some loops to render the scene
If you have some suggestion i will code it.

Long life to Steve!
BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 28th Sep 2012 07:33 Edited at: 28th Sep 2012 07:35
Great work, Gekko!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 28th Sep 2012 10:45
This really is a cool project, nice work xGEKKOx


this.mess = abs(sin(times#))
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 28th Sep 2012 14:26
Thx boys, ok i done the Gosub command.
The render refresh of normal UIView is a little slow, maybe i can save the loaded image from URL in the resource and tell the AppGameKit to load.... hmmmm
I will test this thing, maybe could be useful to other users.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 28th Sep 2012 20:20
Added 2 new commands:
- StreamMusic
- StreamMovie
- StreamVol

Now GGBasic can stream a song or a movie from a url.


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 29th Sep 2012 02:12 Edited at: 29th Sep 2012 02:14
And now is Movie and Video are completed and work great.

Some screenshots:
In the editor...


And running...


GG Basic users will be able to develop personal players and radios.
I will also include a GetStreamMetadata command to retrieve info.

Long life to Steve!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 29th Sep 2012 13:01
This is nice. Are you parsing everything yourself?
(Like line after line?)

Also, how do you handle user-variable declarations? Do you hold a list of variables with their type, name and value?

Cheers.

Follow me on twitter! @MotionStruct
Motion Struct blog
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 29th Sep 2012 13:48 Edited at: 29th Sep 2012 13:50
Hi kamac, yes...

I have used a fast pre-process to do a % bar and syntax error detection and commands attribute number... if the result of this is ok it start the real processing of the commands.

In c++ i love vectors (they remember me php associative array) so i used to do some vectors.
For the variable declaration i use another parser only for variables, they are all text but are transformed to what they really are with an evaluation if they are something different from simple text.
So yes i hold the list.
And each object in a View has a tag (i think like in AGK) with a number from N to N + 10000 or N + 20000 etc...
So when a user wanna control it just receive the "name_id" string to point to that tag.

For the blocks, i also used vectors. The vector store the block start, the end, and iterate for N times and in the end release to the N + 1 row.

I done the parser from scratch, and for the editor i use javascript.

The only thing i don't like for the moment is the speed of setFrame for the Sprite UIView.
I tried to add to the AppGameKit EAGLView but with no success, i have to study more this view.

Now i'm going to do just some other commands like Button, WaitTap to pause the program instead using the old a$ = inkeys$ (do you remember? ) and i will start to debug it.
I will do 3/4 samples games and programs on it just to help users to learn.

I will include a Calculator, MediaPlayer and something else.
But i need some suggestions, cause i'm alone on this project and sometimes i lose my brain to go fast ahahah

Kamac (or other users) do you know a way to rec a video on the ipad? So the next time i can add videos instead images.. Thx.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 30th Sep 2012 05:26 Edited at: 30th Sep 2012 05:32
As i discovered some bugs on the parser, i worked all night long on it.
Now the parser is ready to immediately parse the vars just added as you can see on line 17.
Also at line 17 the : is well supported so we can write more commands on the same line and i added new commands:

- SubStr
- WaitTap

I also added an auto sort alphabetically for the fast function list.

Some screenshots:

In the editor...

and running...


Long life to Steve!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 30th Sep 2012 06:36
xGEKKOx, as cool as this is for programmers who like to play, what use is this for anyone else?

And I do mean cool. It is quite neat. I remember way back when doing command line Basic programming with MS DOS.

I wish I had time to spend on this kind of fun.

Cheers,
Ancient Lady
AGK Community Tester
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 30th Sep 2012 15:30 Edited at: 30th Sep 2012 15:32
Thx Lady, if you want to suggest something it will be really appreciated...
As i'm running like a crazy to release it, sometimes i lose my ideas even if i write on a paper.
When it will be available on the shop i will release all the promo codes i can on AppGameKit Showcase!!


I hope it will be good also for educational (i will enable the educational discount too).
I will also try to port it on the MAC as i've done it for all my apps.

Have you ever tried to paint or add subviews to the AppGameKit EAGLView?
I'm trying it to get the 60fps refresh of AppGameKit, but with no success for the moment.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 1st Oct 2012 20:13 Edited at: 1st Oct 2012 20:18
Ok today is the day of the buttons.
Sorry AppGameKit but i done better than you ahahah, joking!!!

The buttons have a gradient layer and can have a color and a text color. All done in obj c programmatically. No image used.
Whenyou create a button you specify at which line it must jump if pressed

New commands:
- Button
- DelButton

Some screenshots :
In the editor...


While running...


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 3rd Oct 2012 19:17
Worked a lot on a very simple array.
I need to release the App so i worked on the parser to catch simple arrays.
It will work like in the php: $arr[0] = something
it also parse : $arr[$key]

Some screenshots:
In the editor...


While running...


Now i think is time to debug and release it.
I will work on updates to add new commands and functions.

Long life to Steve!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 4th Oct 2012 16:39 Edited at: 4th Oct 2012 16:40
Can your GG Basic parse such expression(s)?:



Or it parses only left operand + right operand?


And is this thing interpreted or bytecoded and then interpreted from bytecode?

Follow me on twitter! @MotionStruct
Motion Struct blog
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 4th Oct 2012 19:29
Yes it can parse it because it is splitted by the , (comma) so it takes the expression completely.
I done a good work on the evaluation.

Now i'm working on some example to put on the server to share with the users.
While Apple will review it i will post some examples and i will add for the new updates the copy / paste function.

Please suggest me some command and functions so it can become a good way to code on iPad.
We can do a list of commands in the first post.
I will gift the app to the forum to test it.

Ahahh i'm sure i will receive much bug noticing

Long life to Steve!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 4th Oct 2012 21:23 Edited at: 4th Oct 2012 21:24
Does that mean you are having some kind of expression parser which turns this:

(a+b) * c

into this (?):

add value,a,b
mul value,c

And again, is it interpreted or compiled into bytecode file and then interpreted.


And what is AppGameKit used in this project for?

Follow me on twitter! @MotionStruct
Motion Struct blog
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 5th Oct 2012 02:45 Edited at: 5th Oct 2012 02:47
Yes exactly, my evaluator is completely apart from the parser.
Each command where there is a "Text" or a Number it first look if there are operations to do, after it evaluate or if not it print until the parsing not find another $var (variable).

Well i never tested for a really complicated formula, but with more time and if a lot of peoples will buy it, i will dedicate 50% of my time to this app instead the others.

Now i try a formula and i post a screenshot, you make me curious to test it ahuhua....
Let's see...

Edit : Today i added the BREAK command on the if to let users stop a for.
Example :


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 5th Oct 2012 03:09
Ok i hope it is correct...
In the Editor :


While running:


I added also the break example.

Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 7th Oct 2012 14:25
Ok the App is uploaded to Apple.
I removed some bugs and i hope all will be fine!!!!


Long life to Steve!
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 18th Oct 2012 05:34
Hi friends, as i promised i leave here some promo codes to you for GG Basic (now available).

At this point i wanna ask the moderator if he can move the thread in the Showcase. I think is right.

Please suggest me something if you want.
Enjoy!


JPAJX64FN37F
WHYLFE9RR37X
MATARRJLJ7JN
LJA4FJYH7M3P
N96F97XA4HJT
R9PKN74L69AR
APMRNMYKKXEH
9JR7PAHNR37T
4LH7ARHRNLFT
KJNHN6W6AWFF

Long life to Steve!

Login to post a reply

Server time is: 2024-11-23 23:22:56
Your offset time is: 2024-11-23 23:22:56