Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: trevmeister66 on February 17, 2009, 06:56:47 pm

Title: Side Project: Super Slots
Post by: trevmeister66 on February 17, 2009, 06:56:47 pm
While I'm learning all the ins and outs of Celtic III, I thought I would make a little slots program.

Here's what I have so far:
(http://www.freeimagehosting.net/uploads/5657508e08.gif)

I need more sprites (look here (http://ourl.ca/3179)). I also need to get figure out why real(9 doesn't work..

Also, does anybody know if I can randomize a list. I want it to keep the same numbers, just different order. I also need to figure out a way to make the 3 different wheels go at different speeds, but I'll work on that later.
Title: Re: Super Slots
Post by: DJ Omnimaga on February 17, 2009, 10:02:11 pm
interesting, I assume you display two pictures, one with white in front of a black pic as kind of masking in front of the slot items, right? My suggestion would be to make them scroll at 2 or 4 pixels everytime, so it's not too easy to stop them at the right time
Title: Re: Super Slots
Post by: trevmeister66 on February 17, 2009, 11:22:44 pm
interesting, I assume you display two pictures, one with white in front of a black pic as kind of masking in front of the slot items, right? My suggestion would be to make them scroll at 2 or 4 pixels everytime, so it's not too easy to stop them at the right time
Yeah I'm just trying to get them to work right now, then I'll change the speeds. Actually I have it working a little differently than that.

First, I load the 3 "wheels" at the top of the screen. Then I scroll it down, and save the pic (none of this is displayed). Then I create a white box above and below the wheel picture to get rid of all of the excess stuff. Then I just OR the main pic on top of it all. To do it again I xOR the main pic so it gets rid of it, then start over. Kind of complicated, but it seemed the best way to do it. Right now it moves all 3 wheels at the same time because I'm saving them all to the same pic, but I'm going to start saving them to different pics and scrolling them so I can get varying speeds.
Title: Re: Super Slots
Post by: metagross111 on February 17, 2009, 11:41:26 pm
it is sort of complicated. good luck with it.
Title: Re: Super Slots
Post by: trevmeister66 on February 18, 2009, 12:02:52 am
Lol yeah, but it works. If I can't get the real(9 function to work with Celtic III, I'm going to have to switch to xLIB :/
Title: Re: Super Slots
Post by: metagross111 on February 18, 2009, 12:33:57 am
hmm, well, that is odd. It sounds like you have a logic error. If you don't think so, substitute the TOGGLEPIC command, "identity(1"
Title: Re: Super Slots
Post by: trevmeister66 on February 18, 2009, 12:39:49 am
hmm, well, that is odd. It sounds like you have a logic error. If you don't think so, substitute the TOGGLEPIC command, "identity(1"
Hmm alright I'll try giving that a shot.
Title: Re: Super Slots
Post by: trevmeister66 on February 18, 2009, 01:34:18 am
EDIT: I removed the code..it didn't look good
You also need Pic9, which is the main pic, so I'll upload it really quick

<a href=http://www.filedropper.com/superslots>Link for program</a>
Title: Re: Super Slots
Post by: kalan_vod on February 18, 2009, 11:57:54 pm
I would do as kevin said and increase the scroll speed, but also slots have the reals stop at different intervals (ie, the first one stops then 2 spins later the second one etc..)
Title: Re: Super Slots
Post by: metagross111 on February 19, 2009, 12:09:40 am
it will be slightly complicated, yes....
Title: Re: Super Slots
Post by: trevmeister66 on February 19, 2009, 12:11:11 am
I would do as kevin said and increase the scroll speed, but also slots have the reals stop at different intervals (ie, the first one stops then 2 spins later the second one etc..)
Yeah that's what I want it to do, 1st stops, then 2nd and finally 3rd. I'm not gonna have user stopping, but I have to figure out a way to get the to scroll at different speeds.
Title: Re: Super Slots
Post by: metagross111 on February 19, 2009, 12:16:11 am
hmm......

this sounds like a really fun program i want to work on! but i'm too busy :(
Title: Re: Super Slots
Post by: trevmeister66 on February 19, 2009, 12:27:18 am
heh well once you finish pokemon I'll give you the source and you can have at it.
Title: Re: Super Slots
Post by: metagross111 on February 19, 2009, 12:42:53 am
"finish pokemon"

you, sir, are a riot.
Title: Re: Super Slots
Post by: DJ Omnimaga on February 19, 2009, 12:59:43 am
I do hope you finish :P

Else the Pokemon thread is gonna turn like the Zelda thread on Revsoft. I think posting Zelda on Digg and popular gamer blogs finally didn't helped much XD
Title: Re: Super Slots
Post by: metagross111 on February 19, 2009, 01:10:34 am
well i will. but he talks about it as if it was next week or something :P
Title: Re: Super Slots
Post by: trevmeister66 on February 19, 2009, 01:21:01 am
well i will. but he talks about it as if it was next week or something :P
You mean you won't be done next week? what?!?!
Title: Re: Side Project: Super Slots
Post by: simplethinker on February 21, 2009, 07:42:19 pm
It looks great so far ;D

Quote
Also, does anybody know if I can randomize a list. I want it to keep the same numbers, just different order.
With an n=N-element list (let's say L1):
Code: [Select]
:rand(N→L2
:SortA(L2,L1
will randomize L1.
Title: Re: Side Project: Super Slots
Post by: metagross111 on February 21, 2009, 08:55:39 pm
wait, so how does that work?
Title: Re: Side Project: Super Slots
Post by: simplethinker on February 21, 2009, 09:12:22 pm
wait, so how does that work?
rand(N) will create an N-element long list of random numbers, and since the random numbers are 10 (14?) digits long there's virtually no chance of having non-distinct numbers.  SortA(L2,L1) will sort L1 according to the order in L2 and store the result in L1.  For example, if you had L1={1,2,3} and L2={.42,.21,.99}, then SortA(L2,L1) would return L1={2,1,3}.
Title: Re: Side Project: Super Slots
Post by: metagross111 on February 21, 2009, 09:48:38 pm
that is pretty damned cool! it renders my card shuffler retarded, too! XD
Title: Re: Side Project: Super Slots
Post by: simplethinker on February 21, 2009, 09:51:45 pm
that is pretty damned cool! it renders my card shuffler retarded, too! XD
I aim to make others obsolete ::)
Title: Re: Side Project: Super Slots
Post by: metagross111 on February 21, 2009, 09:54:31 pm
STFU NOOB I HAVE TEH POKEMONZ!
Title: Re: Side Project: Super Slots
Post by: trevmeister66 on February 22, 2009, 09:44:57 am
wait, so how does that work?
rand(N) will create an N-element long list of random numbers, and since the random numbers are 10 (14?) digits long there's virtually no chance of having non-distinct numbers.  SortA(L2,L1) will sort L1 according to the order in L2 and store the result in L1.  For example, if you had L1={1,2,3} and L2={.42,.21,.99}, then SortA(L2,L1) would return L1={2,1,3}.
I never knew that's how it worked.. Nice work. I've seen this used for card shuffler's, I just never knew where it came from (and I forgot how to do it before I asked this question :P)
Title: Re: Side Project: Super Slots
Post by: trevmeister66 on February 24, 2009, 10:47:59 am
Well seeing as how this isn't really progressing, no matter what I try, I think I'm going to put this on hold or even drop it all together. I started it to get more familiar with Celtic III, so instead of using this to learn Celtic, I've started a different side project. I'll post info later about it.
Title: Re: Side Project: Super Slots
Post by: DJ Omnimaga on February 24, 2009, 12:51:40 pm
I'm sorry to hear :(

But I hope you continue your other projects though, this would suck if they died :(
Title: Re: Side Project: Super Slots
Post by: simplethinker on February 24, 2009, 12:56:06 pm
Sorry to hear that you're dropping this :(  Breaks are a great way to get out of a slump, so when you finish the other project you might want to reconsider picking this back up again.

Good luck ;D
Title: Re: Side Project: Super Slots
Post by: trevmeister66 on February 24, 2009, 01:01:52 pm
I'm sorry to hear :(

But I hope you continue your other projects though, this would suck if they died :(
I'll definitely continue my other stuff. This just didn't work quite like I thought it would.

Sorry to hear that you're dropping this :(  Breaks are a great way to get out of a slump, so when you finish the other project you might want to reconsider picking this back up again.

Good luck ;D
Yeah maybe I'll learn something that'll allow me to do what I want to do.Thanks!
Title: Re: Side Project: Super Slots
Post by: kalan_vod on February 24, 2009, 05:11:34 pm
It would be cool to see a great casino game (like zCasino, but with more games), hope you get back to this one day..