Forums

Topic: Petit Computer

Posts 3,801 to 3,820 of 9,620

swordx

Discostew wrote:

swordx wrote:

Gimmemorecoinz wrote:

On that note... now I need to think of a way to run a petit computer game on pc so that tool assisted runs can happen.
Or, a way to port all petit computer games to pc. hmm...

You COULD hand copy the code to some other type of BASIC. My game's coding doesn't even use any arrays, so it would be very easy to port my game.

By the way, I'm aiming to include at least 3 dungeons in DA 2 .I hope I have enough space...

Looking over my video, I noticed that my voice sounds very young. Well, THAT sucks! lol

The problem with copying to some other form of BASIC is that it will lack all the functions that are specific to PTC, mainly those that deal with visual representations like backgrounds and sprites. Even many of the graphic functions that exist in other versions are formatted differently.

I don't even use graphic functions. However, I could see my constant use of SCR files being a problem...

EDIT: I found some more PTC communities.

http://socoder.net/?topic=3595&seenpost=36602#36602

http://gbatemp.net/threads/petit-computer-europe.351805/

Edited on by swordx

swordx

Gimmemorecoinz

Well everybody! I have added jumping now after some annoying bugs...
caused by these two lines of code, and if you understand it you'll go DERP right away.

if jumpingtimer<0 then jumpingtimer=0
if jumingptimer<0 then falltimer=15

Somewhere else I had :
if falltimer>0 then gosub @fallframe

so when mario jumped he wouldn't fall. This has got to be like the dumbest mistake I've made but yet it's not obvious when you skim the code.
Derp derp derp I'm derping all night! Derp with me! derpa derpity derp derp
-derps with people-

But yeah now mario jumps. WOO!. I can add platforms now and I have a falltimer, which means if he's in a pit and there's no way he can get out I can set the falltimer to be indefinite... or
I can set the falltimer to be 1 in the case that he doesn't stand on a solid.
Then he'll just continue falling until he hits a solid.
Bingo!

>.> oh.. yeah and his jumping sprite is a mess. Go figure.

Edited on by Gimmemorecoinz

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

swordx

Gimmemorecoinz wrote:

Well everybody! I have added jumping now after some annoying bugs...
caused by these two lines of code, and if you understand it you'll go DERP right away.

if jumpingtimer<0 then jumpingtimer=0
if jumingptimer<0 then falltimer=15

Somewhere else I had :
if falltimer>0 then gosub @fallframe

so when mario jumped he wouldn't fall. This has got to be like the dumbest mistake I've made but yet it's not obvious when you skim the code.
Derp derp derp I'm derping all night! Derp with me! derpa derpity derp derp
-derps with people-

But yeah now mario jumps. WOO!. I can add platforms now and I have a falltimer, which means if he's in a pit and there's no way he can get out I can set the falltimer to be indefinite... or
I can set the falltimer to be 1 in the case that he doesn't stand on a solid.
Then he'll just continue falling until he hits a solid.
Bingo!

>.> oh.. yeah and his jumping sprite is a mess. Go figure.

Sounds like you're progressing VERY quickly! I can't wait to see the finished game!

swordx

Gimmemorecoinz

swordx wrote:

Gimmemorecoinz wrote:

Well everybody! I have added jumping now after some annoying bugs...
caused by these two lines of code, and if you understand it you'll go DERP right away.

if jumpingtimer<0 then jumpingtimer=0
if jumingptimer<0 then falltimer=15

Somewhere else I had :
if falltimer>0 then gosub @fallframe

so when mario jumped he wouldn't fall. This has got to be like the dumbest mistake I've made but yet it's not obvious when you skim the code.
Derp derp derp I'm derping all night! Derp with me! derpa derpity derp derp
-derps with people-

But yeah now mario jumps. WOO!. I can add platforms now and I have a falltimer, which means if he's in a pit and there's no way he can get out I can set the falltimer to be indefinite... or
I can set the falltimer to be 1 in the case that he doesn't stand on a solid.
Then he'll just continue falling until he hits a solid.
Bingo!

>.> oh.. yeah and his jumping sprite is a mess. Go figure.

Sounds like you're progressing VERY quickly! I can't wait to see the finished game!

