Forums

Topic: Petit Computer

Posts 741 to 760 of 9,620

Discostew

Sprite wrote:

I was programing today and was so used to saving my program I overwrited all my data on the the programing. I am trying to recreate it. Good news is I don't have to rewrite screens and sprites the longest part.

That's just the pits, Sprite. I've done that a couple of times. Thankfully, I keep backups of my work. For instance, my program called "MM2PTC" has several backups, with names like "MM2BCKxx", where xx is a number from 0 to 99.

Discostew

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

portealmario

@sprite I know how you feel๐Ÿ˜ช

meng ๐Ÿ˜
3ds friend code:1762-2769-7142

Sprite

I worked really hard, nonstop really, and got it back up with more features. It's a puzzle game currently and in the programming stage. It's supposed to be part of a sereis of which it will be the first

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

portealmario

Sounds cool!

meng ๐Ÿ˜
3ds friend code:1762-2769-7142

portealmario

I need to add some of you people to my 3ds friend list

meng ๐Ÿ˜
3ds friend code:1762-2769-7142

Sprite

why?

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

Sprite

also don't get your hopes up it's my VERY first program so it will proably be short but there will either be updates or new games

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

neoxid500

@Morphtroid
Okay, I'm trying to make a game of Solitare, however I'm not sure how to get the cards to deal. I've already thought of using the RND() command to assign the cards numbers and then deal that way, but I'm not sure what to do in the even that values will be the same. Help?

neoxid500

ramstrong

Morphtroid wrote:

This is a nifty idea I read on another forum:
You can also save data with GRP files! (that's the correct file type, right?)
[snip]
It's slower and harder, but it sounds so cool.

It's about 6-9 seconds. Not too slow considering you're saving 49 kB. Harder? Not really.
DIM W$[192]

FOR I=0 TO 191:FOR J=0 TO 255
GPSET J,I,ASC(MID$(W$[I],J,1))
NEXT:NEXT

FOR I=0 TO 191:W$="":FOR J=0 TO 255
W$[I]=W$[I]+CHR$(GSPOIT(J,I))
NEXT:NEXT

Suddenly Discostew's idea makes great sense! Ever heard of tab-delimited format?

BTW, Discostew, you would use sophisticated algorithm on a simple problem. Parser and all. Writing program without a computer. You're a Software Engineer in real life, right?

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

ramstrong

portealmario wrote:

@ramstrong sample code:
A=VAL(MID$(MEM$,16,20))
Error:
"Illegal function call (45,VAL)"

Eh, you're supposed to write a whole new program, not just snip the line from your buggy program. The value of MEM$ is missing. What if it's something important? Something like this:
M$="23456"
?M$
T$=MID$(M$,2,3)
?T$
A=VAL(T$)
?A

Run it, and you'll see
23456
456
456
The program works fine. Try it with different M$ and MID$ values.

BTW, your problem is that you specified 20 digit numbers. On my last reply, I did mention that the max you can get is 6 digits long. So, that's why you're getting the error. The max number is 500,000 something. 20 digits is overflow.

Anybody else catch this error? I thought it's rather obvious.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

portealmario

So I was working on my os today and added a new feature for menu sekection, and the weirdest bug happened when I started working on the games menu. I printed, then when I moved the cursor up, it started, I can't explain what happeden, but I really can't figure out how to fix it!

meng ๐Ÿ˜
3ds friend code:1762-2769-7142

portealmario

And I still can't get a character to jump properly

meng ๐Ÿ˜
3ds friend code:1762-2769-7142

Eel

neoxid500 wrote:

@Morphtroid
Okay, I'm trying to make a game of Solitare, however I'm not sure how to get the cards to deal. I've already thought of using the RND() command to assign the cards numbers and then deal that way, but I'm not sure what to do in the even that values will be the same. Help?

If you're making a game of solitaire you can't simply "choose the cards at random" just like that.
You need to remember that there are 4 suits with 13 cards each and maybe 2 jokers on a single deck.
You need to think a system so the game will make sure no single card is selected more than once.

Try to think something up. If you need more help, feel free to ask.

@Ramstrong: It is "harder and slower" compared to using mem

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

@portealmario why do you need friend codes?

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

Late

Have to post here again just to say I'm still waiting for this thing to be released in Europe. I really want to test your games and try to make my own but it seems like I have to wait forever.
I'm also trying to learn C++ as I noticed I have C++ course in my school schedule. Didn't even remember it before it started a couple of weeks ago
Now after two weeks I'm ahead everyone else and trying to make a simple text rpg whenever I have time. At the moment the game has three "monsters" (named after my friends) each with different HP and accuracy, a little leveling system which gives the player +5 HP whenever he defeats a monster and then there's of course options to attack or escape. It works great but now then I tried to add some new things and I have to fix it again to get it work correctly. I enjoy writing in C++ so now I'm sure I'll enjoy Petit Computer.

It's its, not it's.

Switch Friend Code: SW-8287-7444-2602 | Nintendo Network ID: LateXD

steriaca

@neoxid500 : I did a 'if both EXNUM and SAFNUM is the same, force a reasigment GOTO' in my BOMB program (comming soon, as I can get to a full computer as opose to using my DSi). While you CAN do something more elabrate like that for your Solatair program, I would degently not do that. It would take up lots of lines of code, and no garentee of working. So, I second Morphad's remark. What you could do instead is set up a few data tables, and read them. Exactly how, thoe, is beyond my ability to program at this time.

My Friend Code is 3368-1310-0690.

Icebender7

Wow this forum is really popular. Good luck you guys!

Icebender7

portealmario

@sprite just for fun, I'd like to have some of these people as my friends because they are nice

meng ๐Ÿ˜
3ds friend code:1762-2769-7142

portealmario

I figured out the bug, fixed it, and now I have figured out a cool password protection system!

meng ๐Ÿ˜
3ds friend code:1762-2769-7142

Wheels2050

Late wrote:

I enjoy writing in C++ so now I'm sure I'll enjoy Petit Computer.

Word of warning - you'll likely find Petit Computer somewhat limiting in comparison to C++. It's not necessarily a bad thing - it will force a lot of creativity and novel solutions to problems - but you'll notice a difference, especially if you use object-oriented programming to any extent.

Having said that, the people on this forum are doing great things with Petit Computer, so it by no means implies that fun games can't be made.

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

Please login or sign up to reply to this topic