Dinosaur Game Optimization

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

Forum » Programming & Design / TI-83/84/+/SE Programming » Dinosaur Game Optimization
Started by: CalcNerd CalcNerd
Date: 07 Nov 2020 13:45
Number of posts: 5
rss icon RSS: New posts
Summary:
Sort of like the Chrome Dino Game, but I will do a version more like that one much later.
Dinosaur Game Optimization
CalcNerd CalcNerd 07 Nov 2020 13:45

I made a game that is like the Chrome dino game. (obviously not the same quality. I will work on a version that is more like it later. For now, I will just use letters) It is lacking one major thing, randomly generated "cacti". I was working on this project yesterday, and I couldn't think of a way to do them. I thought about using a list, but I am not sure how I would do that. I will post the code below. If you can think of any way to do the randomly generated "objects", let me know!

Thanks!

CalcNerd

:7->X:16->A:ClrHome
:Output(8,1,"================ //16 Equals
:Repeat K=45 or X=7 and A=2
:getKey->K
:A-1->A
:If A=1
:16->A
:Output(7,1," // 16 spaces
:Output(7,A,"v
:If X=6
:Output(X+1,2," // One Space
:Output(X-1,2," //One Space
:Output(X,2,"θ
:max(4,min(7,X+1-4(K=21->X
:End
by CalcNerd CalcNerd , 07 Nov 2020 13:45
Re: Dinosaur Game Optimization
(account deleted) 09 Nov 2020 17:03

If you want any ideas or inspiration, here is Dino Run CE:
https://ticalc.org/archives/files/fileinfo/473/47362.html


Hewwo, my name is Achak Claw. I was formerly BioHazard.

by (account deleted), 09 Nov 2020 17:03
Re: Dinosaur Game Optimization
(account deleted) 02 Dec 2020 14:21

you are right on the list thing.
so what you wanna do is have one cacti (with a height of some number from 1 to 3) spaced out with said spacing determined with

randInt(6,10

the list would be 16 items long, and it would be "shifted" using
ΔList(CumSum(L1

example:

the list would look like this:
{0,0,0,0,0,2,0,0,0,0,0,0,3,0,0,0
and when put on screen, would look like this:

*
* *
* *

(the *'s are cacti)
edit: sorry it only shows if you can somehow edit my post. :(

Last edited on 02 Dec 2020 14:23 by (account deleted)
by (account deleted), 02 Dec 2020 14:21
Re: Dinosaur Game Optimization
CalcNerd CalcNerd 02 Dec 2020 17:05

Ok! I will try implementing this into my game and see how it goes! I will get back to you when it is finished.

Thanks!

CalcNerd

by CalcNerd CalcNerd , 02 Dec 2020 17:05
Re: Dinosaur Game Optimization
CasualGamer CasualGamer 03 Dec 2024 18:41

I tried to add the cacti but it didn’t work, it would be great if someone could fix it for me. Please keep in mind that this is only my second time coding, so sorry for the very bad and excess code and text.
Here’s the code:

:7->X:16->A:10->Z:ClrHome
:Output(8,1,"================ //16 Equals
:Repeat K=45 or X=7 and A=2 or X=6 and A=2 and Z=2 or X=5 and A=2 and Z=3 or X=6 and A=2 and Z=3
:If Z=10 // doesn’t need to be 10, just any # that isn’t 1, 2, or 3. If you change it, change all the 10s
:randInt(1,3)->Z
:Z->B
:End
:getKey->K
:A-1->A
:If A=1
:randInt(16,20)->A
:10->Z
:End
:Output(7,1," // 16 spaces (the spaces don’t show)
:Output(6,1," // 16 spaces
:Output(5,1," // 16 spaces
:If A≤16 and Z≠10
:Output(Z,A,"v
:If Z≠1 and Z≠10
:Repeat B=1
:B-1->B
:Output(B,A,"v
:End
:End
:End
:If X≠7
:Output(X+1,2," // One space
:Output(X-1,2," // One space
:Output(X,2,"0
:max(4,min(7,X+1-4(K=25->X
:Wait .05
:End
:End

by CasualGamer CasualGamer , 03 Dec 2024 18:41
/forum/t-13855233/dinosaur-game-optimization#post-
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /