You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

Basic Pacman

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/Other publicado por u/xMarminq_ 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 cton 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
Inicia sesión o crea una cuenta para dejar un comentario
u/aetios November 29, 2016, 01:43:38 PM
(edited your message, you don't have to censor stuff like 'c' 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
u/xMarminq_ 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_
u/E37 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.
u/xMarminq_ 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:
u/E37 November 29, 2016, 06:47:05 PM
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)
Last Edit: November 29, 2016, 06:50:47 PM by E37
u/Unicorn November 30, 2016, 07:19:50 AM
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.
u/xMarminq_ November 30, 2016, 12:05:33 PM
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
u/aetios December 02, 2016, 11:01:15 AM
What have you tried so far?
u/xMarminq_ December 02, 2016, 11:58:52 AM
All of it, but I ave No experience.  :banghead:
So difficult!
u/SiphonicSugar 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
u/aetios 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.
u/p2 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 :)
u/SiphonicSugar December 03, 2016, 04:03:02 AM
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
u/Dream of Omnimaga 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.
Start a Discussion

b/Other

Any discussion that doesn't fit in other categories go here. Also, don't forget to introduce yourself. :)

232
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal