Forums

Topic: Petit Computer

Posts 461 to 480 of 9,620

Peidorrento

@GrabSomeEyes haha definitely not a good idea!

Thanks for supporting my "projects".

"A vingança nunca é plena, mata a alma e a envenena" - Seu Madruga
Presidente, CEO, Programador e único empregado da Peidosoft.
https://www.facebook.com/nonamefornowsoft

SavageBlackWolf

After seeing some of the stuff you all have done, i went ahead and bought this, too. You people are a talented bunch!

3DS Friend Code: 2595-1642-3519 Wiiu GramolkinOwl

Shadowflash

Is it possible to make your own music and put it in a game, or do you have to use the songs they give you?

"Can you do that? Can you explode twice?!" -Spike

3DS FC: 1676-3897-8278

3DS Friend Code: 1676-3897-8278 | Twitter:

ramstrong

Yes, you can! It accepts expanded MML commands for chip tunes. You can also make music/sound effects using BEEP commands.

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

81Rambler

I have a question as to weither I'm over-complicating what I would think to be a simple task,, displaying a static-located cash oriented numerial.
Specifically, I want the individual digits to display in the same location regardless of amount shown. On top of that to make the display a bit cleaner I want to nix any unneeded preceeding '0's in the display.

Currently I have a working version of this code here


