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.


Topics - pianoman

Pages: [1] 2
1
TI-Nspire / Lua Flashcards
« on: September 13, 2011, 11:17:14 pm »
I thought I'd make this as a study tool.
This one shouldn't be too hard to make... I hope :)

2
Miscellaneous / Why my projects may not be making much progress
« on: September 13, 2011, 11:14:26 pm »
Hi everyone!
I have just been commissioned by my school to create a math program (with password protection, formulas, etc) that may aid us in math team. I probably shouldn't be telling you guys this, but oh well. :P
Unfortunately, I'll be spending time on this at the expense of my other programs, and, with school and band (:w00t:), I may not have much time to work on those.
I'm just letting you guys know about this so that you don't think that I've lost interest in coding/Omni- don't worry, I haven't.
Thanks!

P.S.- I'll try to get permission to load the source code here eventually, but I'm not too optimistic about that :(

3
Lua / Exact Lua
« on: September 12, 2011, 06:26:28 pm »
I just realized that Lua doesn't give exact answers, only approximations.
Can you guys think of a way to get it to display exact answers?

4
TI-Nspire / Lua Monopoly
« on: August 31, 2011, 09:34:50 pm »
Hi again!
After the 10-hour-per-day-for-10-days marathon I pulled to get Pacman released before my school started (which I got out the day before we started), I decided to take a little break from major projects for a bit, but I couldn't stay away.
After struggling to come up with a new project, I finally settled on Monopoly as my newest project in Lua for the Nspire.
I have a 3-day weekend coming up, so I'll get a good amount of time to work on this in the near future.
Thanks!

5
Miscellaneous / Great Books
« on: August 27, 2011, 04:21:39 pm »
I was just wondering what kinds of books you guys like, so I made this thread.
For my part, I really love the books Catch-22*, by Joseph Heller, and Flyboys*, by James Bradley.
Do you guys have any suggestions?

*Meant for mature audiences

6
Lua / Getting info from the local calc with Lua
« on: August 17, 2011, 11:24:28 pm »
Is there a way to get data such as the battey status, language, serial number, etc from the local calculator using Lua?
Its not for a particular game or program, I'm just curious.
Thank you very much!

7
General Discussion / Billy Joel's best
« on: August 02, 2011, 03:10:05 pm »
Here is the place to post your favorite Billy Joel songs!

My three favorites:

(Obviously :))




8
Lua / Permission needed to write Lua Tutorials
« on: July 29, 2011, 01:23:58 pm »
All right, I admit, the title is a bit misleading. Sue me (just kidding, please don't) :P
Anyways, I was planning on writing a series of Lua tutorials to help teach  beginners Lua through code from actual games and other programs that had been released, because that is something that I found to be extremely helpful.
However, I figured it would probably be a good idea to get permission from everyone before I start using your code.
If you have any objections in general to me using your code, please let me know via PM or a post on this thread.
I will also post here for usage of specific programs, and I will also send you a PM.
Again, for that as well, please let me know ASAP if you would like me to not use your code.
Also, I may edit your code (adding tabs, moving things to new lines) to make it easier to read. Again, let me know if you would prefer I don't do this.
Don't worry, though- you will be appropriately credited in the acknowledgments, the actual tutorial, and the code itself.
Thank you!
EDIT: Please note that this is not the actual request for usage permission. I will PM with that.

9
Lua / How to save high scores in Lua
« on: July 29, 2011, 01:05:27 pm »
^^That
I tried document.markChanged(), but it didn't save anything.

10
Lua / Lua Classes
« on: July 29, 2011, 12:03:10 pm »
I tried reading the thing on inspired-lua.org, but google translate sucks, so I couldn't understand much.
Basically, what I'm asking boils down to three things: what are classes, how do you use them, and is there anything special you can do with them?
Thanks!

11
Lua / TI.IMAGE help
« on: July 26, 2011, 09:12:08 pm »
I had an idea for a utility for Nspire programmers, but to make it, i need to understand the image format.
So my question is this: if you have the location and colors of all the pixels in a picture, how do you convert it to a TI.IMAGE?
Thanks :)

12
TI-Nspire / Pianoman's Real Contest Entry
« on: July 26, 2011, 11:57:50 am »
I decided that for the Nspire game contest, I'll make a video poker game.
I actually intend to finish this one, and if I work around the clock, I think I can finish it in time for the contest.
Thanks!