I [sort of] fixed the pallete issue. Jumping has problems still since there's nothing limiting the jump height and no "solid" ground yet.
No bgu's yet or anything like that.
Thinking more about making the punch attack work on an object.
Such as a brick or something.
Need to create an hp gauge next.
Yes.. hp gauge! Haha!
A tiny HUD.
I think I'll do that next since it's something I can render to the screen that's always there.
I forgot to mention to, I made it now so you can jump to the right and left. Because being only able to jump straight up and down is useless.
It's a bit hard to control.. Heh. There's some redundancies to but It's coming along.
Then I need to add in some stage type things and I guess, a menu. Menu will come last since I really want to get the sprite controls down.

Funnily enough , I've spent more time trying to perfect the sprite control of mario than I did on link in my lttp demo. I guess I'm really obsessed with doing this now. It's going to be good though.

Edit: Okay I found some really cool items from yoshi's island and I love this game so I'm going to try to build a yoshi's island based stage yet.
I'm thinking of using a global var called Stage_name$ to only execute code which is to do with those stage items.
Having alot of if statements inside my main code might be an issue so I'm thinking of turning all the "input" handling into a sub routine of it's own based on what character you pick and then adding to that, putting specific stage subroutines to rendering, and then collision checking. and modifying variables based on that. I might need to change MarioX and MarioY to player1x and player1y that way it's more globalized...
I'm going to put tiny face graphics on the hud depending on what character you are.
This is getting huge fast and I've already added like an extra 25 lines of code.
Looks like more sprite work and tile work though sigh that isn't the fun part.
But seeing things work this fast is quite exhilerating! I'm starting to enjoy making this more than my lttp game.
MAYBE I can learn how to do better collision handling in petit computer this way. I want collision events for specific sprite objects to only execute on specific conditions.
Whelp.. I have more sprites to import and more pallets to mess with alongside trying to build up a nice stage. Wish me luck!
I want one scrolling bg and another layer of BG drawn ontop of that.. but I think for the second layer of BG i'll just use sprites since the second layer won't be a complete tile layer. Just clouds and stuff. This is SO FUN! hahahaha. see you all tommorow if I don't post again tonight.
By tommorow afternoon ish. I should have some kind of demo available. The qr codes won't be too hard to post and will consist of 5-20 depending on the demo size. Hope you're all excited. I am. And I bet I'll have even more done by tommorow afternoon ish. Oh yeah. that's MY time.

In case your wondering the reason I"m not posting QRS yet is because I really just want to complete some of this first so you can actually see something great and not just be like "Oh I'm moving a sprite. derp."
Anyways night everyone :3

Edited on by Gimmemorecoinz

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

ramstrong

IAmAPerson620 wrote:

1. The processing power required to do full 3d games using this technique is insane. Without any WAIT commands and only 1 VSYNC command, it still takes about half a second to rotate my cube only 90 degrees.

2. It took me all day today to develop the algorithms in using for rotation, and they only rotate the cube one way. It would take forever to make enough for a game that is even considered 3d.

I'm kind of curious why it would take you half a second to rotate 8 points? I think most of it would be spent on drawing the cube. Especially if you're rendering solid polygon. Wireframe representation should be quick, so maybe you should do it that way first.

Even then, using sin/cosine should not be slowing down the program too much. If so, just set up a look up table. Why the trouble in rotation? PTC has ATAN function that will give you the angle given two points. From there, it's a simple RxcosAngle, and RxsinAngle for new coordinates. Can you post your relevant rotation code? I'm kind of curious why you're having so much trouble.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Gimmemorecoinz

Oh yeah.. just because I ended up whipping this up real fast so I can paste some 16X16 sprites in.
Here: http://imgur.com/92WcX8K
This is a 16X16 template for pasting your sprites into petit computer.
All the templates I've posted so far are the exact size of the SPU files, and CHR files that petit computer uses.
So don't worry about the image size. It's all sized right as far as I can tell. and they've been working for me.
I'm using it to paste coins in and other objects. Some animated sprites will be in there soon. I should say, animted objects! From yoshi's island.

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

randomous

@Discostew I noticed that in one of those other threads you said the distance to the destination of the GOTO mattered for time, but in my tests that never happened. How far does it have to be exactly in order for it to make a difference?

randomous

InsertPi

ramstrong wrote:

IAmAPerson620 wrote:

1. The processing power required to do full 3d games using this technique is insane. Without any WAIT commands and only 1 VSYNC command, it still takes about half a second to rotate my cube only 90 degrees.

