Forums

Topic: Petit Computer

Posts 901 to 920 of 9,620

portealmario

If there is anybody looking for a real chalenge, try rohrer's "sleep is death". This two player game is definately possible, with some small limitations. Look it up and see.

meng 😐
3ds friend code:1762-2769-7142

portealmario

It would be absolutely amazing if someone did it.

meng 😐
3ds friend code:1762-2769-7142

ramstrong

MushroomCooCoo wrote:

I am starting to work on a game and my movement is good but for some reason not all of my animations work right. And does anyone know how to make it not play the loading noise? Please help!

Have you tried...
Keep this:
IF (BT AND 1) THEN AY=AY-3:A=76
IF (BT AND 2) THEN AY=AY+3:A=68
IF (BT AND 4) THEN AX=AX-3:A=72
IF (BT AND 8) THEN AX=AX+3:A=64

Delete these
IF (BT AND 5) THEN AY=AY-3:AX=AX-3:A=72
IF (BT AND 9) THEN AY=AY-3:AX=AX+3:A=64
IF (BT AND 6) THEN AY=AY+3:AX=AX-3:A=72
IF (BT AND 10) THEN AY=AY+3:AX=AX+3:A=64
IF (BT AND 0) THEN AY=AY+0:AX=AX+0

Explanation: What you're doing is basically a SELECT-CASE structure. In C language, the structure falls over one condition after another. You use 'break' keyword to branch out the conditions. Since I put this kind of structure in a subroutine, I'd put RETURN keyword at the end of line so it doesn't fall through the next line. In your case, you want to fall through the next line, to check for the diagonals. You don't need to check for the diagonals separately. It's already implied.

@Discostew
Thanks for putting in link to your tutorial. I was hoping you'd do that.

On an unrelated note, I though we agreed to post continuing subjects in single post, instead of separate posts. I guess we're all a little rebel inside.

bloodofgore wrote:

Another question, I'm creating a puzzle game using text graphic, how do I make something appear, and stay there without being erased? Is there something else I need to use to set sprites other than PRINT?

Depending on what you use. ACLS clears everything. GCLS clears graphic screen. CLS clears Text screen. You don't clear BG and SPRITE. Just copy blank or disable.

I may be misunderstanding your question, but you don't use PRINT with sprites. ?? Can you give code samples on how to use PRINT with sprites?

Edited on by ramstrong

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

MushroomCooCoo

@ramstrong
Thanks, but @Discostew already helped me and it works good now. (Even with the diagonals) Now all I need help with is the backgrounds. (see comment above) If you could help me that would be super!

MushroomCooCoo

bloodofgore

ramstrong wrote:

MushroomCooCoo wrote:

I am starting to work on a game and my movement is good but for some reason not all of my animations work right. And does anyone know how to make it not play the loading noise? Please help!

Have you tried...
Keep this:
IF (BT AND 1) THEN AY=AY-3:A=76
IF (BT AND 2) THEN AY=AY+3:A=68
IF (BT AND 4) THEN AX=AX-3:A=72
IF (BT AND 8) THEN AX=AX+3:A=64

Delete these
IF (BT AND 5) THEN AY=AY-3:AX=AX-3:A=72
IF (BT AND 9) THEN AY=AY-3:AX=AX+3:A=64
IF (BT AND 6) THEN AY=AY+3:AX=AX-3:A=72
IF (BT AND 10) THEN AY=AY+3:AX=AX+3:A=64
IF (BT AND 0) THEN AY=AY+0:AX=AX+0

Explanation: What you're doing is basically a SELECT-CASE structure. In C language, the structure falls over one condition after another. You use 'break' keyword to branch out the conditions. Since I put this kind of structure in a subroutine, I'd put RETURN keyword at the end of line so it doesn't fall through the next line. In your case, you want to fall through the next line, to check for the diagonals. You don't need to check for the diagonals separately. It's already implied.

@Discostew
Thanks for putting in link to your tutorial. I was hoping you'd do that.

On an unrelated note, I though we agreed to post continuing subjects in single post, instead of separate posts. I guess we're all a little rebel inside.

bloodofgore wrote:

Another question, I'm creating a puzzle game using text graphic, how do I make something appear, and stay there without being erased? Is there something else I need to use to set sprites other than PRINT?

Depending on what you use. ACLS clears everything. GCLS clears graphic screen. CLS clears Text screen. You don't clear BG and SPRITE. Just copy blank or disable.

I may be misunderstanding your question, but you don't use PRINT with sprites. ?? Can you give code samples on how to use PRINT with sprites?

I am doing something like this

X=6
Y=5

@ML
Wait 1:CLS
LOCATE X,Y:? "!"
IF BTRIG()==1 THEN GOSUB @UP
GOTO @ML

