On-line samples update

Forums: 

I have refreshed 6 sample files with files tested in SB 0.12.0, check out the On-line menu option.

MGA/B+

Hi Johnno,

It is so nice to hear back so quickly from another member. I had just posted last night!

I have to say it blew my mind yesterday to see Sinecube manufactured so dang fast in 0.12.0 but Crop Circle #3 really knocked my socks off in speed to finish the graphic. ( I was reluctant to let go my security blanket of the FTLK version, still am, but the transition is coming along. The FTLK versions were slower and graphic screens that CLS allot were very blinky.)

Actually Crop Circle #3 now might be slowed down so you can watch the drawing take place because that is fun too!
Just copy the code to file and insert a DELAY n (n in millisecs 1000=1 sec) at the appropriate place in the loop(s).

Johnno, I am really interested in code if you can get any IMAGE stuff going.

Right now I am working on Klotski Puzzle. At first I thought it broken, but turns out:
1) the 2 empty spaces are white, not the black (1) (I did not know how the game was played until I checked it out on Internet)
2) the (1) Black piece is due to a wrong color assignment a(4,3) should = 8 not 11 according to logic of numbering system and what colors were assigned values.

I also have an idea to convert the simple and easy code menu in Graphics Sampler to GUI buttons or at least GUI mouse clicking your choice instead of the old DOS style menu system.

May I inquire about your immediate projects?

I have no immediate projects at the moment. If I see a program I like, I try to convert it to my current code of choice, just to see if I can. If I can, then try to improve on it... not always successful.

I like SB because its core commands are similar to what I am used to. At the moment, the image issue, seems to be a bit of a problem. But that issue is being looked at.

Imagination is my biggest hurdle. Probably why I try to convert other programs so much. I made a simple hangman game, for the grand kids, using sdlbasic. It runs ok and is playable but not completed enough to publish. I want to try to convert it to run on SB, but graphics and sound files, are my reasons for not doing so.

I am not a programmer. But enjoy programming. I have not done any "formal" courses to learn. I try to pick it up as I go.

I had also started a "Sprite Editor". Jumped right into it with considering whether or not I could finish it... well, it's STILL not finished...

Enjoy trying to make simple games, I don't always succeed, by enjoy trying... I try to make most of my graphics using Gimp or I will use public domain images.

But, as to immediate projects, nothing major at the moment. Just tinkering with a Donkey Kong type game as well as a Space Invader type. Both are nowhere ready to run. Until the 'image' problem is fixed, I won't me able to do much with SB, unless I can think of something that will use a combination of text and primitive graphics.... Oh. Maybe a text adventure... I used to play those years ago... even before our computers used graphics... hmm..

J

ps: (Am I allowed to say, "sdlbasic", on this site - spamming was not intended... sorry...)

About IMAGE handling. Have a look at http://smallbasic.sourceforge.net/?q=node/1246 (10. Update IMAGE handling.)

There is now support for overlapping images and semi-transparency (zindex/opacity). Atm this only works with PNG, but I might switch to another image library.

Is PNG the hangup?

Also your Hangman Game at sdlBasic is 5 star! I would like to see a version in SB that is not in German as SB has one already. A version I am thinking of would be less dependent on assets and allow the user to create their own word files. I made one years ago (Quick BASIC or VB for DOS) for my niece to help her learn her spelling. Actually it was modified from code I had found and improved upon from somewhere else. I might have mentioned this before, it was a proud moment for me.

I hope someone stumbles on something here and has a similar moment.

Yep. Had a look at Chris's comments. Will go over them with a fine toothed comb and see if I can make sense of it all. Takes a while for all this stuff to sink in.

In regards to Hangman. You are too kind. As it was made a long time ago, and what I knew of sdlbasic was limited and my coding skills are not very good, I feel it does not deserve that many stars. I may agree to either one or two 'light bulbs', but not stars.

I had thought of converting Hangman to SB. I use an mp3 music file to play in the background. Based on the SB guidebook, sound appears to be generated by issuing tone-type commands or by playing a "string" of music commands. I could try and convert an mp3 to a single channel midi and then translate that into a sequence of frequencies or strings... but it will take time or may not be possible for me to do...

The mouse is accessed by a 'pen' command. Will have to check that one out.

All the graphics in Hangman are png. Hopefully that will be okay.

I have a little time between coffee breaks... Now let's warm up the keyboard...

J

Glitter Hopalong has been added, a fractal that reminds me (abstractly) of the famous painting "The Scream".

The Graphics Sampler modified to allow mouse click or key press (without enter) menu selection with brighter colors.
Crop Circle #3 slowed down to watch drawing and dragon scales extended to fill the whole screen.

More Graphic sampler modifications: today one of the exercises at BP.org was to draw a rotating 7 point star, my reply was on the lines of new menu item #8. This one is stopped by any key press to return to main menu.

