Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Adriweb on April 26, 2011, 06:17:51 am

Title: [WIP] TI-Basket
Post by: Adriweb on April 26, 2011, 06:17:51 am
B'jour tout le monde !
Hi everyone !

Just a little topic to announce the release of a game I'm making in LUA : TI-Basket (by the way, if you have a better name, please tell me :P)

The game features two play modes : "Normal" and "Hardcore"

The normal mode is just a basic thing : you have a non-moving target, and you have to change the power and the angle in order to reach the target (the basket)
The hardcore mode is more interesting : it's the same, but with wind (in x and y coords), and a moving target !  (believe me, the wind really changes the physics diff eqs :P)

Here are some screenshots ...

(http://i27.servimg.com/u/f27/11/67/13/30/captur14.jpg)(http://i.imgur.com/11GD0.jpg)(http://i.imgur.com/lq4U6.jpg)(http://i.imgur.com/VNtg1.jpg)

So, if you have some other ideas for the while game in general, please comment here :)

I thought about adding a "Time Attack" mode when the player has only a limited time to shoot, but from the programming point of view, I'm already using a timer for the trajectory display, so I don't know how to do that , since we can only use one timer at a time .... I'll see if I can find a way to get around this :/

Video :


(the game is slower on-calc than on this video, which is better anyway)

EDIT : Download and source code here : https://github.com/adriweb/TI-Basket (https://github.com/adriweb/TI-Basket)
Title: Re: [WIP] TI-Basket
Post by: Jim Bauwens on April 26, 2011, 07:54:43 am
Nice, can't wait to try it :)

Looks real awesome!
Title: Re: [WIP] TI-Basket
Post by: jnesselr on April 26, 2011, 07:59:26 am
Wait, the TI-nspire CX is out?
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 26, 2011, 08:01:54 am
@jimbauwens : Thanks ! :)

@graphmastur : http://www.google.com/search?q=ti+nspire+cx&tbs=shop%3A1&aq=f (http://www.google.com/search?q=ti+nspire+cx&tbs=shop%3A1&aq=f) :P

but all my screenshots were taken in the Computer Software
Title: Re: [WIP] TI-Basket
Post by: JosJuice on April 26, 2011, 08:07:26 am
Wait, the TI-nspire CX is out?
TI posted a picture on their Facebook page of the first Nspire CX calcs leaving the factory very recently, so they aren't out right yet, but they'll be soon.
Title: Re: [WIP] TI-Basket
Post by: ruler501 on April 26, 2011, 08:29:28 am
nBasketball?

This looks good.
I wonder if the CX's released have the new OS or not.
Title: Re: [WIP] TI-Basket
Post by: JosJuice on April 26, 2011, 08:35:48 am
I wonder if the CX's released have the new OS or not.
If you mean 3.0, then yes. OSes older than 3.0 don't even work on the CX.
Title: Re: [WIP] TI-Basket
Post by: ruler501 on April 26, 2011, 08:37:07 am
I meant the one they're releasing to fix 3.0
Title: Re: [WIP] TI-Basket
Post by: JosJuice on April 26, 2011, 08:38:46 am
I meant the one they're releasing to fix 3.0
That OS is not released yet, so I doubt it...
Title: Re: [WIP] TI-Basket
Post by: Munchor on April 26, 2011, 02:25:27 pm
They'll release it in May I think.

In the meanwhile, Adriweb, this is a good game, I'd really like an animated screenshot of it though :D Good luck with it.
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 26, 2011, 03:04:02 pm
I think TI released the CX already, but only online, kinda like what Casio did with the Prizm. When the Prizm came out online, it took almost 2 months before it appears in stores.

Also nice Adriweb, it would be nice if there were some graphics like an actual basket like in basket ball or maybe even a basket ball field. ;D
Title: Re: [WIP] TI-Basket
Post by: Stefan Bauwens on April 26, 2011, 03:04:11 pm
Looks nice! Good luck with this!