(just skipping the rest, you get the idea)
@UP
Y=Y-1
Return

Edited on by bloodofgore

bloodofgore

ramstrong

@MushroomCooCoo
Discostew has a link to his excellent background scrolling in Petit Tutorial thread. I can do no better.

bloodofgore wrote:

I am doing something like this

X=6
Y=5

@ML
Wait 1:CLS
LOCATE X,Y:? "!"
IF BTRIG()==1 THEN GOSUB @UP
GOTO @ML

(just skipping the rest, you get the idea)
@UP
Y=Y-1
Return

Ok, I got it. You're not doing sprite, but you're doing ASCII graphic. Sprites are used with SPSET and the likes. You want to create some kind of background, right? You can use GPUTCHR to put characters on Graphic Screen. Therefore, when you do CLS, you erase Text Screen, but not Graphic Screen.

Also, please try to quote relevant text and edit out the rest. Thanks.

@MushroomCooCoo
And from GPUTCHR, it isn't that far from BG commands, HELP 41 + 42. Just like GPUTCHR, except you use BGPUT.
HTH.

Edited on by ramstrong

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

tiger667

here is a block of code I just made for my program. One tip I can give is for blocks you may use in multiple programs make a separate file that you can append when needed, I use the TB prefix on all these so I know it is from my "toolbox". I have done this to create a shell for my save and load, and for my different touch screen menus.

'USE NEXT TO TEST on its own
'INPUT "ENTER SOMETHING";TOCHECK$
,***********
'NEEDS TOCHECK$ SET AS STRING TO CHECK before GOSUB
'RETURNS CHECK AS TRUE IF NUM, FALSE IF NOT

@ISNUMBER
CHECK=TRUE
IF TOCHECK$=="" THEN CHECK=FALSE:RETURN
FOR Z=0 TO LEN(TOCHECK$)-1
IF ASC(MID$(TOCHECK$,Z,1))>=48 AND ASC(MID$(TOCHECK$,Z,1))<=57 THEN CHECK=CHECK ELSE CHECK=FALSE
NEXT
'USE NEXT TO TEST
'IF CHECK THEN ?"IS NUMBER" ELSE ?"NOT NUMBER"

RETURN

I know it has limited usefulness but I need it because I have an array for character information and there is a chance that something that is supposed to be a variable won't be, so I will check for it before trying to use it as a variable with VAR().

Edited on by tiger667

tiger667

tiger667

I realized that shortly after posting and edited my code, thank you though. I needed something for when the if condition was true, when I tried to check the inverse (if less than or greater than) it didn't work as intended. new code works fine now.

tiger667

steriaca

Anyone planing on doing a special program for Cristmass? I'm planing on doing one, called Micro Game Maddness. It will contain 9 games, many of them smaller versions of games I programed before. I already thought up 8 of them, and need to think up two more. Any sergestions? Remember, the games must be text based, and relie on the random number generator.
What I am planing on so far:
1) Micro Bomb: You got 15 turns to disarm the bomb. The bomb only has 3 wiers.
2) Micro Coin: You got five flips of this virtual coin. If you call it corect 3 out of 5 times, you win.
3) Micro Pirat Island: Your on a 3x3 island. You got a shovel which will break after 7 uses. Can you find the burried treaser?
4) Micro Tiger: Find the lady behind one of three doors. Bewair the tiger.
5) Combat Dummy: You got five 'strikes'. Can you hit the combat dunny at least five times?
6) Beat 20: Roll a virtual six sided die five times. Add them up and if you beat the number 20, you win.
7) Win Or Lose: Prehaps the most lazy game in this package...You eather win or lose depending on the random selection of the computer.

My Friend Code is 3368-1310-0690.

Hairmanban19

bloodofgore wrote:

A little update on my programs...

Vype
~~~~~~~
Added
-Notepad
-Calculator
-Minecraft Wiki
-Ability to change background image
-Turn music on and off
-Petit Pet
-Touch the touchscreen and hold for 3 seconds to go back to the menu (Unless said otherwise)
Planned
~~~~~~~~~
-Drumset
-Custom Backgrounds
-Set shortcuts
-Coding referance

Troint
~~~~~~~
Planned

-Custom music
-Custom maps
-Custom character (don't know if possible, don't expect this )
-Add and remove blocks (no it is not a minecraft/terraria clone, it is a puzzle game)
-Physics
-Storyline
-All sprites will be the default text sprites besides the character. (So you can has custom character)
-2 Player wireless play (it will show speed and score by sending files to your friend near you, unless if sending a file keeps sending the file in the steam and you can keep playing while sending the data, being side by side during the game will not be possible)

And that is so far all.

Sounds great

...

3DS Friend Code: 3136-7615-5907

portealmario

I am working on the mechanics of a portal-like game with text-graphics, I will release a sort of "tech-demo" soon.

