Forums

Topic: Petit Computer

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

swordx

JLMan wrote:

I have been working on Pacman in PTC! Everything is great, except for the AI... Turns out the Pacman AI is pretty simple, but I can't get it to work. Pacman AI is actually cool. Google "how pacman ai works" or something similar and it will tell you everything. Every ghost in Pacman has a different personality. Expect the QRs once I get the AI to work.

Only one ghost is after Pacman. The other 3 are going for positions near him. I forgot the positions, though...

swordx

twinArmageddons

i just finished the titan demo of aottg where you can actually fight the titans
you need all of these files
http://imageshack.com/a/img189/6121/1pma.png
http://imageshack.com/a/img51/4853/a1wb.png
http://imageshack.com/a/img824/3525/7slg.png
http://imageshack.com/a/img89/4793/qrb0.png
http://imageshack.com/a/img6/2061/i1b3.png
http://imageshack.com/a/img593/8439/3lx3.png
http://imageshack.com/a/img22/1442/05z2.png
http://imageshack.com/a/img842/9717/4z2t.png
feedback is appreciated
Edit: when i made the demo i forgot to test it and changed a lot of labels and i missed one on line 625, if you try to respawn it crashes. just go into the code and change @START2 to @START
Edit 2: sorry forgot one http://imageshack.com/a/img546/9467/iepf.png

Edited on by twinArmageddons

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

GraphicGenius

Wow! You posted about that blog!
If you're wondering why I'm so happy about that well, I used to be terrible at SmileBASIC but that helped me a lot!
But then I decided to stop checking the blog because he stop posting on it.

JLman wrote:

I'm making Pacman in PTC!

Cool! I'm making Pong! It looks like we're both making very old video games.

IAmAPerson wrote:

It'll look like l*,<_$]#{%

LOL
It looks like you said a bad word!

Edited on by GraphicGenius

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. Wait was that just a joke?

3DS Friend Code: 1478-3545-5136 | Nintendo Network ID: GreatGamer123

InsertPi

TOP 6 WAYS TO REDUCE LAG IN YOUR GAMES

  • Remove spaces wherever possible. Some common examples of this:
    FOR I=0TO 5
    IF X==3GOTO@LABEL
    ?"Hello"
  • Try to avoid assigning values to variables to often. Do this:
    Y=(2+2)*5
    instead of
    X=2+2
    Y=X*5
  • Don't do everything in one frame. Instead of:
    @LOOP
    GOSUB@MOVE
    GOSUB@TSCREEN
    GOTO@LOOP
    do:
    @LOOP
    ST=!ST
    IF ST THEN GOSUB@MOVE
    IF !ST THEN GOSUB@TSCREEN
    GOTO@LOOP
  • Only do some things if an input is on/off. You can even better reduce lag above by doing:
    @LOOP
    ST=!ST
    IF ST AND BUTTON()THEN GOSUB@MOVE
    IF !ST AND TCHST THEN GOSUB@TSCREEN
    GOTO@LOOP
  • If you're comparing if a number is 0 or 1, you can shorten it like above. Instead of:
    IF APPLE==1THEN GOSUB@APPLE
    IF GRAPE==0THEN GOSUB@NOGRAPE
    do:
    IF APPLE THEN GOSUB@APPLE
    IF !GRAPE THEN GOSUB@NOGRAPE
  • Longer labels/strings/variables mean more lag. It is very little, but it makes a big difference is large amounts. Instead of:
    AREALLYLONGSTRING$="Hi"
    AREALLYLONGVARIABLE=2
    GOTO@AREALLYLONGLABEL
    Do:
    S$="Hi!"
    V=2
    GOTO@L

I hope these help your coding! (Try to do these at the end. After doing these, it's a nightmare to maintain.)

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

Over 1/4 of Minecraft DS's code has now been changed according to the above post! (Modders beware! You're in for a nightmare!)

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:

Miblon

Hey guys,I haven't been using PTC often, nor have I been on this forum. But I recently started using it, and now I have obtained the knowledge to successfully move a sprite! I also made a cool sprite sheet for a character, and I'm super excited that I've gotten this far. I'm now going to program my character to stab a sword! If anyone wants to help me with some coding, go right ahead!

EDIT: I'm currently programming right now, and I have a question: Can I used BTRIG like this?:
IF BTRIG()==16 AND 1 THEN (command here)

Edited on by Miblon

This isn't a interesting signature. Go look at someone elses.
Friend Code: 5370-0889-8930

Slayer

twinArmageddons wrote:

