* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Basic Pacman  (Read 1522 times)

0 Members and 1 Guest are viewing this topic.

Offline xMarminq_

  • Full User
  • Join Date: Sep 2016
  • Location: Generic Location
  • Posts: 448
  • Post Rating Ratio: +3/-0
  • Generic Personal Text
    • @UCUWQR30oIW2fRqCNI2IDGIA
  • Gender: Male
Basic Pacman
« on: November 29, 2016, 01:15:40 pm »
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



« Last Edit: November 29, 2016, 01:42:02 pm by aeTIos »


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

Offline aeTIos

  • Dabbler in C
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Ede, NL
  • Posts: 1049
  • Post Rating Ratio: +12/-0
  • hi
    • r_vdijk
    • /u/aetios
    • aetios
  • Gender: Male
Re: Basic Pacman
« Reply #1 on: November 29, 2016, 01:43:38 pm »
(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 :)
« Last Edit: November 29, 2016, 01:46:06 pm by aeTIos »
ceci n'est pas une signature

Offline xMarminq_

  • Full User
  • Join Date: Sep 2016
  • Location: Generic Location
  • Posts: 448
  • Post Rating Ratio: +3/-0
  • Generic Personal Text
    • @UCUWQR30oIW2fRqCNI2IDGIA
  • Gender: Male
Re: Basic Pacman
« Reply #2 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?
« Last Edit: November 29, 2016, 04:22:47 pm by xMarminq_ »
  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

Offline E37

  • Full User
  • Join Date: Jul 2016
  • Location: Lihilzard Empire
  • Posts: 229
  • Post Rating Ratio: +10/-0
  • I own 2 game consoles, a ti-83 and a ti-84!
    • E37
Re: Basic Pacman
« Reply #3 on: November 29, 2016, 05:02:51 pm »
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!    <(^.^)>

Offline xMarminq_

  • Full User
  • Join Date: Sep 2016
  • Location: Generic Location
  • Posts: 448
  • Post Rating Ratio: +3/-0
  • Generic Personal Text
    • @UCUWQR30oIW2fRqCNI2IDGIA
  • Gender: Male
Re: Basic Pacman
« Reply #4 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:
  • Calculators owned: Ti-84 Plus CE, Ti-84 Plus (can be borrowed from my school)
I don't associate with associations

Offline E37

  • Full User
  • Join Date: Jul 2016
  • Location: Lihilzard Empire
  • Posts: 229
  • Post Rating Ratio: +10/-0
  • I own 2 game consoles, a ti-83 and a ti-84!
    • E37
Re: Basic Pacman
« Reply #5 on: November 29, 2016, 06:47:05 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)
« Last Edit: November 29, 2016, 06:50:47 pm by E37 »
  • 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!    <(^.^)>

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CodeWalrus Supporter
  • *
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2820
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: Basic Pacman
« Reply #6 on: November 30, 2016, 07:19:50 am »
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 ??? ??? ??? ??? ???



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

Offline xMarminq_

  • Full User
  • Join Date: Sep 2016
  • Location: Generic Location
  • Posts: 448
  • Post Rating Ratio: +3/-0
  • Generic Personal Text
    • @UCUWQR30oIW2fRqCNI2IDGIA
  • Gender: Male
Re: Basic Pacman
« Reply #7 on: November 30, 2016, 12:05:33 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

Offline aeTIos

  • Dabbler in C
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Ede, NL
  • Posts: 1049
  • Post Rating Ratio: +12/-0
  • hi
    • r_vdijk
    • /u/aetios
    • aetios
  • Gender: Male
Re: Basic Pacman
« Reply #8 on: December 02, 2016, 11:01:15 am »
What have you tried so far?
ceci n'est pas une signature

Offline xMarminq_

  • Full User
  • Join Date: Sep 2016
  • Location: Generic Location
  • Posts: 448
  • Post Rating Ratio: +3/-0
  • Generic Personal Text
    • @UCUWQR30oIW2fRqCNI2IDGIA
  • Gender: Male
Re: Basic Pacman
« Reply #9 on: December 02, 2016, 11:58:52 am »
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

Offline SiphonicSugar

  • Full User
  • Join Date: Jun 2015
  • Location: Tennessee, United States
  • Posts: 249
  • Post Rating Ratio: +1/-1
  • Inspiration
    • siphonicsugar
    • @SiphonicSugar
    • SiphonicS
  • Gender: Male
Re: Basic Pacman
« Reply #10 on: December 02, 2016, 12:38:13 pm »
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.
« Last Edit: December 02, 2016, 12:42:43 pm by SiphonicSugar »
  • 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

Offline aeTIos

  • Dabbler in C
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Ede, NL
  • Posts: 1049
  • Post Rating Ratio: +12/-0
  • hi
    • r_vdijk
    • /u/aetios
    • aetios
  • Gender: Male
Re: Basic Pacman
« Reply #11 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.
ceci n'est pas une signature

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2283
  • Post Rating Ratio: +8/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Basic Pacman
« Reply #12 on: December 02, 2016, 01:55:50 pm »
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 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)

Offline SiphonicSugar

  • Full User
  • Join Date: Jun 2015
  • Location: Tennessee, United States
  • Posts: 249
  • Post Rating Ratio: +1/-1
  • Inspiration
    • siphonicsugar
    • @SiphonicSugar
    • SiphonicS
  • Gender: Male
Re: Basic Pacman
« Reply #13 on: December 03, 2016, 04:03:02 am »
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

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18730
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Basic Pacman
« Reply #14 on: December 03, 2016, 07:19:23 am »
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games