2. It took me all day today to develop the algorithms in using for rotation, and they only rotate the cube one way. It would take forever to make enough for a game that is even considered 3d.

I'm kind of curious why it would take you half a second to rotate 8 points? I think most of it would be spent on drawing the cube. Especially if you're rendering solid polygon. Wireframe representation should be quick, so maybe you should do it that way first.

Even then, using sin/cosine should not be slowing down the program too much. If so, just set up a look up table. Why the trouble in rotation? PTC has ATAN function that will give you the angle given two points. From there, it's a simple RxcosAngle, and RxsinAngle for new coordinates. Can you post your relevant rotation code? I'm kind of curious why you're having so much trouble.

First off, I am not using trigonometry in my stuff. I have 23 frames per 90 degrees. I change 16 variables (8 points(the corners)) per frame. I am using a wireframe cube, so that makes is quicker. The main lag point is the chain of 16 algorithms. Each one controls either the X or Y coord of a corner of the cube. If you look at my example of one the algorithms,

IAmAPerson620 wrote:

This is the algorithm for the top-right-back corner's Y coord: FRONT(7)=(FRONT(7)/1.00125)+0.17

you will see that 16 of algorithms similar to this being executed can cause a little bit of lag. But when you think about it, it actually goes pretty fast, executing over 750 algorithms per second. The next thing is that I'm drawing a good few lines (12) to make the cube. The third reason is the VSYNC command. If you wanna see the full code, it will be posted at the QR Code Sharing Thread today (the 2nd).

Edited on by InsertPi

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

InsertPi

I edited the Raycasting program a little bit to improve it. First off, I changed the 8x8 texture to a 16x16 texture, with no noticeable increase in lag. I also added the bukkit chat I made accessible thru A. Doing this, I could add the command /quality. (Did I already tell you this?) I will post my improved version on the 3rd. If anyone wants me to make a special 32x32 version for them, tell me! I'll be more than happy to do so. I would not suggest 64x64 or up, though. I'm sure you know why...

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

InsertPi

@Hairmanban19 @AnyoneElseWhoCares I am "abandoning" Person Text RPG II. Sorry guys. School is starting soon, and as I will be a Freshman in high school, I will not have much time to program. Also, I am doing more with graphics than text. So today (the 2nd), I will post the QRs I have so far. If you would like to pick up where I left off, feel free to! All I ask for is credit for the intro and the Prologue thru Chapter 2 if unmodified. If you modify it, feel free to take some credit. You can take full credit for anything else. Thanks guys!

Edited on by InsertPi

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

Gimmemorecoinz

I'm kind of having an issue. I've stayed up quite late trying to fix bugs and improving things.
First a small update i guess. mario can punch now.
Erm. not huge.
Now... I'm trying to use gcircle for now to draw a shield but i've loaded a background map
and my gcircle isn't showing up over the background layer at all
I tried changing to sooo many colours and still nothing.
Tried setting gpage and even using bgclr
I even tried commenting out the background commands period but ptc utilities seems to keep them in memory.
urgh.
What should I do?
I didn't realize drawing geometry over tiles is harder.

K this is dumb.. I used bgpage and pnltype "off"
and now my circle shows up-.-"
Why do the tiles have to get in the way of this?

Resolved with the use of GPRIO.
Thanks to petit computer function guide.. though I had to check EVERY command.. oh well. You can now shield! It's rudimentary.
most of this stuff doesn't "do" anything, but it animates and you can jump and fall, punch, move around, and shield.

EDIT: Well..
Now I have another issue. I tried using gprio but now when I do gcls. it clears the whole screen and even overwrites the tiles.
I don't want to have to reload my map every frame that might slow things down. is there a way to redraw the map file? or something...

Good news I fixed that issue. It turns out I was setting Gcolor to another color.
Apparently when you DO that it makes it so when you use GCLS it paints the entire screen that color.
I'm assuming Gcolor is set to transparent by default.
How nice of them to atleast do that for us. :3
Anyways it works now and I only use vsync when drawing the shield because otherwise it slows the game down.
The shield is two circles thick.
Oh yeah and you can jump backwards while facing the other way AND punch in mid air.
It's kinda becoming awesome... my tooth hurts now and I need to go take care of it.
Because I'm paranoid though I'm going to upload the code , and as many QRS as I can tonight. Hopefully the demo will be ready completely by
tommorow. It seems like I've actually accomplished what I set out to do (so far)
I kind of can't believe I did this in just a day lol.

