Forums

Topic: Petit Computer

Posts 301 to 320 of 9,620

RudysaurusRex

I was wanting this game, then I saw some of the posts... Dakrap is this and how do you use it?

Edited on by LzWinky

SPREAD THE JOY OF THE GREAT TURTLE
HE IS UPON US AND WILL TAKE US TO THE GREAT WAVE
JOIN THE COURT OF TURTLES AND BE REDEEMED
THE COURT OF TURTLES

3DS Friend Code: 0061-3403-4305 | Nintendo Network ID: AlexTheGrayt | Twitter:

DrKarl

ejamer wrote:

PRINT "text ";INTEGER;" more text"

The key is using the semi-colon between each change in datatype.

Good to know. Thanks!

ejamer wrote:

Add the line of code I posted in my edit and test for yourself.

  • use a VSYNC 1 statement before the BTRIG statement to avoid the duplication error

Right you are. The VSYNC1 before the BTRIG's does the trick. Now I know what the manual was getting at. It wasn't clear that the sync needs to happen prior to the BTRIG.

DrKarl

DrKarl

ejamer wrote:

  • use IF-GOTO structure instead of IF-THEN GOTO

What's the advantage to this? I noticed that for anything but GOTO's and GOSUB's, the THEN statement is required. Does it hurt anything else other than reducing the available characters for the line by 5?

DrKarl

ejamer

ejamer wrote:

  • use IF-GOTO structure instead of IF-THEN GOTO

What's the advantage to this? I noticed that for anything but GOTO's and GOSUB's, the THEN statement is required. Does it hurt anything else other than reducing the available characters for the line by 5?

I don't know how they put the interpreter together, but in theory this should be a little bit quicker. Like, an extremely tiny bit quicker. Like, you probably won't see the difference unless it happens a huge number of times. In practice, I can't see it really mattering for virtually anyone using this program.

I also don't know how to do italics on these boards.

(Also, I thought this only works with IF-GOTO, not IF-GOSUB. I could be wrong and can't test right now.)

EDIT: Ok, I tested and couldn't find any difference in terms of performance. So this it looks like this change will just reduce the length of your code a bit.

Edited on by ejamer

ejamer

Nintendo Network ID: ejamer

Eel

rudydog13 wrote:

I was wanting this game, then I saw some of the posts... Dafuq is this and how do you use it?

We have been discussing its use in pretty much every comment.
Reading every comment posted in this thread should be as good as reading a tutorial

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

DrKarl

ejamer wrote:

(Also, I thought this only works with IF-GOTO, not IF-GOSUB. I could be wrong and can't test right now.)

I think you are correct that it is IF-GOTO only. I looked again and I was confusing it with ON-GOSUB.

Regarding ON-GOSUB, I can't make sense on how to use it from the manual entry. It looks like a way to do switch type statements, but I can't grok the syntax. Does anybody have an example scenario where this would be useful?

Sidenote on italics: encase an i between a left and right bracket. Type your italics text. Then do a /i within another left and right bracket to stop italics.

DrKarl

Eel

ON-GOSUB/GOTO

It works in this way (writing by memory, I could have something wrong):
You have a numeric variable X and you use:
ON X GOSUB @sub,GOSUB @sub2, GOSUB @sub3

What it really does:

If X==0 THEN GOSUB @sub
If X==1 THEN GOSUB @sub2
If X==2 THEN GOSUB @sub3

It is useful for things like menus.

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

neoxid500

Umm... help on making AI >.<
I can't have a shooter game without proper AI =D

neoxid500

Wheels2050

neoxid500 wrote:

Umm... help on making AI >.<
I can't have a shooter game without proper AI =D

You'll need to figure out what you want the AI to DO before you code it up. Do you want enemies to chase the player? Shoot at the player? Move in a set pattern? Once you figure that out, write a little flow diagram (i.e. just the algorithm, no actual code) and finally translate that to BASIC.

I used to have a blog link here. I'll put it back up when the blog has something to read.

DrKarl

Morphtroid wrote:

It works in this way...

That makes perfect sense. I will give it a try. Thank you.

Edited on by DrKarl

DrKarl

ejamer

neoxid500 wrote:

Umm... help on making AI >.<
I can't have a shooter game without proper AI =D

As mentioned above, the question is too general. Try giving some background information and then asking something more specific. When you are ready to ask code-specific questions, post a QR code of what you already have in place.

If you are looking for suggestions about how to create an AI, well... start by writing down ideas of what you want each different enemy to do. Will they rush towards your character, or try to keep their distance? Will they target your ship directly, shoot indiscriminately in known directions, or shoot slightly off-target to add some randomness? At the start, very simple AI is probably your best bet with levels designed around set patterns instead of intelligent enemies that appear randomly. Complex behavior can be created by layering a series of simple decision onto each other... so start simple and work your way up.

ejamer

Nintendo Network ID: ejamer

Retro_on_theGo

Retro_on_theGo wrote:

So can this thing handle 16-bit sprites? I THINK I saw a game or two that had them, but they were so basic.

[/div]

So I couldn't find a yes or no via googling, but it seems like the answer is yes. Has anyone tried. I'm mainly worried using 16-bit sprites would make the game harder to program? I'd rather use those kind of sprites than 8-bit for this game I've had in my head for a while now.

Edited on by Retro_on_theGo

zezhyrule

It's just a style retro... has nothing to do with the amount of bits. Not sure if you're referring to sprite size or color palette but it can vary ofc.

[15:36] Corbs: Vita rules - 3DS drools!

zezloggery | i haz youtube | PSN ID: zezhyrule

[23:11] Phoen...

Retro_on_theGo

But either way it's just a style, you're saying. Well ok then. I've procrastinated on buying this game long enough. Guess I'll go ahead and download it today. Work on learning it little by little. Thanks, I guess, zez. D:
Edit: I was referring to the color palate if you were still wondering. u_u

Edited on by Retro_on_theGo

FOREST_RANGER

now_youre_not wrote:

I on the other hand will continue learning... Java... yeah... u___________u

This. I'll try my hands at BASIC whenever I have enough money to get a points card.

Formely known as bobbiKat

Nintendo Network ID: F0R35T_R8NG3R

Peidorrento

Gonna try to make an side-scroller adventure now. I have to learn how to use the "DATA" command. Any suggestions?

"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

Eel

@neoxid500: looks interesting I'll scan it.

My cows are shaping up nicely, they won't be very active or interesting to look at but let's say it's part of it's "petitness"...
New blurry images yay
Untitled

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Please login or sign up to reply to this topic