ACLS:CLEAR:DIM CASH(4)
PRINT "PLAYER:"
`These are for the amount of money the player has. To avoid overflows I have the Ones, Thousands and Millions in their own array cells which will be reconciled after each addition/subtraction
CASH (2)=12
CASH (1)=314
CASH (0)=6
PRINT "$";
FOR K=2 TO 0 STEP -1
IF CASH(K)==0 THEN PRINT " ";:GOTO @SKIPCASH
IF CASH(K+1)!=0 THEN CD$="000" ELSE CD$=" "
PRINT RIGHT$ (CD$+STR$(CASH(K)),3);
IF K!=0 THEN PRINT ",";
@SKIPCASH
NEXT


So is there a way I can do this without having to pull a seperate varitable (CD) to mesh in with the display amount? Or at least make this code a bit less bulky?

Edit; While I'm at it, I have another question as to weither it would be possible within program to take a screen shot and either export it to a compatable image file or to copy it to an exsisting graphic layer underneith? (Short version I'm attempting to make some Game & Watch style games, but asking for several dozen IF statements to be performed a about 60 frames per second for the sake of changing a COLOR numeric is a bit much to ask the system it would seem and probably very wasteful time and resource wise. It would instead probably be simplier to make an image of the board being un-highlighted and to then just display the ascii characters on top...

Either that or I just get around to using sprites already

Edited on by 81Rambler

81Rambler

ramstrong

I can't find a way to make it less bulky, but here's my money display routine. As for your other question: Keep it simple for now. Just use sprites already.

@STEP1
CLS:CLEAR:DIM K[6]

?"DISPLAY MONEY ROUTINES"
INPUT "TRILLION,BILLION,MILLION,THOUSAND,DOLLAR,CENT";K[0],K[1],K[2],K[3],K[4],K[5]

P=0:M$="$":?M$;
FOR I=0 TO 5
IF I<5 THEN LC=3 ELSE LC=2
IF P==0 AND K[I]==0 THEN ?" ";:NEXT:GOTO @STEP2
IF P==0 THEN L$=" " ELSE L$="0"
K$=STR$(K[I]):L$=L$*(LC-LEN(K$))
?L$;K$;
IF I<4 THEN ?","; ELSE IF I==4 THEN ?".";
P=P+K[I]
NEXT

@STEP2
VSYNC 1:IF !BTRIG() GOTO @STEP2
GOTO @STEP1

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Eel

81Rambler wrote:

Edit; While I'm at it, I have another question as to weither it would be possible within program to take a screen shot and either export it to a compatable image file or to copy it to an exsisting graphic layer underneith? (Short version I'm attempting to make some Game & Watch style games, but asking for several dozen IF statements to be performed a about 60 frames per second for the sake of changing a COLOR numeric is a bit much to ask the system it would seem and probably very wasteful time and resource wise. It would instead probably be simplier to make an image of the board being un-highlighted and to then just display the ascii characters on top...

Either that or I just get around to using sprites already

If you want to make Game and Watch games. I just thought this up:
You could use GRP background with certain higlighted areas (think: Game and Watch character's "shadows") and use GPAINT to make them black or a color similar to the background depending on what should be on screen.

I may need to try it myself now.

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Tingle

So, I've been looking through this forum for days now, and I decided I'd join, because I have a LOT of questions, the first one being this:
How do I use the Dim command? I don't quite understand it.
Also, I would like to know how to use GOSUB, because I heard it's one of the most important commands for Petit Computer.

Edited on by Tingle

Tingle

Eel

Dim is used to set arrays.

Example:

DIM MYARRAY(X)
Creates a numeric array named MYARRAY with space for X numeric values.

These values can be assignated and used by writing MYARRAY(I), where I is any numer from 0 to X-1. Example:

DIM MYARRAY(3)
MYARRAY(0)=5
MYARRAY(1)=2
MYARRAY(2)=MYARRAY(0)+MYARRAY(1)
PRINT MYARRAY(2)

(That will print 7)

You can also create alphanumeric arrays to hold strings. Also, arrays in petit computer can have up to 2 dimensions.
(example)
DIM AR$(X,Y)
Creates an alphanumeric array with space for X*Y string lines.

GOSUB is pretty important, it allows you to go somewhere else on the code without terminating what you're doing at that moment. Example

You have:

PRINT "This goes first"
GOSUB @DOSOMETHING
PRINT "This will be printed 3rd"
GOTO @DOOTHERTHING
PRINT "This won't be printed"

@DOSOMETHING
PRINT "This will be printed 2nd"
RETURN

@DOOTHERTHING
PRINT "This will be printed last"
END

See the difference?
When you use GOSUB you need to end the code of the subroutine with RETURN. When RETURN is reached, the program will go back to where it was before using GOSUB.
When you use GOTO, the program will continue on with whatever is on the new routine, never turning back.

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Tingle

Thank you!
I now understand how to use GOSUB (I used it in a looping word thingy I made for fun), though I'm still a bit dim on how to use DIM (pardon the pun).
I think I can figure it out by testing and what not, kind of like how I made a Dungeon Adventure mod with extra stuff.

Tingle

GrabSomeEyes

I'm thinking about making a small database of songs that play on command if possible.
I think it'd be a fairly large project (for me) though and would take some time.
I've already experimented with MML coding which wasn't all that hard, but I know I'll run into problems along the way.
Basically, my only problems would be
1) I have no idea how to make an input start up an output like a MML code but that'd probably be fairly simple to learn.
2) Actually doing it.
There's a lot of songs I'd like to try (mostly video game OSTs), and I haven't really seen much from the community about music files.
Too ambitious? Honestly, I think so, but I'd like to give it a shot.
So I've set it in stone. My work for the next day until I get bored and lose my interest will be this.
I think I've already got an idea on how I could get it to work, just I know it won't.

Eos OS: http://conlogxl.forumotion.com/t12-eos-os-v10
3DS FC: 3695-0514-5044

swordx

Hey I'm Swordx and I'm new to Nintendolife. I just came here because you guys seem to have a very active Petit Computer community, and I've really been wanting to find one of those.

What I'm making: I'm making a game called Dungeon Adventure: The Cave of Monsters. The game will have 16 maps and 3 bosses of five. The 16th map is a secret map. So far, I've finished 11 maps. Once I fix a few bugs, I'll release the current version of the game. IDK if you guys know of it, but I already posted a very outdated version of the game on one of the Wikis and on 3DS Buzz. If you guys want to play the older version of the game, it can be found below.

http://s1253.photobucket.com/albums/hh581/sworddx/DUNGEON%20A...

swordx

Eel

Hi there and welcome to our petit comunity.

I love the default dungeon game, I wanted to expand it myself but never got to it, so it's nice to have someone doing it already!
I could reach level 3 and I can say that the changes you made are pretty good, though the game is trying to load files that it can't find.

I really like the addition of stats and levels. Though I think it would be nice to change the color of the dungeon every now and then.
Also, I never found any new herbs or potions, only axes and swords

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Sprite

How is petit blocks coming

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens.
Friend Code: 1075-1228-4183

swordx

Morphtroid wrote:

Hi there and welcome to our petit comunity.

I love the default dungeon game, I wanted to expand it myself but never got to it, so it's nice to have someone doing it already!
I could reach level 3 and I can say that the changes you made are pretty good, though the game is trying to load files that it can't find.

I really like the addition of stats and levels. Though I think it would be nice to change the color of the dungeon every now and then.
Also, I never found any new herbs or potions, only axes and swords

Those files are in my game, I'm just not going to put them on the web until I get version 1.0 out. Version 0.2 should be out in 1-3 weeks. On the version you're using (0.1), there are specific chests for each weapon, an then there's also item chests which randomly spits out a herb or a potion. I'd complete that version of the game if I were you, as it will kinda give you a feel for the next version. Just be prepared for a huge difficulty spike in the next version.

Some things that will be in the next version:

1. Doors/keys
2. Shops/money
3. 10 and 1/2 maps/2 bosses
4. Mana/blue potions
5. Tonics/fire eyes
6. Badges which enchant your weapon AND give you a new spell.

That's all I'll tell you for now. does evil laugh

swordx

KAHN

wow, i was gone for a long time wasnt I? now i get to read over everyone's (long) discussions over the weekend! goody!

KAHN

3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12

Tingle

I just learned there's a way to create your own music using MML, but I can't figure out how. Would somebody please explain how one creates their own songs, and then how to save them?

Tingle

Tingle

swordx wrote:

Hey I'm Swordx and I'm new to Nintendolife. I just came here because you guys seem to have a very active Petit Computer community, and I've really been wanting to find one of those.

What I'm making: I'm making a game called Dungeon Adventure: The Cave of Monsters. The game will have 16 maps and 3 bosses of five. The 16th map is a secret map. So far, I've finished 11 maps. Once I fix a few bugs, I'll release the current version of the game. IDK if you guys know of it, but I already posted a very outdated version of the game on one of the Wikis and on 3DS Buzz. If you guys want to play the older version of the game, it can be found below.

http://s1253.photobucket.com/albums/hh581/sworddx/DUNGEON%20A...

Double-posting n00b.

So YOU'RE the person who made it! Man, I thought the original one was good, but yours is really cool! I liked the story (the original lacked one), and the boss fight against Helmetdread was cool. I can't wait to see the updated version!
Good luck!

Tingle

Sherman

I'm gonna read all the pages to know all I can about the app, but could you pleaste tell me: Is it Object Oriented? I know it's basic and it's almost impossible, but I saw some images about some sprite palletes, so I thought it could. I'm good at Actionscript 3.0 and I'd love to make some oldschool games.

If you ever wanna speak about videogames...

3DS Friend Code: 4081-6394-7559 | Nintendo Network ID: Sherman.exe

koopatroopaX

@Tingle
I think that a person said earlier that you can use that mario paint program to save music and then utilize in a program. ask some one else about finding tht saved music i don't have a clue where.

koopatroopaX

Please login or sign up to reply to this topic