actually nevermind... i'll post tommorow..
I'm really too tired now. I realized I Spent over 12 hours working on this today! woo... i'm exhausted
night

Edited on by Gimmemorecoinz

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

boot

Can one of the 2 real people making Saba tell me about the things in the game like if there's going to be a menu, how many characters, and items and stuff.

Just your average talking boot. FC: 0791-4881-1672 for Smash and Pokemon.

3DS Friend Code: 0791-4881-1672

boot

And I cant wait to play the real sounding ssb games.

Just your average talking boot. FC: 0791-4881-1672 for Smash and Pokemon.

3DS Friend Code: 0791-4881-1672

bobliefeld

Gimmemorecoinz wrote:

Well everybody! I have added jumping now after some annoying bugs...
caused by these two lines of code, and if you understand it you'll go DERP right away.

if jumpingtimer<0 then jumpingtimer=0
if jumingptimer<0 then falltimer=15

Somewhere else I had :
if falltimer>0 then gosub @fallframe

so when mario jumped he wouldn't fall. This has got to be like the dumbest mistake I've made but yet it's not obvious when you skim the code.
Derp derp derp I'm derping all night! Derp with me! derpa derpity derp derp
-derps with people-

But yeah now mario jumps. WOO!. I can add platforms now and I have a falltimer, which means if he's in a pit and there's no way he can get out I can set the falltimer to be indefinite... or
I can set the falltimer to be 1 in the case that he doesn't stand on a solid.
Then he'll just continue falling until he hits a solid.
Bingo!

>.> oh.. yeah and his jumping sprite is a mess. Go figure.

Seems like a odd way of doing things..? Surely you just want your characters to keep falling until there's a collision rather than making them fall for (x) frames? You don't want to have to check if he's in a pit or anything, just check if there's ground below him.

I'm guessing you're using a grid to represent your level and generate the background tilemap? You can use that for player/platform collisions too.

Also I don't know how you're handling jumping but I'm guessing from "jumpingtimer" that you're doing something like:

if (jumpingtimer > 0) then y=y-1
if (fallingtimer >0) then y=y+1

Have a go with something like this:

@mario_jump_data
DATA 3,2,2,2,1,1,1,0,0

@luigi_jump_data
DATA 3,3, 2,2, 2,2,1,1,1,0,0,0

For each character.

Then load the relevant jump data into an array along and the length of the array into a variable. So you'll end up with:

PLAYER_1_JUMP = ( array containing @mario_jump_data )
PLAYER_1_JUMP_LEN = 9

Then when your character is jumping rather than doing:
PLAYER_1_Y = PLAYER_1_Y - 1

Do something like:
PLAYER_1_Y = PLAYER_1_Y - PLAYER_1_JUMP(PLAYER_1_JUMP_COUNTER)
PLAYER_1_JUMP_COUNTER = PLAYER_1_JUMP_COUNTER + 1

And do it sort of the other way round when the player starts to fall from the peak of a jump.

That way you get a nice sort of jumping arc, and am individual one per character.. eg you want luigi to have a higher, floatier jump than mario.

bobliefeld

ramstrong

IAmAPerson620 wrote:

First off, I am not using trigonometry in my stuff. I have 23 frames per 90 degrees. I change 16 variables (8 points(the corners)) per frame. I am using a wireframe cube, so that makes is quicker. The main lag point is the chain of 16 algorithms. Each one controls either the X or Y coord of a corner of the cube. If you look at my example of one the algorithms,

Ah, you're developing your own algorithm. That's kind of strange. Even when I was developing my own algorithm, I used trigonometry. At least sine and cosine. Considering that I only need 2 pages of mathematical equation, I may take a crack of this myself.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

InsertPi

ramstrong wrote:

IAmAPerson620 wrote:

First off, I am not using trigonometry in my stuff. I have 23 frames per 90 degrees. I change 16 variables (8 points(the corners)) per frame. I am using a wireframe cube, so that makes is quicker. The main lag point is the chain of 16 algorithms. Each one controls either the X or Y coord of a corner of the cube. If you look at my example of one the algorithms,

Ah, you're developing your own algorithm. That's kind of strange. Even when I was developing my own algorithm, I used trigonometry. At least sine and cosine. Considering that I only need 2 pages of mathematical equation, I may take a crack of this myself.