meng 😐
3ds friend code:1762-2769-7142

KiwiFruit

I've been working on a Halloween themed top down vertical shooter since the beginning of this month. It will be an randomized endurance run type game. I have to stop test running it and keep working on this game. It will come with a few of CHR that I made for this game. I'm almost done adding what I wanted to this game. Just working on the last bit of the game. A game with multiple of ending depending on how much points you earned. Hopefully you guys will enjoy this game.

KiwiFruit

Shadowflash

Hello guys. I need help with button input. I'm making a game and I plan on having a menu in it, but IDK how to code button input (yes, I'm kinda noobish at this, sorry.). I tried looking in the manual, but that didn't help me much. If you guys could help, I'd greatly appreciate it. .

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

3DS FC: 1676-3897-8278

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

KiwiFruit

What I use for button is
@LOOP
GETBTN=BUTTON(0)
IF GETBTN==1 THEN PLAYERPOSITION=PLAYERPOSITION-2
IF GETBTN==2 THEN PLAYERPOSITION=PLAYERPOSITION+2
IF GETBTN==16 THEN GOTO @SHOOT
GOTO @LOOP

edit: accidently wrote BUTTON==1 instead of GETBTN==1 Opps... :-I.

Edited on by KiwiFruit

KiwiFruit

Discostew

I don't know if anyone has had this problem yet, but when I began hitting the processing limit (in that my frame rate slowed down), all button input that wasn't based off of BUTTON(0) began to have problems and not function (including button states based off of instantly pressed and instantly released). I had to make my own versions of those two button types, so I wrapped them into a single function.

@VSYNCBUTTON

VSYNC 1
BOLD=BT
BT=BUTTON(0)
BTIP=BT AND (NOT BOLD)
BTIR=(BT XOR BOLD) AND (NOT BT)
RETURN

BT is the regular button press one would get from BUTTON(0), but BTIP and BTIR are the other two states from BUTTON(2) and BUTTON(3).

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

GrabSomeEyes

Also, to stop the load screen from coming up, put ;0 after the program (or what ever else) you may want to load.
I make button like this:
@CON
B=BUTTON
IF (B AND 16) THEN EXEC "PRG:BLAH"
IF (B AND 2) GOTO @MENU2
IF (B AND 1) GOTO @MENU6
GOTO @CON

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

portealmario

@grabsomeeyes
the load screen thing didn't work for me

@everyone
I will release the portal "tech-demo" soon. It is a bit buggy, and it doesn't use the best techniques, but I will be updating it, and fixing that stuff.

I will also attempt making an ai chatterbot (siri is chatterbot mixed with voice control) but thry take FOREVER to make(it is alot of busy-work just making as many words and responses as possible).
btw, feel free to steal any work that I have posted on here for petit computer(or ideas, for that matter)

Edited on by portealmario

meng 😐
3ds friend code:1762-2769-7142

steriaca

I put up half the source code up for my 'haloween project' Zombie Horde up on http://petitcomputer.com/Zombie_Horde . I'll try to finish it by Wensday. Meanwhile, get a head start on putting the code in.

My Friend Code is 3368-1310-0690.

Shadowflash

KiwiFruit wrote:

What I use for button is
@LOOP
GETBTN=BUTTON(0)
IF GETBTN==1 THEN PLAYERPOSITION=PLAYERPOSITION-2
IF GETBTN==2 THEN PLAYERPOSITION=PLAYERPOSITION+2
IF GETBTN==16 THEN GOTO @SHOOT
GOTO @LOOP

edit: accidently wrote BUTTON==1 instead of GETBTN==1 Opps... :-I.

Thanks a bunch, man .

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

3DS FC: 1676-3897-8278

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

81Rambler

I had a question regarding the use of Binary and Hexidecimal. I've figured out so far that I can use &B and &H respectively to manually enter values in Binary or Hexidecimal, as well the use of HEX$() to convert a numerical into a hexidecimal figure. However what I'd like to do is to read a String (or even a portion of it) as a hexidecimal numeral and have it output as a regular numerical (ie to read 'B' from a string to get '11' as an output). The immediate purpose for this is to be able to select from all ranges of the color pallettes using a single figure (using hexidecimal 0-F to reach the range 0-15 respectively)

As well I'm looking at using CHRSET to build a small stable of graphics for a game I'm working on (in lue of dedicating a whole GRP file to download along with it). I'm using a method to save myself some space, using in string character multiplication formula to save space (ex; "F"*24"0"*2). While this works even within the CHRSET command I could not use this through the DATA/READ method as it would then insert the formula into the string itself instead of translating the formula into the string proper. Does DATA only read these as literal strings or can it be made to recognize formulas?

81Rambler

Please login or sign up to reply to this topic