Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Adriweb

Pages: 1 ... 100 101 [102] 103 104 ... 115
1516
TI-Nspire / Re: Pacman Nspire
« on: August 26, 2011, 05:46:30 am »
Do you draw them with geometric primitives?

Yes lol he did :

Code: [Select]
function drawghosts(gc)
gc:setColorRGB(255,0,0)
gc:fillArc(gonex,goney,blockwidth,blockwidth,0,180)
gc:fillPolygon({gonex,goney+blockwidth/2,gonex,goney+blockwidth,gonex+.2*blockwidth,goney+.8*blockwidth,gonex+.4*blockwidth,goney+blockwidth,gonex+.45*blockwidth,goney+blockwidth,gonex+.45*blockwidth,goney+.8*blockwidth,gonex+.55*blockwidth,goney+.8*blockwidth,gonex+.55*blockwidth,goney+blockwidth,gonex+.6*blockwidth,goney+blockwidth,gonex+.8*blockwidth,goney+.8*blockwidth,gonex+blockwidth,goney+blockwidth,gonex+blockwidth,goney+.5*blockwidth,gonex,goney+.5*blockwidth})
gc:setColorRGB(255,255,255)
gc:fillArc(gonex+.25*blockwidth,goney+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360)
gc:fillArc(gonex+.6*blockwidth,goney+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360)
gc:setColorRGB(0,0,255)
gc:fillArc(gonex+.38*blockwidth,goney+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360)
gc:fillArc(gonex+.75*blockwidth,goney+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360)
gc:setColorRGB(0,255,255)
gc:fillArc(gtwox,gtwoy,blockwidth,blockwidth,0,180)
gc:fillPolygon({gtwox,gtwoy+blockwidth/2,gtwox,gtwoy+blockwidth,gtwox+.2*blockwidth,gtwoy+.8*blockwidth,gtwox+.4*blockwidth,gtwoy+blockwidth,gtwox+.45*blockwidth,gtwoy+blockwidth,gtwox+.45*blockwidth,gtwoy+.8*blockwidth,gtwox+.55*blockwidth,gtwoy+.8*blockwidth,gtwox+.55*blockwidth,gtwoy+blockwidth,gtwox+.6*blockwidth,gtwoy+blockwidth,gtwox+.8*blockwidth,gtwoy+.8*blockwidth,gtwox+blockwidth,gtwoy+blockwidth,gtwox+blockwidth,gtwoy+.5*blockwidth,gtwox,gtwoy+.5*blockwidth})
gc:setColorRGB(255,255,255)
gc:fillArc(gtwox+.25*blockwidth,gtwoy+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360)
gc:fillArc(gtwox+.6*blockwidth,gtwoy+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360)
gc:setColorRGB(0,0,255)
gc:fillArc(gtwox+.38*blockwidth,gtwoy+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360)
gc:fillArc(gtwox+.75*blockwidth,gtwoy+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360)
gc:setColorRGB(255,128,255)
gc:fillArc(gthreex,gthreey,blockwidth,blockwidth,0,180)
gc:fillPolygon({gthreex,gthreey+blockwidth/2,gthreex,gthreey+blockwidth,gthreex+.2*blockwidth,gthreey+.8*blockwidth,gthreex+.4*blockwidth,gthreey+blockwidth,gthreex+.45*blockwidth,gthreey+blockwidth,gthreex+.45*blockwidth,gthreey+.8*blockwidth,gthreex+.55*blockwidth,gthreey+.8*blockwidth,gthreex+.55*blockwidth,gthreey+blockwidth,gthreex+.6*blockwidth,gthreey+blockwidth,gthreex+.8*blockwidth,gthreey+.8*blockwidth,gthreex+blockwidth,gthreey+blockwidth,gthreex+blockwidth,gthreey+.5*blockwidth,gthreex,gthreey+.5*blockwidth})
gc:setColorRGB(255,255,255)
gc:fillArc(gthreex+.25*blockwidth,gthreey+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360)
gc:fillArc(gthreex+.6*blockwidth,gthreey+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360)
gc:setColorRGB(0,0,255)
gc:fillArc(gthreex+.38*blockwidth,gthreey+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360)
gc:fillArc(gthreex+.75*blockwidth,gthreey+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360)
end

However, looking at what the final shape of the ghost looks like, I think I would have done the drawing differently :
 - draw the top semi-circle
 - draw a square under it, for the bottom part,
 - draw white triangles at the very bottom

 ^ that's all

1517
Funny, I had the same idea :-)

I'll definitely make a robot of some sort soon, when I have my dock connector (maybe I'll make one maybe I'll do something else with some official cradle that I will dismantle.... :P)

1518
Lua / Re: toolpalette => ??
« on: August 25, 2011, 01:01:05 pm »
cool thanks ;)