Untitled
if anybody wants to test out the physics engine (with no titans or actual gameplay) i made the qrs for it
http://imageshack.com/a/img189/6121/1pma.png
http://imageshack.com/a/img51/4853/a1wb.png
http://imageshack.com/a/img824/3525/7slg.png
http://imageshack.com/a/img89/4793/qrb0.png
http://imageshack.com/a/img6/2061/i1b3.png
you need all those files if you want it to look good

You just made my day. Those sprites are quite big, what sort of "bit" are they? I'm thinking of using some Mega Man X sprites for... something, and I need to know what sprites I can use. It's X1-X3 or X4-X6 sprites. SNES and PS1 sprites. Look up gameplay on YouTube for the sprites.

JLMan wrote:

I have been working on Pacman in PTC!

YES!

JLMan wrote:

Everything is great,

YES!!

JLMan wrote:

except for the AI...

NO!
So I haven't been active code-wise, my DSi ran out of power and I couldn't find the charger just to tell people why I haven't been working on projects much.

Edited on by Slayer

I have nothing really to say about myself.

twinArmageddons

@0Games i actually have no idea what "bit" they are i just drew them in chred

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

swordx

twinArmageddons wrote:

@0Games i actually have no idea what "bit" they are i just drew them in chred

Anything PTC is 4 bit. Bit is the number of colors in the palatte/4. I think he's asking for sprite size.

swordx

twinArmageddons

swordx wrote:

twinArmageddons wrote:

@0Games i actually have no idea what "bit" they are i just drew them in chred

Anything PTC is 4 bit. Bit is the number of colors in the palatte/4. I think he's asking for sprite size.

oh, the sprites for the character are 64x64, the titans are 64x128, and the colossal titan's face is 128x128

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

ramstrong

randomous wrote:

@ramstrong Lol I can't believe you brought up Voronoi diagrams, because I happen to be making a Nearest Neighbor classifier for my Pattern Recognition class (which splits up the feature space into Voronoi cells based on which point is closest). I see that it's connect the dots now, thanks for the explanation. And thank you for the credit.

Haha. You're working on Voronoi diagram and can't recognize it when you're looking at one? Oh, dear. Some kind of student you are. Well, at least you have something very cool to show your teacher.

What kind of class is Pattern Recognition, anyway? Is this some kind of graduate level course? I don't think I've seen one. Any textbook?

I guess I'll be making a few more experiments with this Voronoi diagram thing. I still have other things to do, though. Still, this is very, very interesting research materials. For example, which point is the closest if you have to take walls into account? What about enclosing walls? And so on. Once I complete this, I'll have a subroutine that you can just plug in to do Virtual Keyboard and other things.

@IAmAPerson
Now of course, if you don't know the language, it'll look like |*,<_$]#{%

So, I take it you're writing another APL?

@JLMan
Expect the QRs once I get the AI to work.

Why not just release the one you have now and update later? You can put it (weighted) random for ghost AI for now.

@GraphicGenius
But then I decided to stop checking the blog because he stop posting on it.

I'm still posting on mine, though it's been Raspberry Pi materials lately. There's enough materials that I can use to built my own Nintendo 2DS, except at twice the price, and doesn't play any of Nintendo games. Raspberry Pi+7"HDMI+Teensy+Double Stick Joypad should do it. A little bit more money for Touchscreen+controller. Adafruit just released one for Arduino. Hmmm. Maybe I should knock off a quick game library for Raspbian based on PetitComputer!

@IAmAPerson

Don't do everything in one frame. Instead of:
ST=!ST
IF ST THEN GOSUB@MOVE
IF !ST THEN GOSUB@MOVE

I have no idea what you mean by that. Looks like a simple GOSUB@MOVE to me.

@Miblon
EDIT: I'm currently programming right now, and I have a question: Can I used BTRIG like this?:
IF BTRIG()==16 AND 1 THEN (command here)

Why don't you try it and see? There's a number of examples in the Tutorial thread, FYI.

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 I'm using handy dandy lag-reducing shortcuts there. This:
@LOOP
ST=!ST
IF ST THEN GOSUB@MOVE
IF !ST THEN GOSUB@TSCREEN
GOTO@LOOP
written out the long way is:
@LOOP
IF ST==1 THEN ST=0 ELSE ST=1
IF ST==1 THEN GOSUB @MOVE
IF ST==0 THEN GOSUB @TSCREEN
GOTO @LOOP
On the first frame, it'll @MOVE but not @TSCREEN. On the following frame, it goes to @TSCREEN and not @MOVE. This way, not everything is done in one frame, reducing lag.

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:

TAINT_Zzyex

ptc can be 16 bit w/ graphics.

"Did somebody say Aincrad?"
"No, go back to your own game!"
"awwww"
"And make out with Asuna."
"Aww-I mean YAY"

