+-Discord Shoutbox


Alternatively, join us on Discord directly.
You can help CodeWalrus stay online by donating here.

Basic Pacman

Started by xMarminq_, November 29, 2016, 01:15:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xMarminq_

November 29, 2016, 01:15:40 PM Last Edit: November 29, 2016, 01:42:02 PM by aeTIos
Hi. This is a project I will be doing alongside Time.
It is pretty self explanatory, as this game has been done by @MateoConLechuga .
But since I am a BASIC beginner, you may have seen me ask a ton of questions.
But I have a s***ton of things on its to-do list, like:
•Colored text, to easily differentiate everything, which requires that library program, please correct me
•AI
•A somewhat of a character that looks like this ៴, for a pacman going up, as i already have < > and ^
•Pacman controls
•Everything but the level design



  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

aeTIos

November 29, 2016, 01:43:38 PM #1 Last Edit: November 29, 2016, 01:46:06 PM by aeTIos
(edited your message, you don't have to censor stuff like 's***' when it's totally obvious ;))

Looks interesting. It's on the CE, isn't it? I would recommend making the ghosts a single letter, maybe an O or something. The reason is that they're quite hard to distinguish right now. When you add in colors, you can also just color them to distinguish, further removing the need for different letters.
Looks good so far, though! How is the speed? I don't have a CE, so I can't test :)
ceci n'est pas une signature

xMarminq_

November 29, 2016, 04:09:55 PM #2 Last Edit: November 29, 2016, 04:22:47 PM by xMarminq_
All I have is the level design, and I have bronchitis  :'(
How do you make colored letters using the library program for home screen BASIC?
How can you detect certain letters/numbers at a certain coordinate?
  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

E37

I would have a string that is the screen which is updated along with the screen. You may even want to just display the string to update the screen.
I don't know how laggy displaying a string that takes up the whole screen is, you will have to try it. Using output instead of disp makes it so the text wraps.
If you have doors installed, there are a bunch of libs for programming which could be helpful.

*All of my information is accurate to my knowledge. Some of it could be slightly different since I am using a black and white calc.
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

xMarminq_

It's a CE, but thanks for the help!
If you know anything about the CE, that would be great!
:thumbsup:
  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

E37

November 29, 2016, 06:47:05 PM #5 Last Edit: November 29, 2016, 06:50:47 PM by E37
Quote from: xMarminq_ on November 29, 2016, 06:29:10 PM
It's a CE, but thanks for the help!
If you know anything about the CE, that would be great!
:thumbsup:
Everything I said should apply to the CE. I just added the disclaimer in the unlikely case that something was different. I am 98% sure that everything in my previous post should work just fine on the CE.
Sorry for the confusion  :-\

Basic on the 83+ is the exact same as the 84+ CE. (well... some of the screen commands are different of course)
  • Consoles, mobile devices and vintage computers owned: Ti83,Ti84!
I've never finished a project, there is always a way to improve!
What's my calc's name? Convert $37 to decimal. Look up that element in the periodic table. Then take the abbreviation of that element and you have it!
Look! A slime!    <(^.^)>

Unicorn

Quote from: xMarminq_ on November 29, 2016, 06:29:10 PM
It's a CE, but thanks for the help!
If you know anything about the CE, that would be great!
:thumbsup:
YEah, that info should work perfectly fine on the CE.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

xMarminq_

Quote from: xMarminq_ on November 29, 2016, 04:09:55 PM
All I have is the level design, and I have bronchitis  :'(
How do you make colored letters using the library program for home screen BASIC?
How can you detect certain letters/numbers at a certain coordinate?

Halp
  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

aeTIos

What have you tried so far?
ceci n'est pas une signature

xMarminq_

All of it, but I ave No experience.  :banghead:
So difficult!
  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

SiphonicSugar

December 02, 2016, 12:38:13 PM #10 Last Edit: December 02, 2016, 12:42:43 PM by SiphonicSugar
For detection? Like are you talking about tile collision and that sort of thing?

If you are, you can have If sub(String1,24Y+X,1)="W":Then <restore coordinates to previous values>

Where Y is your character's Y value from up to down, X is the value from left to right, and W in the quotations is what ever character you want to stop the character from going into. And String1 is the string that you have the level displaying out of.
This will only work if you have a string display the whole page.
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

aeTIos

I get the idea that you're not using a map at all, are you? You can't just draw onto the screen and expect that to work, you need to keep track of the location of everything. Try making a map using a matrix.
ceci n'est pas une signature

p2

save the map data you ant to show in a matrix and save changes in there, too.
and then simply display (the currently vissible part of) the matrix :)
if you use tiles, then save IDs in the matrix for example :)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CAS, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

SiphonicSugar

Quote from: a̩͕̻̤̹̒ͩ͒̃͊͢͡͞ͅę̱̝̘͓ͦ̚͘͠T̥̮̹̪̹̙̘̣̳̽̆ͩ͋̃̾̚͝Ḭ̈̌̋͑̅ͩͪ̒̚͢ͅoͫŝ on December 02, 2016, 01:04:47 PM
I get the idea that you're not using a map at all, are you? You can't just draw onto the screen and expect that to work, you need to keep track of the location of everything. Try making a map using a matrix.

Yeah, or try using a string, which in my opinion is way easier to edit. :p
  • Calculators owned: TI-89, TI-84 Plus, TI-92, TI-84 Plus C SE, and TI-Nspire CAS with Touchpad
I'm just trying to grab some inspiration. :P

DJ Omnimaga

Yeah you need to use a map. A matrix should do.

I have some suggestions and tips:

1) For the walls, you could try using the equal sign that is white on a black background. It's not accessible from BASIC, but my game Legand of Zelda: Sord of Atari has it in the source code. Download it at ticalc.org (and yes, it's misspelled on purpose). Just copy the sign into a string or something so you can paste it in your code where needed. It might be easier to distinguish walls from the rest in such case.

2) You can't use color on the homescreen without ASM libraries. CE Textlib is what you need: http://www.ticalc.org/archives/files/fileinfo/465/46522.html . Run {14:Asm(prgmTEXTLIB at the start of your program, then use the following to change character and background colors (you don't need to specify the background everytime you change the text color):

{16,color,17,backgroundColor:Asm(prgmTEXTLIB . Both the color and background colors can be a number from 10 to 25 (the same as TI-OS colors, but there's an extra color in CE Textlib, which is teal (25). 0-9, 12 and 26-255 gives black color.

3) My recommendation, for speed, is to only use 1 color for all 4 ghosts. If you specify one color per ghost then the game will slow down drastically.

4) There are more advanced tricks with CE Textlib, but I would recommend staying away from them for now. There are some that I never tried myself.
  • Calculators owned: TI-84 Plus, TI-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10, HP Prime, fx 1.0 Plus, fx-7400G Plus, fx-9750G Plus, fx-9860G, HP 39gII
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Nintendo 64, Wii U

Powered by EzPortal