Forums

Topic: Petit Computer

Posts 641 to 660 of 9,620

Eel

I like programming since it allows one the freedom to create. If you think about it, you can basically make whole worlds! It's kind of like a step up from LEGO and K'Nex.

That is very true

About collisions, Smile Basic comes with its own set of sprite-based collision detection functions, it's pretty easy just look at the part of the manual that explains it (and if you have any further questions, feel free to ask them here).
I think the most basic form of detection is just checking if "sprite A" is "touching" "Sprite B", though there are other commands.
I haven't really experimented a lot with that. Maybe next time I do something with sprites.

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

ramstrong

Metabble_King wrote:

Just wondering, but how do you guys handle collision detection in BASIC games? In Obj-C I've had to make my own physics classes which work on my own prediction based collision algorithm to detect and limit positional offsets based on object velocities each frame so that objects don't overlap. Do you just see if sprites overlap and correct their positions so that they don't after the fact, or what? This seems most likely to me since most collision correction is post-collision, and not pre-collision.

Didn't I just post Sprite Collision Tutorial program? Anyway, if you don't want to correct their position after the fact, you can use SPCOLVEC to define velocities.

The truth is, for every BASIC dialect, there's still learning curve to be had. I have to learn Sprites and Background, for example, not having Game Maker experience. Also, the FOR loop abuse to act as Multi-line IF, WHILE, REPEAT are new to me. There are things that I've learned before, such as page flipping. But the most difficult thing to learn is overcoming prejudice. To think that if you know old BASIC, you'd be good at this, is to miss great opportunity to learn it well. I still have to learn MML as well, but really, I don't see how anybody can miss how to play MML once you have the strings. It's right on the help menu, and they give you the program to do it, instead of just a reference.

I do a lot of experimentations, but try to avoid real-time game for now. Some things I do know. Having experimented with GPAINT, I know that it can be very slow. Also, SPOFS with timing can be extremely useful. It allows you to create games with resolution longer than 1/60 per second. In effect, Uncle Sporky's inability to understand how SPOFS extension works is detrimental to his DQ map demo, stuttering with diagonal movement.

In reality, the games you see in stores features a lot of tricks to max out the device. It's not something a beginner can do easily. There are some exceptions. Tetris for one. Picross is also easy. I did the core Picross in a couple hours, and I have a version with editor built-in for making puzzles. So, it's what you want to do, really. Then do it. Then, either you optimize it proper, or you cut features until you're satisfied.

You know C language, so you should be good with this, too! C is not a big language, afterall. You need to build your own tools, right? This should be easy to do after that!

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Sprite

I'm having trouble doing something.
I tried loading my charecter with
CHRREAD("VEIN",VEIN),C$
I looked on morphiod's post on the tutorial to find this out but it says
Illegal rescource type (25, CHRREAD)
Could someone help me with this and tell me why it failed

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

Eel

Wait... Are you loading your character (Which I will assume is a sprite) with CHRREAD?

To load a sprite you need to use SPSET, look the manual to see the correct parameters. It's easy.

CHRREAD is used to other things. I don't think I have ever used it myself.

Of course I may be missing something... Could you rephrase your question with more information?

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

ramstrong

@Sprite
Please delete your post in Tutorial thread. That thread is only for tutorial, not for asking question. Also, please make your upcoming program announcement in this thread, not in QR post thread. That's only for QR.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

JohnPhilipSousa

Would you recommend this to someone that would just like to play others creations? I don't really like coding in BASIC. I prefer other languages, but people seem to be making cool games with this.

JohnPhilipSousa

3DS Friend Code: 3909-7508-7026 | Nintendo Network ID: JohnPhilipSousa

Sprite

I didn't post anything in the QR colum.
Also thanks Morphiod

Edited on by Sprite

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

ramstrong

LordSEGA95 wrote:

Would you recommend this to someone that would just like to play others creations? I don't really like coding in BASIC. I prefer other languages, but people seem to be making cool games with this.

Sure. At $8 investment, you can get a lot of free programs. Not only that, even if you prefer other computer languages, the source code is right there, so you can port the program to other languages if you want.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

bloodofgore

I'm having a bit of trouble here.

61 IF BTRIG()=1 THEN GOTO @CH3
62 IF BTRIG()=2 THEN GOTO @CH2

Then when I run it

Syntax error (61, IF)

bloodofgore

Eel

Smile Basic uses == instead of = when using IF.

Normal BASIC - Smile Basic
=............................ ==
<>.......................... !=

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Sprite

@ramstrong
Yet you don't yell at the other guy on the tutorial

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

Eel

Sprite wrote:

@ramstrong
Yet you don't yell at the other guy on the tutorial

If by other guy you mean TheBlackDragon, she's a forum moderator who noticed your comment was misplaced and wrote you a note.
She will probably notice you deleted your comment and will delete hers too, later... Or leave it there so she doesn't need to write it again. Idk.

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Sprite

How do you load a specific custom charecter with spset

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

Eel

Well, if you want to load custom sprites, you first need to use LOAD... As in...
LOAD "SPU0:MYSPRITES"

That will replace the default sprites page #0 from (sprites from 0 to .... 67 I think) with the ones on your own set of sprites (SPU0 is the first page of sprites, SPU1 is the second, etc. Read the manual for more info on that).

After that just use SPSET as normal.

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

GrabSomeEyes

portealmario wrote:

@ramstrong I totally agree with your soapbox post
I think that someone should try to make a clone of minicraft for petit computer(I haven't learned enough to start myself). It is a game made by notch in 24 hours(with some similarities to minecraft) I'm sure someone(cough) @morphtroid (cough) could do it. It would be really cool to play it on the ds, and it would be easy to mod due to it's BASIC language. Do you think anyone would want to do it?

Actually, it's a project I've been wanting to make on Petit Computer for about a month. It's all way over my head though, the best I can do is maybe program an menu system/OS thanks to @boxtropica

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

Peidorrento

You don't. You have to load your custom sprites into the memory (like LOAD"SPU0:YOURSPRITEDATA") and use the reference numbers in the manual to display them (ex: spset 0,0,4,0,0,0,16,16 will set a sprite whose control number is zero, it is the first 16x16 sprite in SPU0, palet number 4, no horizontal rotation, no vertical rotation, no expanding (not sure here) and it is a 16 x 16 sprite).

Hope that helps.

Sprite wrote:

How do you load a specific custom charecter with spset

"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

swordx

GrabSomeEyes wrote:

portealmario wrote:

@ramstrong I totally agree with your soapbox post
I think that someone should try to make a clone of minicraft for petit computer(I haven't learned enough to start myself). It is a game made by notch in 24 hours(with some similarities to minecraft) I'm sure someone(cough) @morphtroid (cough) could do it. It would be really cool to play it on the ds, and it would be easy to mod due to it's BASIC language. Do you think anyone would want to do it?

Actually, it's a project I've been wanting to make on Petit Computer for about a month. It's all way over my head though, the best I can do is maybe program an menu system/OS thanks to @boxtropica

I heard you guys were talking about wanting to make a Minecraft clone. I'm sorry to say this, but that's almost impossible on BASIC. I'd be able to make a Minecraft-ish thing, but it would be very low quality. I'd reccomend just going for something like an RPG or a platformer.

swordx

Please login or sign up to reply to this topic