Board Thread:General Discussion/@comment-50.137.170.159-20140123123715

I am a neophyte of PetitComputer by Gamebridge.

Wait, does this forum only double space?

Anyway, I don't know what the deal is with SmileBoom Co.Ltd (2011-2012) is,

but I do know that SMILEBASIC has 1048576 free bytes.

and it's READY

ver2.2, hmm...

What I know is that it can be helpful in certain scenarios that you would want to employ to add CLEAR:ACLS:BGMSTOP to the beginning of some of your programs. Although I have been told that it is important to do on most I wonder in what ways/scenarios you might benefit from not including it. And I know that the size of the screen is 256x192.

I've learned that

V=0

@LOOP

IF BUTTON==16 THEN PRINT V WAIT 10

IF BUTTON==32 THEN V=V+1 WAIT 10

GOTO @LOOP

doesn't work in the way that I thought it would. I was given sparse details about what was happening in this scenario, and what I concluded was that the computer starts the cycle of the program, sets V to 0, reads @LOOP without too much concern, if the A (or B? I may have these mixed up) is pressed then it prints V, then it WAITS 10 seconds where nothing happens [like it has an internal clock or something] then if the B (A if I'm wrong) button is pressed it adds 1 to the value of V [and stores it somewhere, why? I wonder] then WAITS again, then it goes to (GOTO) @LOOP - which it found, how? I don't know.

While it's my goal to find some methods to potentially test or understand, if I'm not simply told the answer, the reasons regarding how the computer works, I happened to achieve the desired result of the program with the education of another poster (of the GameFAQs forums) which lead to :

ACLS

V=0

@LOOP

IF BUTTON(2)==16 THEN PRINT V

IF BUTTON(2)==32 THEN V=V+1

VSYNC 1

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">GOTO @LOOP

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">then, on my own, I turned the program into

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">V=0

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">PRINT V

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">@MAIN

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">IF BUTTON(2)==16 THEN CLS:V=V+1:PRINT V

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">VSYNC 1

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">GOTO @MAIN

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">which consolidates the elements of the first code, but I was still left with questions, such as: is it possible to create a variable of 1 space on the screen which can be modified and updated in a live situation rather than using the CLS command to clear  all ofthe spaces on the screen?

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">I also included

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">IF V=<100 THEN V=100:GOTO @ENDLOOP

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">@ENDLOOP

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">PRINT "CONGRATULATION! 100 - WOW! SUCH NUMBER!"

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">to the code, to provide me with a real sense of satisfaction - but this turned out to be somewhat incomplete because I didn't actually turn the end into a loop because it would just continuosly print "CONGRATULATION! 100 - WOW! SUCH NUMBER!" over and over again, and I didn't want it to just say, OK, at the end, so... now that I think of it, perhaps something like

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">@ENDBANNER: ?"CONGRATULATION! 100 - WOW! SUCH NUMBER!"

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">@ENDLOOP

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">WAIT 100

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">GOTO @ENDLOOP

would be a good solution... Just now I thought of that...

I've become aware of MML, and have, at the citation of a friendly person on the GameFAQs forums downloaded a MIDI to MML converter and MML Writer [Program].

There were a couple of other pieces of program that I took a look at, such as :

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">CLS <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">FOR C=0 TO 255 <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">LOCATE C%16, FLOOR(C/16) <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">?CHR$ ( C ) <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">NEXT