13
Miscellaneous / Taking a Leave Of Absence from Nspire programming
« on: July 25, 2011, 11:43:39 am »
Hi guys!
I have some bad news. For some reason, TI's computer software as well as the Nspire Computer Link both went haywire on my computer at the same time (something about a connectivity library not starting), so I have no way to test any of my programs. As a result, I'm going to have to retire from Nspire programming for now. I'll try to get back up soon, but I can't promise I will be able to.
However, don't think I'm going away! I'm going to take this as an opportunity to learn ASM/Axe for the 84 (TI-Connect still works) and start releasing games for that soon.
If anyone can offer any help to fix my computer, that would be very much appreciated.
Thank you all for your support!

EDIT: Shoot. Could a mod move this to misc.?
EDIT2: Thanks.

14
Lua / Sorting tables
« on: July 15, 2011, 01:01:23 pm »
Hi again!
Just wondering, how do you use the sort feature in Lua for tables?
Thank you very much!

15
Lua / What's wrong with my code???
« on: July 13, 2011, 12:04:11 pm »
Hi, everyone!
I've been working on a Pacman game for the nspire in Lua, but I've encountered a major problem, and I have no idea what's wrong. :banghead:
The problem: I made a function wallcheck() to check if Pacman ran into a wall, which stops him from moving. It works fine when the script is first created, but as soon as I use an arrow, it completely ignores the wallcheck() function an proceeds to run through walls.
I've tried just about everything, to no avail. :mad:
Please help!
Here is the code for my game thus far.
Code: (Pacman Lua) [Select]
function on.enterKey()
maze={{0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0}}
leveldata={{4,4,1,50,50,50,6}}
mazewidth=leveldata[lev][1]
mazeheight=leveldata[lev][2]
move=leveldata[lev][3]
blockwidth=leveldata[lev][4]
pacx=leveldata[lev][5]
pacy=leveldata[lev][6]
gm=leveldata[lev][7]
dir=1
mouth=1
m=1
timer.start(.01)
end

function on.tabKey()
lev=1
on.enterKey()
end

function dirx()
if dir==1 then
return move
elseif dir==2 or dir==4 then
return 0
else
return 0-move
end
end

function diry()
if dir==4 then
return move
elseif dir==1 or dir==3 then
return 0
else
return 0-move
end
end

function wallcheck()
if dir==1 then
if maze[lev][gm+1]==0 then
return false
else
return true
end
elseif dir==2 then
if maze[lev][gm-mazewidth]==0 then
return false
else
return true
end
elseif dir==3 then
if maze[lev][gm-1]==0 then
return false
else
return true
end
elseif dir==4 then
if maze[lev][gm+mazewidth]==0 then
return false
else
return true
end
end
end

function gmchange()
if dir==1 then
gmchan=1
elseif dir==2 then
gmchan=0-mazewidth
elseif dir==3 then
gmchan=0-1
elseif dir==4 then
gmchan=mazewidth
end
end

on.tabKey()

function on.paint(gc)
for a=1, mazeheight do
for b=1, mazewidth do
local n=maze[lev][mazewidth*(a-1)+b]
if n==0 then
gc:fillRect(blockwidth*(b-1),blockwidth*(a-1),blockwidth,blockwidth)
end
end
end
gc:fillArc(pacx,pacy,blockwidth,blockwidth,45,315+45*mouth)
end

function on.timer()
if m~=blockwidth then
pacx=pacx+dirx()
pacy=pacy+diry()
m=m+1
elseif m==blockwidth then
gmchange()
gm=gm+gmchan
if wdir~=0 then
dir=wdir
wdir=0
end
if wallcheck() then
pacx=pacx+dirx()
pacy=pacy+diry()
m=1
end
end
mouth=0-mouth
platform.window:invalidate()
end

function on.arrowKey(key)
if key=="left" then
if m~=blockwidth then
wdir=3
else
dir=3
end
elseif key=="right" then
if m~=blockwidth then
wdir=1
else
dir=1
end
elseif key=="up" then
if m~=blockwidth then
wdir=2
else
dir=2
end
elseif key=="down" then
if m~=blockwidth then
wdir=4
else
dir=4
end
end
platform.window:invalidate()
end
EDIT: Removed things that do not immediately pertain to the problem.

Pages: [1] 2