Rotating Polygrams (stars with more and more points/rays) added today and started categorizing the items. Let me know if you think this makes things clear or cluttered?

Also graphics seem to be dominating the items, if anyone has code for other things you'd like to share, let me know or post it in discussions.

Removed categories in ON-Line sample titles and edited some Titles.

Search is now called Google Search and you might get more than one search term in before it quits.

Coming soon to your favorite Code Library: Code Demos, soon as I figure out how to start the page.

later same day:
Well I never did figure out how to add a new category. But do not shed tears, Chris had 1 item in Development category that was called Properties and Ha! I thought it was about Real Estate Development (it did come right after the Business category so...). Nope, Chris had already started a Code Demos section just called it something else.

So, in there I copied the fabulous IMAGE demo posted in the General Discussion so that it may be accessed more quickly from a file in the Code Library. Also posted as a comment was the followup reply about the parameter ZINDEX used by IMAGE. I also posted a cool Mouse Chaser made of various rotating stars into Code Library Graphics 2015 and On-line samples, sort of the apex of the past weeks exercises with drawing stars. Rotating Star Mouse Chaser was inspired by a contest started by tsh73 at the Just Basic Forum in 2008.

OK another graphic, might take some guts to watch. Thanks to Richard Russel for digging this one up from BBC and presenting at Basicprogramming.org, original author of Guts, Jan Vibe.

Two older programs have been replaced by newer updated versions:
Bezier Bounce, now Bezier's Autograph Book
Springs (Mouse Springs) replaced with Spotlight which is similar type effect but far less blinky and covers whole screen.

Lots of new ones from Code Library and Forum. SVirgee is one fancy fractal that I somehow missed until Chris pointed to it recently.
A few games:
Classic Sliding Block Puzzle
Rock Paper Scissors Lizard Spock (for Big Bang Theory fans)
Square Elimination Game

Some graphics:
Fireworks
Boing
Poly and Poly Again (recursive)

Complete overhaul of on-lines samples is underway so that all code works not only on Windows laptop but also on Android NOOK.

Games will take some time to repair, in meantime plenty of eye candy is working now, including all new Patterns.bas.

2 Games now updated now updated for On-line samples and seem to be working OK with NOOK:
1. Classic Sliding Blocks puzzle with choice of 3x3 to 10x10 puzzles
2. Mine Sweeper 4SB with red marker toggle

Code Library > System > RGB match and chart.bas finally seems to work with both mouse and keyboard in both landscape and portrait views in Android NOOK through On-line samples. Now you may get just the right RGB numbers for that tricky shade of brown or orange.

There is also a simple Screen Info.bas app to provide information about pixel and character dimensions for devices.

THIS is really cool. Do you know how many times I have gone online to check RGB tables? I use those tables a LOT. This little program will save me a LOT of time searching.

Thank you SO much... :)

J

Hi Johnno,

Could you figure out how to change color of sample panel at top with both keys and with mouse?

PS I hope you update us at Naalaa about sdlBasic since BP.org is down. To me, sdlBasic and SmallBASIC are like brothers with different focus.

PPS Oh BTW, I was testing out the new version of SmallBASIC 0.12.2 when I updated this code last night. I am pleased to report no major bug jumped out and bit me while reworking the code.

Angel feather replaces GetFile in On-line Samples. A copy and modification for SmallBASIC of PeterMaria's code found at Aurel's hobby coding forum, basicprograming.free-forum.net

In this one, you can zoom in and out on nice fractal.

Harixxx: excellent 3d rotating cube with message, and fire demo

B+=MGA: Trees reflection (Lakeshore demo modification), Alien roses (replaces Crop circles) with Stephen Shaw's SdlBasic site code, Mastermind 3rd revision since first posting with Johnno and Gray Scale test with shian.

EDIT: Oops, Alien Roses now modified to blushing snowflakes. Can you make a snowflake blush?

Added gravity, air resistance, "Newtonian bounce" and smoke debris, plus updated variable names and type (from lessons learned in Bomb making).

im sure theres an answer to this:

whats to stop someone from making a sample that say, uses RUN to (or kill with files()) to delete all the stuff in your home/documents folder?

i mean you could add that to the sbasic gui itself, but i mean is this stuff curated, or does it just let you run any code posted on the forums without showing you the code first?

i wont be surprised if the answer is reassuring, id just like to ask.

The On-line samples are taken from Code Library that you may examine here at this site.

I don't know if you will find this reassuring but I am curating the library (except if Chris changes something).

oh yeah thats fine-- its a matter of whether its curated or whether any drive-by forum poster can send un-audited instructions to the user :)

i mean, i prefer to look at code before it runs (that would be a great command line switch for sbasicg) but as long as there are a very limited number of trusted people in charge of selecting programs for this feature, thats probably good enough.

if i were more concerned (i still have to click on a name after all) i could run sbasicg as a separate user with its own home. (i dont run it as root.)

your answer is the one i was hoping for, thanks.