(from the Petit Computer Technic - which I have a website to a PDF of - which can be purchased from Amazon for $9.99. Also, I attempted to create a program that would flash a signal on a screen while it accepts inputs from the players button presses, but failed and left to no avail. This lead me onto an interesting tangent where I created this program:

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">@LOOP <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">FOR S=1 TO 15 <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">COLOR S:?S:VSYNC 7 <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">NEXT

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">FOR V=1 TO 15 <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">LOCATE 8%V, 8%V:?V <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">VSYNC 15 <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">NEXT

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">GOTO @LOOP

which turned out to be pretty interesting in its own regard. Next, at the instruction of a previous helper, I was taught a little bit about a program that looks like this :

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">N=0 <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">FOR I=0 TO 15 <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">LOCATE N,0:PRINT I <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">N=N+LEN(STR$(I)) <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">NEXT

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">which I freestyled a little bit, and turned it into FOR V=0 TO 8 (I like to use V in place of I because of how similar I's look to L's - you know what I mean) and N=n+1+LEN(STR$(V)) to include spaces [with the +1]. I'm impressed even with myself.

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">I also came up with some ideas that I would like to aspire to be able to create, teach and modify later on as my skills and abilities in coding and programming improved.

One of them was to use the Hero and Witch sprites to create a Partner AI system where you could switch between each character using the L and R buttons, and each character operated on a Tempo that allowed commands to go through on the beat and simultaneously save the action that occured, whether it be Idle, Attack, turn Left, go Left, etc. would be in a queue that your partner character would choose from on the beat of their Tempo.

This idea also promted me to want to seek a proficiency with some of the tools that the developers implemented into the game relating to backgrounds and what not, and not excluding the instruments and musical channels; this idea further lead me to explore the option of creating my own operating systems and programs for content generation.

Another one of the ideas that I was initially curious in creating was a Text Based adventure game, most likely being characterized by having a very limited scope of possible options, that would employ the use of a Text Formatter / Word Processor as well as choices on the bottom screen using the touch pad device for selecting options.

Mostly though, I have just been dabbling around in certain commands such as FOR NEXT and have been making attempts at understanding commands like DIM, DATA READ, GOSUB RETURN, and so on, as well as attempting to fathom complex equations, such as those used within a very simple and engaging game such as convee, or any other program.

Such equations may look like... just throwing out non-sense examples, 1.1 * (Y/9) % 7, see, I don't even know if that is a valid equation, I only have some vague idea of what it means without having a solid grasp on what's going on to make that produce an answer, but it happens to be 0.

So while I don't have a solid concept of how to create programs yet... or at least I don't think that I do... I do have some ideas relating to how a program should function based on some of the things that I know.

Here are the rules that I came up with regarding the text formatter..:

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">1 ) The formatter is designed for text that is coded into the editor, not for text that the user is actively inputting (although I'm sure that would be practical and interesting to learn as well). The point of it is to be able to write what you want the game to say in the code editor, and have this function of the code organize it neatly on screen, so it doesn't end up looking like this:

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">I HAD A WONDERFUL DAY, I SAW A P <span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">ONY! HOW WAS YOUR DAY?

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">2 ) First it designates a portion of the screen to use, from 0,0 to 24,24 and anywhere in between. Second, anywhere a word would overlap from one line to another*, it skips to the next line. Third of all, if the text would produce a space starting on the next line, it instead does not.


 * I imagine that the most efficient code would be to count every space that it finds and then the first and last letter after it and before the next space.

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">3 ) It seems like this could produce a lot of errors, and I don't know how the computer would deal with that. That may be an issue that needs to be addressed. If the formatter was set from 0,1 to 0,24, for example, it wouldn't be able to produce any words longer than one letter long.

<span style="color:rgb(11,12,14);font-family:'HelveticaNeue',HelveticaNeue,Arial,sans-serif;line-height:18px;">While learning how to code is my greatest goal here, I also aspire to create game design documents for others to use to draw inspiration from, as well as create lessons and assignments that will aid other newbies like myself in learning how the find the limitations and stretch the limitations of their mind, and design programs and content resources [including sprites and original music] that others will be able to make use of.

As I learn smileBASIC & coding through PetitComputer I am simultaneously learning how to read, write, play, and understand music so one of the greatest challenges that I can conceive of right now is that I should be able to invent a more efficient system of MML that stores variables as Arpeggios & Keys, Scales & Accidentals (which is what MML is mostly consists of), perhaps chords [where I imagine a song using repeated chords could be more efficiently written by storing the value of certain notes within a short name for a chord], etc.<ac_metadata title="Introduction!"> </ac_metadata>