Twitter:

ramstrong

IAmAPerson wrote:

@ramstrong I'm using handy dandy lag-reducing shortcuts there. This:
@LOOP
ST=!ST
IF ST THEN GOSUB@MOVE
IF !ST THEN GOSUB@TSCREEN
GOTO@LOOP

Well, it would helped had you put in 2 different subroutines instead of just one. Anyway, what you're doing is doing timeslice operation. This can be generalized as

ON TIMESLICE GOSUB @READINP,@PROCINP,@MOVEP1,@MOVEP2,@DMGP1,@DMGP2,@REFRESH

Just in case you have rather long clock ticks. But the drawback is you have switching overhead. Still, if you can split your code that way, this represent a primitive multi-threading operation.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Miblon

I screwed my code up. Great.
So anyways I'm trying to reintegrate slashing, using DIREC, a variable. Each time you walk a direction, it assigns a number to DIREC. I'm trying to slash left, I get a syntax error.
Here's my code:
IF DIREC==4 AND BTRIG()==16 THEN GOSUB @SLASHLEFT

Edited on by Miblon

This isn't a interesting signature. Go look at someone elses.
Friend Code: 5370-0889-8930

InsertPi

@ramstrong putting 2 of the same subroutines was a typo, sorry. Anyway, yea. I changed about 300-350 lines of the Minecraft DS code to make it faster, and I'm still not done. If you guys don't enjoy, I will forever hate myself.

EDIT: I've decided that 3 people isn't enough to bug test MCDS B2.0 so I will release to anyone who has contributed to the making of the program, who are the following:
@Calc84maniac
@Leviceljir
@Damolii
@Randomous
@Bluerobin2
@Bonchoi
@Ralph

EDIT EDIT: @Miblon one equals sign (=) is used for assigning a value to a string/variable. Two equal signs (==) is for comparison.

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:

Pixelrobin

@ramstrong @randomous where do you guys learn this stuff? Can I have a book,on generic programming methods?

@ramstrong Great to see you back! Heh. I REALLY need to continue work on ptc community :/.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

twinArmageddons

now that the main gameplay of aottg is near complete, besides a few ai tweaks, i'm going to spend some time on aesthetics to make it look good. atm i added a falling animation for titans so they don't just disappear when they die, i added a short intro scene when you start a mission, and i added a few more attacks for the titans so you can no longer feel safe when near a titan d: because of these new attacks, playing in the forest with an npc has so much lag it's almost unplayable. i'm going to try doing what persson said and see if it makes it any better. i also worked on the colossal titan, and (spoiler alert) because he's actually just a titan shifter and not actually a titan it wouldn't make sense for him to just die so i made his human form appear and start running away and you have to capture him to win. on the wiki chat today, i noticed a lot of people complaining about the limited amount of swords and asking to make it infinite. i'm not going to do that because that would take away the challenge and easy is usually boring. if you want to use your swords without breaking them all right away, you have to start making your hits more accurate or it'll just wear out your blades. the only way you can kill a titan is with one hit to the neck. tl;dr not adding infinite swords. i was also thinking of adding deviant titans, but that would require more sprites and i still have to finish the other character sprites, and it would take a lot of coding and it would probably lag. i'm definitely going to attempt it though i'm also considering all (reasonable) suggestions that i get, so if you have any suggestions or requests just let me know.

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

ramstrong

Bluerobin2 wrote:

@ramstrong @randomous where do you guys learn this stuff? Can I have a book,on generic programming methods?

@ramstrong Great to see you back! Heh. I REALLY need to continue work on ptc community :/.

Nowadays, I use the Internet. Back before then, I used to just go to local University and buy books off their bookstore. Whenever I need more, I go to library and hit graduates' research papers. As long as I have the books, can link them to actual course numbers, I'm fine. It's not like they'll check your id unless you're checking out books and stuff. Time it during course registration period and no one cares.

Where is Morphtorok, anyway? I hope he didn't get Pokemon or we'll never get him back! Very addictive. It's the only game where I have withdrawal symptoms when not playing after a while.

EDIT:
Algorithms in C++ by Robert Sedgewick is a good generic all-purpose programming book. It's based on The Art of Computer Programming by Prof Donald E. Knuth. If you want game graphic specific, I can recommend Andre LaMothe's book. Or maybe Michael Abrash books. I hope I didn't just date myself. ^_^; But I can't find any good book of recent vintage. I'll have to hit man pages for SDL2.

@JLMan
Well, don't call it Pacman, then. Just call it, Odd Travellers in Mystery Maze or something.

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

Please login or sign up to reply to this topic