1519
Lua / Re: Lua Classes and OOP Tutorial
« on: August 25, 2011, 10:44:31 am »
Thanks Extended.

I will try to make something up for the 2nd point.

About that 1st point, I understand your concern since I myself was not sure how to introduce it correctly. (the original tutorial was made by Levak, and I translated it).
I might make chapters and a Table of contents saying that some introductory points can be skipped.

1520
Lua / Lua Classes and OOP Tutorial
« on: August 25, 2011, 10:22:06 am »
Hey guys !

As you may or may not know, Inspired Lua had a nice tutorial about Classes and OOP in Lua for the Nspire, but it was not translated into English (only French was available).
This time is over and I'm proud to announce a complete tutorial in English :P

Here's the link : http://www.inspired-lua.org/2011/05/5-object-classes/

Please comment so we can improve the tutorial even more !

Thanks !

1521
Lua / Re: toolpalette => ??
« on: August 25, 2011, 07:54:39 am »
And the software creates a specific panel of your toolpalette inside the sidebar with all the other software functions :)

1522
Lua / Re: toolpalette => ??
« on: August 24, 2011, 04:13:56 pm »
We might want to clear that up just as a remainder, in the Inpsired-Lua wiki about that one....

1523
Lua / Re: Game: BreakOut (kinda like DX-Ball) ("Casse-Brique")
« on: August 24, 2011, 09:49:44 am »
All right, what DJ_O asked for is now implemented.

And I added the game logo :



:-D

1524
Lua / Re: Game: BreakOut (kinda like DX-Ball) ("Casse-Brique")
« on: August 24, 2011, 05:50:29 am »
THis is nice. As suggested on IRC' however, you should maybe increase the movement speed by like 4 pixels intervals though and make the touchpad controls an option, so they don't get in the way when you decide to use d-pad ones.

Also maybe some background images? :D (a lot of the Nspire Lua games usually looks simple compared to Bobby Carrot for example)

Thanks for the comments.

By the way, I'm not saying anything here, but the next version of the OS, which will have much more improved Lua stuff, will have some things that would allow the development of this game (this kind of game I'd say) faster, smoother for the end-user, and probably more memory-efficient...
That's vague, yes, but I'm forced to use the 3.0 Lua API when I know there are some great additions that could be great time-savers.... arg :P

1525
Lua / Game: BreakOut (kinda like DX-Ball) ("Casse-Brique")
« on: August 23, 2011, 05:19:52 pm »
Hey guys...

For the Nspire contest entry few days ago, I submitted a very early (and buggy, then) version of the game engine that now powers my 90% finished BreakOut Game (like DX-Ball), (a "Casse-Brique" in french).

here are some screenshots :



It's compatible with the document player.

Video :


- The levels are for now randomly generated.
- The text on the top left part is just for debugging right now, and bonuses stats will be in the sidebar.

Controlling the paddle is either via moving the cursor (which means you can control it with the mouse if you're playing it on the document player or on the software), or the arrows.

This game is fully open-source, and you can find it all on GitHub : https://github.com/adriweb/Nspire-BreakOut/blob/master/BreakOut.lua

Download the game here (right click -> save target)

You can play it online here (but it won't be the latest version) : http://tinyurl.com/3uhc4p8 (TI's Document Player ; might not work for a long time since the .tns is on a temp directory)

1526
Other / Re: FAIL from my school
« on: August 23, 2011, 04:20:06 pm »
Lulz 16.0 To ;)

1527
Other Calculators / Re: Just bought a TI-Nspire CX CAS, came with 3.0.2
« on: August 23, 2011, 04:19:20 pm »
Lua is a programming language (see http://www.inspired-lua.org) and TI made it available on their Nspire with OS 3.0+.
You can do any type of program with this language  (games, educational stuff, utilities etc.).

You can find some Lua programs here, on ticalc.org etc.

1528
TI-Nspire / Re: Pacman Lua
« on: August 23, 2011, 01:03:21 pm »
It's awesome, congratulations ! :)

1529
Lua / Re: Lua Q&A
« on: August 23, 2011, 12:48:57 pm »
In that case, yep, the # is a good idea, but watch out with tables ! (for key/value tables the count is not what we expect)

1530
Lua / Re: Lua Q&A
« on: August 23, 2011, 11:30:18 am »
While doing some ... exploring, I found a __gc() function in the 'val' table, and called that with the table as an arguments, and then my calculator crashed :)
Yep, I wrote that on HackSpire some time ago when we didn't have inspired-lua yet.



and for HOMER-16 :

Code: [Select]
msg = ""

function on.paint(gc)
  gc:drawString(msg, 10, 10, "top")
end

function on.char(ch)
  msg = ch
  platform.window:invalidate()
end

function on.enterKey()
  msg = ""
  platform.window:invalidate()
end

Pages: 1 ... 100 101 [102] 103 104 ... 115