@Scout: He has a mp4 link in his post. So you can watchit in action.
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 26, 2011, 03:05:20 pm
Also nice Adriweb, it would be nice if there were some graphics like an actual basket like in basket ball or maybe even a basket ball field. ;D

Wow, this is actually exactly what I've been doing today :P
Well release as soon as it's ready :P
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 26, 2011, 03:08:00 pm
Cool to hear. Are you planning to add some time limit too, where you must score the highest amount of point in a certain amount of time?

Also it would be nice to host the MP4 on an american server like Mediafire.com, because on european servers it downloads at 30 KB/sec on my 3000 KB/sec connection.
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 26, 2011, 03:13:09 pm
Cool to hear. Are you planning to add some time limit too, where you must score the highest amount of point in a certain amount of time?

Also it would be nice to host the MP4 on an american server like Mediafire.com, because on european servers it downloads at 30 KB/sec on my 3000 KB/sec connection.
as I said in the post ... :P
Quote
I thought about adding a "Time Attack" mode when the player has only a limited time to shoot, but from the programming point of view, I'm already using a timer for the trajectory display, so I don't know how to do that , since we can only use one timer at a time .... I'll see if I can find a way to get around this :/

and here's the mediafire link : http://www.mediafire.com/?n82ld8bpll6lqc5 (http://www.mediafire.com/?n82ld8bpll6lqc5)
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 26, 2011, 03:14:29 pm
Ah ok I didn't see that bit. I hate long posts. I hope this isn't a language limitation x,.x
Title: Re: [WIP] TI-Basket
Post by: Sebasu on April 26, 2011, 10:48:15 pm
wow is a good game, reminds me of DOS game bangbang, do you think may be able to modify it to acemeje more to BangBang?, so you could play in a versus mode by two players or against the handheld, good luck with this game
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 27, 2011, 04:45:02 am
Thanks !

@DJ_O : I might have found something with the timers that could be used for the time-attack mode tho, I'll look more into that :D

@Sebasu That's a nice idea, maybe for a next version ? :)
Title: Re: [WIP] TI-Basket
Post by: renatose on April 27, 2011, 05:33:14 am
I loved that game, Bang Bang was awesome! It was really funny in "vs mode" and could also have a "level mode" with various diferent targets. ;)
Title: Re: [WIP] TI-Basket
Post by: Jim Bauwens on April 27, 2011, 03:02:12 pm
I just tried it, and it very nice!
Nice graphics and nice speed.
There are some little issues with text in the menu going out of the screen, but these are minor problems.

So good work Adriweb!
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 27, 2011, 03:32:34 pm
Here's a working version, with that bug (@jimbauwens) fixed :P

http://www.mediafire.com/?rbvap5pum3hxm6w (http://www.mediafire.com/?rbvap5pum3hxm6w) (or see attached)


