the DATA keyword declares a list of fixed values that can be accessed sequentially (this is important!) using READ. Kind of like a simple array but with fixed values and no random access
10 DATA 8, 16, 32, 64
20 READ a
30 READ b
a now holds the value 8 and b holds 16
Nintendo 64 Forever forum
Nintendo Games NES 241 | SNES 324 | N64 267 | NGC 150 | WII 85 | WIIU 9 | IQUE 5 | GB 161 | GBC 57 | GBA 106 | NDS 57 | 3DS 21
Nintendo Network ID: Mk2_NL 3DS Friend code
@Mk_ll
alright, that's how data works! great, but how can i use it in a program? i could have sworn i've seen l've seen words and letters in this DATA command.
KAHN
3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12
It is also useful for making levels/maps and storing stuff like messages in an organized way.
DATA, READ and RESTORE are amazing if you know how to use them.
@DROOM 'a subroutine to draw a 6*6 room using DATA
RESTORE LABEL$ 'set the DATA pointer to that label
FOR Y=0 to 5 'start Y for
READ L$ 'read a line of DATA
FOR X=0 to 5 'start X for
IF MID$(L$,X,1)=="0" THEN BGPUT 0,X,Y,45,8,0,0 'draw background tile 45 if the Xth data of the Yth DATA line is 0
IF MID$(L$,X,1)=="1" THEN BGPUT 0,X,Y,54,8,0,0 'draw background tile 54 if the Xth data of the Yth DATA line is 1
IF MID$(L$,X,1)=="2" THEN BGPUT 0,X,Y,65,8,0,0 'draw background tile 65 if the Xth data of the Yth DATA line is 2
NEXT X:NEXT Y 'Move on
RETURN 'Return
That way you can write yourself multiple DATA structures with number variations to draw different rooms using the same code.
Or something like that.
"I'll take a potato chip... AND EAT IT!"
Light Yagami, Death Note
"Ah, the Breakfast Club soundtrack! I can't wait 'til I'm old enough to feel ways about stuff!"
Phillip J. Fry, Futurama
"I'll take a potato chip... AND EAT IT!"
Light Yagami, Death Note
"Ah, the Breakfast Club soundtrack! I can't wait 'til I'm old enough to feel ways about stuff!"
Phillip J. Fry, Futurama
@MrMario02 Yes, look for "Help" in the bottom left when PetitComputer is open, it should tell you most basic operations.
Edit: Here's a picture of it, look in the bottom left: http://media.nintendo.com/nintendo/bin/y3EsDsjZYpDs58JLiXj1Yb...
And this is how it looks on the main menu: http://www.petitcomputer.com/img/common/DSi.png"
However, it just tells you the commands and what they do, you have to figure out how to make them work together basically yourself, although there's tons of tutorials for BASIC, or even this specific version of BASIC (SmileBASIC) all across the web and even right here.
"I'll take a potato chip... AND EAT IT!"
Light Yagami, Death Note
"Ah, the Breakfast Club soundtrack! I can't wait 'til I'm old enough to feel ways about stuff!"
Phillip J. Fry, Futurama
I am almost releasing the beta engine of my adventure for you guys have a look, don't know if you would like to scan 5 (maybe more) QR codes for something which is still unfinished.
Anywho, I was wondering if there will be a wiiU version of this. Also, if there is a way to inform them (Petit Computer crew) our (assuming that there are more people here who would like to see a wiiU version) interest on a WiiU version.
"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
@Peidorrento Definitely will check out. I like looking at unfinished things sometimes more than finished things, just to see how it changes, and to be able to put some input into it.
Also, http://www.petitcomputer.com/contact/
Eos OS: http://conlogxl.forumotion.com/t12-eos-os-v10
3DS FC: 3695-0514-5044
@GrabSomeEyes so here it is, for you and for anyone who likes an unfinished job.
This is my new "project", which is suffering from time problems (strike is over, so I'm back to college):
Graphics for the main character:
http://img401.imageshack.us/img401/16/adv1x.jpg
Graphics for the tiles:
http://img823.imageshack.us/img823/8761/adv2j.jpg
Graphics for enemies and itens:
http://img99.imageshack.us/img99/5703/adv3r.jpg
and finally, the engine itself:
http://img405.imageshack.us/img405/1458/eng10.jpg
Some notes: It is unfinished, way unfinished (if that expression exists). There is only one enemy for now and it can't heart you (but the collision detection is already ok, so is the movement); there are 3.3 screens ready (the first one, the upper one, the right one and the upper right one(wich is about 30% ready )), but still lacks enemies position and "doors" in some cases; the itens are not implemented yet, but there are some graphics for them already.
I hope you find, at least, enjoyable to look at. My plans for the final thing includes different ways to get out of the cave, some simple puzzle solving and itens (which will be kinda like "keys" for the paths).
Feel free to edit, try to understand, use it, spread it, etc... Please, give me any feedback you may find useful (or even the useless one). Also, if you have any questions or suggestions for codding, let me know. Hope you all enjoy!
"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
@Peidorrento, I just tried it out briefly, and good job so far. My first instinct was to try the different buttons. Starting with A. :I That didn't work out very well. Anyway, I then decided to go right since in the video you showed before I don't recall you going right for long, so I went up and then went left into the uppermost part of the left side of the map. I found myself walking through the ground. (I still couldn't get past that bat...). So I went back down and everything was normal. I decided to try it again, and I went back and went down before I reached the left side of the screen. I found myself floating above the ground on the lower right place. Actually quite funny.
So aside from those two obvious bugs, I'd say the things I'd like to see added/fixed most would be a way to get past the bat without getting hurt (attacking, sneaking by, etc.), and maybe edit the sprite's arm when walking, it seems a bit weird like it's sleeve or something goes away or something, I'll look into it myself, but it isn't really a big deal, just continue on with the gameplay before the little things.
Edit: I tried looking at the character sprite, and just an extra line of blue where the top pixels of the skin are in the running animation makes it look just a little bit cleaner to me.
@GrabSomeEyes Thanks for trying out. These bugs occurs basically because the map isn't finished (which sort of means the engine is not finished). I have ended the upper right screen now and there is no such bug. Another source for this glitch is the engine, which was not pointing for the right map data under the circumstances you described (already fixed by now).
About "getting past the bat without getting hurt", I'm pretty sure there is a way to do that . I'll double check though, thanks for the heads up! Also, I'll check this animation issue. I'm a terrible artist so that was the best I could achieve
"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
@Peidorrento if the bat is slowed a tiny tiny bit it'd probably make an easier opening to get through. I just think I never made it past it without getting hurt. Let's just at least try not to recreate this: http://www.avatarist.com/avatars/Games/Sprites/Castlevania/Me...
(They're actually easy to kind of just walk by when you've got their pattern down but still).
Eos OS: http://conlogxl.forumotion.com/t12-eos-os-v10
3DS FC: 3695-0514-5044
@GrabSomeEyes I insist that it is fairly easy to pass by without getting hurt. I've just tried it I feel like, if I make it even easier, the game will be only about getting itens and solving puzzles, without the "dodging enemies" part.
"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
@Peidorrento I'll try again...
Edit: You're right. I don't know what I was doing before...
Also, music might be a nice addition, even if a placeholder.
I just tried going too the furthest right ladder and down, didn't encounter any problems in that room except when I went to the right it kind of didn't end it, but the game just sort of. I don't know. It turned to a black screen and some text. "Out of DATA (177, READ)
OK"
@GrabSomeEyes Yes, it is "Out of Data" because there is no data for the room you tried to enter
About the music, it is my plan to put some sound effects and music whenever all the graphical/interaction part is finished. There will also be a "presentation" like "Peidosoft® Apresenta", a title screen, instructions, etc... As I said, this is an early early early early alpha
"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
@Peidorrento I figured.
And whatever works for you is what you should do, so wait until you're 100% ready.
Also, just wanted to say I really liked your other projects, so I'm really hoping this turns out good.
Edit: Also... I think my problem was that originally I was running along with the bat... which isn't a good idea to say the least.
Forums
Topic: Petit Computer
Posts 441 to 460 of 9,620
Please login or sign up to reply to this topic