I have weird ways of doing things. . One reason that I didn't use trig is the fact that I have not yet learned application of trig. I am 14. I know a lot of trig functions, ranging from sine to arctangeant to arccosecant. I just don't know application of them. :/

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

Gimmemorecoinz

update: Woke up. Still tired. night night. going back to sleep. now.
@boblifield: cool I might try it.

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

bobliefeld

IAmAPerson620 wrote:

ramstrong wrote:

IAmAPerson620 wrote:

First off, I am not using trigonometry in my stuff. I have 23 frames per 90 degrees. I change 16 variables (8 points(the corners)) per frame. I am using a wireframe cube, so that makes is quicker. The main lag point is the chain of 16 algorithms. Each one controls either the X or Y coord of a corner of the cube. If you look at my example of one the algorithms,

Ah, you're developing your own algorithm. That's kind of strange. Even when I was developing my own algorithm, I used trigonometry. At least sine and cosine. Considering that I only need 2 pages of mathematical equation, I may take a crack of this myself.

I have weird ways of doing things. . One reason that I didn't use trig is the fact that I have not yet learned application of trig. I am 14. I know a lot of trig functions, ranging from sine to arctangeant to arccosecant. I just don't know application of them. :/

You're best off either learning how to do it properly or trying to do something a bit simpler.

I don't mean any disrespect but whatever algorithm you come up with is not going to be as good/fast/accurate as the tried and tested way of doing things.

I saw you were playing with that raycasting engine? Maybe try expanding on what that does..?

I've not looked at that particular one but it shouldn't be too difficult to do something like add variable height walls or add doors.

bobliefeld

InsertPi

bobliefeld wrote:

IAmAPerson620 wrote:

ramstrong wrote:

IAmAPerson620 wrote:

First off, I am not using trigonometry in my stuff. I have 23 frames per 90 degrees. I change 16 variables (8 points(the corners)) per frame. I am using a wireframe cube, so that makes is quicker. The main lag point is the chain of 16 algorithms. Each one controls either the X or Y coord of a corner of the cube. If you look at my example of one the algorithms,

Ah, you're developing your own algorithm. That's kind of strange. Even when I was developing my own algorithm, I used trigonometry. At least sine and cosine. Considering that I only need 2 pages of mathematical equation, I may take a crack of this myself.

I have weird ways of doing things. . One reason that I didn't use trig is the fact that I have not yet learned application of trig. I am 14. I know a lot of trig functions, ranging from sine to arctangeant to arccosecant. I just don't know application of them. :/

You're best off either learning how to do it properly or trying to do something a bit simpler.

I don't mean any disrespect but whatever algorithm you come up with is not going to be as good/fast/accurate as the tried and tested way of doing things.

I saw you were playing with that raycasting engine? Maybe try expanding on what that does..?

I've not looked at that particular one but it shouldn't be too difficult to do something like add variable height walls or add doors.

With the raycasting program, it would be much easier to edit if I knew what some of those 1-character variables did. I think I'll try to add a 2-block high wall next. I was gonna add the ability to place/break blocks, but since you cannot edit a DATA string whilst playing, I do not know of any other way to do it without rewriting half the program. >.> If you have any ideas, please tell me! I really would like to see this become more like Cave Game Untitled and eventually resemble Minecraft Classic, although I do not know if this is possible thru raycasting... Also, I added the QRs for the 3D animation I made in case anyone cares.

Edited on by InsertPi

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

Discostew

randomous wrote:

@Discostew I noticed that in one of those other threads you said the distance to the destination of the GOTO mattered for time, but in my tests that never happened. How far does it have to be exactly in order for it to make a difference?

It might have been an assumption of mine, based on other versions of BASIC, as those did have some delay. With PTC, I'm beginning to think that labels get pre-compiled before the first line gets parsed, because PTC can identify duplicate labels from the very beginning. I'm thinking that the code is pre-scanned, finding all labels (both actual ones ones and those used in GOTO/GOSUB commands), and replaces them with a pointer, so when that code gets reached, the transition is almost instantaneous.

However, I think this delay does get added to GOTO/GOSUB commands if the parameter is a string variable, because it can't determine what the string will be, and after it parses/reads it, it will have to look into its label table to find the right place to go, whereas fixed labels, imo, are figured out pre-execution.

Discostew

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

Please login or sign up to reply to this topic