(http://i.imgur.com/Vto6s.jpg) (http://i.imgur.com/hSOrr.jpg)
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 27, 2011, 03:58:48 pm
Nice, it looks better and better. :D By the way what do you use for the ground and circle? Is it an image or is it rectangle and circle routines? I am curious how large an image is in Lua...
Title: Re: [WIP] TI-Basket
Post by: Stefan Bauwens on April 27, 2011, 04:02:32 pm
I wonder if the ball could be moving...
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 27, 2011, 04:07:16 pm
Nice, it looks better and better. :D By the way what do you use for the ground and circle? Is it an image or is it rectangle and circle routines? I am curious how large an image is in Lua...
yes, just a rectangle and circle.
I had a nicer background but it wasn't rendering well on grayscale nspires so I changed it to a plain one.

this is what I do :

Code: [Select]
function drawBackground(gc)
gc:setColorRGB(255,150,80)
gc:fillRect(0,165,pww(),165)
gc:setColorRGB(255,255,255)
gc:drawArc(pww()*0.5-60,pwh()-30, 120,80,0,180)
end
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 27, 2011, 04:08:32 pm
Ah I see, this seems cool. I would probably need to check the wiki to figure out what pww and pwh are, though :P
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 27, 2011, 04:11:23 pm
Ah I see, this seems cool. I would probably need to check the wiki to figure out what pww and pwh are, though :P
oops, this is actually some functions I made :P (included in the BetterLuaAPI library I'm coding)

Code: [Select]
function pww()
return platform.window:width()
end

function pwh()
return platform.window:height()
end
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 27, 2011, 04:16:58 pm
Here's a video of it :P

(really small .mp4)

(see attached)
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 27, 2011, 04:23:22 pm
THis looks nice, it would be nice if the ball spinned when throwing it. :D
Title: Re: [WIP] TI-Basket
Post by: yunhua98 on April 27, 2011, 04:45:30 pm
nice!  this is kinda like the basketball program I made just to test physics.  :P

I might post it here later.  ;)
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 27, 2011, 07:27:16 pm
Oh nice, is it for the Nspire too?
Title: Re: [WIP] TI-Basket
Post by: Levak on April 27, 2011, 07:57:33 pm
THis looks nice, it would be nice if the ball spinned when throwing it. :D

it is a TI.image ... thus..
Title: Re: [WIP] TI-Basket
Post by: DJ Omnimaga on April 27, 2011, 09:26:58 pm
Well I meant more like an animation of the ball spinning :P (made of multiple images)
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 28, 2011, 05:38:36 am
Well I meant more like an animation of the ball spinning :P (made of multiple images)
The images are huge tho :P
I'll look more into that, but I think I'm going to draw the ball programmatically .... then it could be easier
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 28, 2011, 02:33:01 pm
New version !

Including a better engine overall
Optimizations
Scoring system  :thumbsup:
Time-Attack mode  ;D
Secret Mode if you can discover it


PS : the time left shown in the screenshot is not showing the right value (don't worry, there is no bug on-calc) The max time is 60 secs
Title: Re: [WIP] TI-Basket
Post by: Munchor on April 28, 2011, 02:33:59 pm
Woah Adriweb, that's lookigng pretty cool, new graphics, a menu, really cool. Nice job.
Title: Re: [WIP] TI-Basket
Post by: Adriweb on April 28, 2011, 03:33:10 pm
Thanks !

I'll submit it to the archives :)
Title: TI-Basket
Post by: Adriweb on April 28, 2011, 10:50:24 pm
TI-Basket



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=661

The game features three play modes : "Normal", "Hardcore", and "Time-Attack"

The normal mode is just a basic thing : you have a non-moving target, and you have to change the power and the angle in order to reach the target (the basket)

The hardcore mode is more interesting : it's the same, but with wind (in x and y coords), and a moving target ! (believe me, the wind really changes the physics diff eqs )

The Time-Attack is like the Normal mode but you only have 60 seconds to score as much as possible, good luck !

Source Code Included in the .zip


Screenshots :

(http://i.imgur.com/skNdo.jpg) (http://i.imgur.com/3VRx2.jpg)
Title: Re: [WIP] TI-Basket
Post by: Stefan Bauwens on April 29, 2011, 03:44:21 am
Congratulations!
Title: Re: [WIP] TI-Basket
Post by: renatose on April 29, 2011, 07:07:35 am
I'll try this right now and give feedback later ;)
Title: Re: [WIP] TI-Basket
Post by: ruler501 on May 11, 2011, 03:22:40 am
When I played this on my calculator it froze as soon as I made it in on Normal(I was testing it) how do you keep going after you win?
Title: Re: [WIP] TI-Basket
Post by: Jim Bauwens on May 11, 2011, 04:10:34 am
I think you have to press the arrow keys, to continue.
Title: Re: [WIP] TI-Basket
Post by: ruler501 on May 11, 2011, 04:11:42 am
I downgraded to 2.0.1 for now so I can run OSLauncher and CAS so I'll go back to testing this some other time.
Title: Re: [WIP] TI-Basket
Post by: renatose on May 11, 2011, 04:56:57 am
it stopped after the first launch in normal mode.