» Goto page Previous  1, 2, 3
Bump.

So, any help up there? Did I do that right? I can't get it to work on calc, if you want my code, here it is.

Code:
``` ClrHome real(0,1,1 real(8,1,0 "MNYWBG real(5,2,0 "MNSPRT real(5,0,0 DelVar NDelVar BDelVar K 19→T randInt(8,19→U randInt(5,15→V Repeat K=15 real(2,0,0 Ans→K T+1→T U+1→U V+1→V If T=20:Then randInt(1,130→M real(4,6,2,M,1,16,16,L,1,16,16,N,1,16,16 //HEre If Ans=1 M+16→M real(4,0,M,1,3,3,0,0,4,0,0,0,1,2,8,9,10,16,17,18 End If T≥40:Then DelVar T real(7,9,M,1,29,26,93,0 End If U=20:Then randInt(1,130→L real(4,6,2,L,1,16,16,M,1,16,16,N,1,16,6 //Here If Ans=1 L+16→L real(4,0,L,1,3,3,0,0,4,0,0,0,1,2,8,9,10,16,17,18 End If U≥40:Then DelVar U real(7,9,L,1,29,26,93,0 End If V=20:Then randInt(1,130→N real(4,6,2,N,1,16,16,M,1,16,16,L,1,16,16 //Here If Ans=1 N+16→N real(4,0,N,1,3,3,0,0,4,0,0,0,1,2,8,9,10,16,17,18 End If V≥40:Then DelVar V real(7,9,N,1,29,26,93,0 End If K=2 P-25→P If K=3 P+25→P If K=2 or K=3:Then "MNYWBG real(5,1,0 real(5,3,P-25,104,16,16,0,0 real(5,3,P+25,104,16,16,0,0 End real(4,0,P,104,2,2,0,0,4,0,0,3,4,11,12 End ```
Welp, Things are working, I just need to figure out how to test for 2 sprites colliding with one other and moving the one other sprite. I'll try to get some code up, but I don't have connection software. And it takes a while to type on a kindle
Bump.

I'm runnign into probelms with sprite collision, so does anyone have any pointers? The sprites are almost always colliding. Am I not makign the sprites change by enough of an increment?

Code:
``` real(0,1,1 real(8,1,0 "MNYWBG real(5,2,0 "MNSPRT real(5,0,0 DelVar NDelVar BDelVar K 19→T randInt(8,19→U randInt(5,15→V Repeat K=15 real(2,0,0 Ans→K T+1→T U+1→U V+1→V If T=20:Then Lbl 1 randInt(1,130→M real(4,6,2,M,1,16,16,L,1,16,16,N,1,16,16 //HEre max(|LXL IF Ans=2 M+24->M If Ans=1 Goto 1 real(4,0,M,1,3,3,0,0,4,0,0,0,1,2,8,9,10,16,17,18 End If T≥40:Then DelVar T real(7,9,M,1,29,26,93,0 End If U=20:Then Lbl 2 randInt(1,130→L real(4,6,2,L,1,16,16,M,1,16,16,N,1,16,6 //Here max(|LXL IF Ans=2 L+24->L If Ans=2 Goto 2 real(4,0,L,1,3,3,0,0,4,0,0,0,1,2,8,9,10,16,17,18 End If U≥40:Then DelVar U real(7,9,L,1,29,26,93,0 End If V=20:Then Lbl 3 randInt(1,130→N real(4,6,2,N,1,16,16,M,1,16,16,L,1,16,16 //Here max(|LXL IF Ans=2 N+24->N If Ans=1 Goto 3 real(4,0,N,1,3,3,0,0,4,0,0,0,1,2,8,9,10,16,17,18 End If V≥40:Then DelVar V real(7,9,N,1,29,26,93,0 End If K=2 P-25→P If K=3 P+25→P If K=2 or K=3:Then "MNYWBG real(5,1,0 real(5,3,P-25,104,16,16,0,0 real(5,3,P+25,104,16,16,0,0 End real(4,0,P,104,2,2,0,0,4,0,0,3,4,11,12 End ```
Unicorn wrote:
Welp, Things are working, I just need to figure out how to test for 2 sprites colliding with one other and moving the one other sprite. I'll try to get some code up, but I don't have connection software. And it takes a while to type on a kindle

What do you mean by "it takes a while to type on a kindle"? Do you have an app on your kindle that can write TI programs, or are you using the internet to use SourceCoder from the kindle? I have a Paperwhite, and I want to put apps and stuff on my kindle but never figured it out because I was probably doing something wrong. Sorry if this doesn't help with your program, because you have probable already used this, but http://dcs.cemetech.net/index.php/DCSE:BasicLibs:DrawSprite#DrawSpriteCheckCollisionA_.28TIOS_VALUES.2C_DCSE8.1.29.
I use my paperwhite to post and I was going to post the code by reading it from the calc, then typing here. But, I got on a computer and copied the latest posted code and made small edits.

