News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Feeling fruity

Started by micky4fun, January 04, 2009, 05:18:18 PM

Previous topic - Next topic

micky4fun

Hi all

yep its me back again with another effort , well back still hurting , but not quite as bad , my fingers were getting stiff so i thought ile better start something
well heres a screenshot of my fruit machine im working on at the moment (dumpafruit) , reels spin and stop at the moment , thats about it , im trying out a few new commands to me , a type list command to spin reels , but aint suss out to find out what fruit is where with this command so using ClosestSpriteToPoint to find out what fruit is where , i have not done win lines yet , or fruit dropper
ile update as soon as possible , back permitting.

mick :)

kevin


Nice fruit art, where'd ya snag that ? :)

reno

Continue the good work micky4fun. It will be a TETRIS clone ?

By the way, I prefer now coding using only Arrays instead of Types... very simpler for me :P
More games ? Go to my website :)
http://www.thereeteam.com/

micky4fun

Hi all

Quotewhere'd ya snag that
, haha how did you know i snagged them ,ok i did from my local grocery store Google images.
QuoteIt will be a TETRIS clone
no its as a normal fruit machine but the fruit gets dumped by a dumper truck , a Tetris clone maybe a bit beyound me at the moment ,

mick :)

micky4fun

#4
Hi all

just a quick update to were i am at the moment ,

using window mode for time being may switch back to full screen later , depends what looks best when finished , anyway heres the game so far , lot more to do yet , winning lines , background graphics etc. This demo is in a loop , it will be one truck of fruit per spin.
also changing name to fruitfill

any comments welcome

mick :)

Download Attached

kevin


It looks good and all moves really well.  But I have to ask, just where on earth did you get the idea from ? 

micky4fun

Hi Kevin

Progressed a little further today , well i was going to do a fruit machine game , i thought ile try something a little different so i looked at your like to type listsand was very impressed by it , so i thought ile try using them with this program , not a great idea as its not easy to find out what sprite is in what column so i had to find another way of finding out what sprite is where , helped me learn some other commands , also in the type listdemo you did you used the cosRadiusand sinRadiuscommand for angles , as i never did this at school , its something im now learning ,
I thought if i had fruit coming from the top of screen it needed to be dumped onto the reels so the digger game into play.
got so many other ideas just bitting at the bit to do other stuff , but one thing at a time , so much trial and error and problem solving it all takes me ages

ile hopefully get game done soon , but loads to do still , winning lines and features etc ..

mick :)

Juha Kämäräinen

Will you implement some sort of gambling system to it?
Yeah nice fruits. Hope you finish it.
Check out my comic - Bujercon 1

reno

It's nice to see you in progress. I'm downloading it...
More games ? Go to my website :)
http://www.thereeteam.com/

micky4fun

hi

QuoteWill you implement some sort of gambling system to it?
,
yes im hoping to do so , how good that will be i dont know yet , im starting to calculate when a winning line comes up , think ive suss it now arter a load of false winning lines.

mick :)

reno

Good use of sprites. It's nice and  runs smoothly.

After the rotation of the "dumpster", what about the rotation of the wheels ? :)

And yes, the idea is original !

I've just missed something, are you coding with PB or PBFX ?
More games ? Go to my website :)
http://www.thereeteam.com/

micky4fun

#11
Hi all

QuoteAfter the rotation of the "dumpster", what about the rotation of the wheels ?
yes hopefully do that towards the end of tiding up game
ive been sitting here all night letting it spin to check my calulations for winning lines is right , after 2000+ spins think it ok , lol
QuoteAnd yes, the idea is original !
well 2 or 3 ideas came up , another was a tree a top of screen , tree gets shaken and fruit fall out onto reels
but went with this instead as i had to work out how to do trucks as that was harder.
once all win lines have been finished and fully tested i have to think of a feature when you win , i have a few ideas , but another screen will have to come into play i think as no room on main screen , i think game is still 3 or 4 weeks away as loads of ideas and things to try , wether i can get them into this game is another matter.
QuoteI've just missed something, are you coding with PB or PBFX ?
im using PB , i will try PBFX when im comfortable with PB

thanks to all for coments on game , highly appricated
mick :)

kevin

#12
 Hey Mick,

QuoteProgressed a little further today , well i was going to do a fruit machine game , i thought ile try something a little different so i looked at your like to type listsand was very impressed by it , so i thought ile try using them with this program , not a great idea as its not easy to find out what sprite is in what column so i had to find another way of finding out what sprite is where , helped me learn some other commands , also in the type listdemo you did you used the cosRadiusand sinRadiuscommand for angles , as i never did this at school , its something im now learning ,

     Without seeing your implementation, it's difficult to get an clear idea of how you're tacking everything together.    Regardless of if you use a list/array/pointers to manage the game characters though,  one common issue that will pop up (time and time again)  is how do we reference a sprite/image/shape etc back to it's parent structure ?.  Such as the type that holds all the properties about this game character.. Which commonly occurs when  we resolve collisions between sprites.  Since the Sprite collision commands return the sprite indexes and not the pointer (location in memory) of the type that owns (conceptually) this sprite. 

    There's a few ways to address such problems,  the most obvious is to write a  search loop to run through and find the type that owns the sprite in this list/array.  Which is a perfectly acceptable solution in most cases.   Another method is that we store a pointer or index inside the sprites local data.  This pointer would then be used to basically look up the owner of the sprite directly.  A lot quicker if you lots of characters on screen.  So if a collision occurs, we peek the sprites local data and can easily find the type that owns it. 

    As for the movement stuff,  look up polar coordinates.  Really handy in game making stuff.    Here's another example of moving in any direction from a origin point.



; run this program really slow so we can see it
Setfps 10 


// how fast should it move
Speed =5


; run the whole thing in a loop..
Do

// Pick angle to move in at random (0 to 360 degrees)
Angle#=rnd(360)

// Plot the distance we're moving from the origin point. 
For Distance=0 to 200 step speed

// clear the screen
Cls 0

// calc the X/y# coordinate from the origin.
x#=400+cos(angle#)*Distance
y#=300+sin(angle#)*Distance

// draw the origin point
centertext 400,300-20,"Start POint"
circlec 400,300,5,true,rgb(255,0,0)

print "Angle:"+str$(Angle#)+" Degrees"

Circle x#,y#,5,true
centertext x#,y#-25,"Distance From Start"+Str$(Distance)

Sync
next





    Check out the movement path library example    You could probably just store the objects movement as paths even.  But that's prolly overkill 



micky4fun

#13
Hi all

Thanks for the code Kevin and polar coordinates tip for movement , ile have a muck around with this after this game is finished , this is just a quick update on progress ,
well did a lot of experimenting with one thing and the other so that has held me back a little , anyway heres a demo to where i am now , all win lines done , pays on 1st symbols for left to right as well as right to left as well as all 5 symbols on a reel , you have 3 winning lines , at the moment only pays 1 winning line if more than 1 comes up , but this will be sorted out later ,
going to start features tomorrow when i get back to project also some tiding up to do with graphics still as well. sorry forgot press left mouse on screen to add 100 credits.

mick :)

kevin


Yep, still excellent.   You've added lots of polish in thise version.  It's funny how those little extra details can really set something of.