And yes, that has been my resource throught this whole procces.
BIG changes. So I've decided to revamp the game, making it into a kind of gathering game, with occasional enemies and a shop. So sort of like an RPG, but a bit different.

The original game idea seemed a bit boring, hence the change. And I'm going to change sprite sizes.
So, it turns out that DrawPicSection does not work with a 32 color BG.

So, I decided to go with a 32 color BG pic as my background. I have that in, along with my walrus sprite. But, I can no longer erase the way I used to. I used to use the DrawPicSection command to erase the sprite, and I want to do the same here, but it appears that it doesn't work. When running the code, it displays some weird static-like images where the background would be, and all movement becomes slowed. The getkey updates very slowly.
I have checked that the appvar names are the same, but it still happens.

Code:
``` real(0,1,1 real(8,1,0 "MNYBG real(5,7,0 "MNYSPRT real(5,0,0 DelVar K Repeat K=15 real(2,0,0)->K If K=2 P-16->P If K=3 P+16->P "MNYBG real(5,6 real(5,3,P-16,104,16,16,0,0 real(5,3,P+16,104,16,16,0,0 real(4,0,P,104,2,2,0,0,4,0,0,0,1,8,9 End ```
[/b]
bump. I have screenshots, and progress!

So, I believe I am going to stare the map in a matrix. So, before hand, the matrix is generated with random numbers stored in each cell. the cells are associated with the rooms, and if the random number in the cell equals 5, there will be a treasure. Or maybe if it equals 7, thats where the boss will be.

Code:
``` Map: R1 R2 R3 R4 R5 R6 Matrix: randInt(1,10 randInt(1,10 randInt(1,10 randInt(1,10 randInt(1,10 randInt(1,10 randInt(1,10 20 // for the boss. ```

Here's the Screenshot! The bottom black box will be for stats, and I need to add some sort of animation for entering rooms...

If your matrix is 2 rows and 3 columns, filled with random numbers, you could try the randM() command. It will give you random values from -9 to 9, but with the abs() command, you can get random numbers from 0 to 9 (which is equivalent to 1 to 10, of course):

Code:
`abs(randM(2,3))`
So, if I understand correctly, this would store a value from 0-9 to row 2, column 3 to matrix [A] ?

[code]
abs(randM(2,3->[A]
[code]
Unicorn wrote:
So, if I understand correctly, this would store a value from 0-9 to row 2, column 3 to matrix [A] ?

[code]
abs(randM(2,3->[A]
[code]
When in doubt, you can press + on commands in the Catalog to find out what they do, or just consult the KermBook! Of course, you could also test it, and if you did, you'd find that it creates a 2x3 matrix of random numbers. It saves you either lots of randInts or a loop or two.
In any case, thanks!
An update: I need to figure out how to link the matrix to the rooms (I already have an idea how) and then I need to work on the fighting engine, and storyline after that!
Progress update:

I have room changing working, with an invertscreen thing, and I am working on the stats on the bottom of the screen, and the actual stats screen, where you see your inventory and stuff. Not much progress, but some And screenies should be coming tomorrow or so
Great, I look forward to those screenshots, as I'm having trouble visualizing what these parts of the game look like. Keep up the good work, and I'm glad that you're continuing to make progress.
Here's those screenshots!

Unicorn wrote:
Here's those screenshots!

Haha, nice! Looking pretty spiffy there; keep up the good work! Is there a reason why the right side of the screen looks kind of funky, and the second map has scanlines or somethings?
Thanks!

Those are jsTIfied bugs, the lines are when I invert the screen, and the other thing is just graphical.
bump:

Well, I have the fighting engine just about done! :w00t:

Anyways, just a quick question: Does the delay and graphics suffice for each person, you and enemy? Tell me what you think! (I want ideas )

And I really need to make a bug report for those display issues.
Unicorn wrote:
Does the delay and graphics suffice for each person, you and enemy?
It looks fine to me. If you spam the [2nd] key, does that guarantee that you'll win the battle? Or is there a chance of losing?
Nope, once you press 2nd, you attack, then the enemy attacks, and vice versa. The way things are working right now, if you have 100 health, you can take about 7-10 hits before you die. The enemy health is also a lot less, that battle was against a tier 4 or 5 enemy.

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» Goto page Previous  1, 2, 3
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum