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 - pianoman

Pages: 1 ... 12 13 [14] 15 16 ... 32
196
Miscellaneous / Re: Userbars: Do you make any?
« on: July 15, 2011, 01:45:36 pm »
I just made my first gimp userbar!

197
Lua / Re: Sorting tables
« on: July 15, 2011, 01:08:27 pm »
Interesting... could be very useful.
Thanks, ephan!

198
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!

199
Lua / Re: What's wrong with my code???
« on: July 15, 2011, 12:42:16 pm »
Sorry for the delay in the reply.
Jim, thanks for the advice, I'm working on doing that. :)
No, this isn't for the contest. I'm working on an RPG for the contest, although I may have to switch to a puzzle game... I'm running out of plot ideas. :P

200
Introduce Yourself! / Re: Hi everyone, I'm new and way lost lol
« on: July 15, 2011, 12:38:36 pm »
(As someone who's developing one right now, let me tell you that RPGs are not for the faint of heart. Good luck! :P )
How true.

201
TI-Nspire / Re: [Lua] RayCaster
« on: July 15, 2011, 12:37:44 pm »
Changing the subject... :P
The map looks really great, Chockosta.
I'm glad you're on our side, not TI's. [/feeble attempt at humor]

202
Introduce Yourself! / Re: Hi everyone, I'm new and way lost lol
« on: July 15, 2011, 12:21:53 pm »
Hi, welcome ot Omnimaga!
Wow, I haven't heard of many people getting a calculator to play games on it :P
If you go with the nspire, I would suggest learning nspire BASIC. It's really easy to learn and offers a easy stepping stone to Lua (also easy to learn).
Have fun, and here are your peanuts!

203
Introduce Yourself! / Re: Hey, I'm Ti-Programmer
« on: July 13, 2011, 02:03:26 pm »
Hi! Welcome to Omnimaga!
If you're looking for lua help, this is definitely a great place to go!

204
Lua / Re: What's wrong with my code???
« on: July 13, 2011, 01:23:45 pm »
Yup, I even talked to Goplat, followed his instructions, didn't work.

205
Site Feedback and Questions / Re: German section in Omnimaga
« on: July 13, 2011, 12:35:27 pm »
We're getting a lot of German programmers suddenly. I don't think activity would be a problem. :P

206
Lua / Re: What's wrong with my code???
« on: July 13, 2011, 12:23:31 pm »
print() outputs strings to the console on nspire_emu.
That's a problem... I can't get nspire_emu to work on my computer w/ OS 3.0.1.
It just gives me the screen it gave the bricked calcs.

207
Lua / Re: What's wrong with my code???
« on: July 13, 2011, 12:19:38 pm »
First try to locate the problem by removing the code which doesn't contribue to it.
Use a set of calls to print() to identify precisely what's wrong with the program flow. Tell us what you expected to be printed, and what is actually printed.
You will probably get more help with this.
Print? This is for the nspire...
I'll try removing the unnecessary stuff, but at this point, there isn't much of that.

208
Site Feedback and Questions / Re: German section in Omnimaga
« on: July 13, 2011, 12:12:52 pm »
If there'll be a german section, more german programmers will join Omnimaga.
And if more german programmers will join omnimaga, We'll need the german section.
:D
Seriously, though, not a bad idea.

209
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.

210
TI-Nspire / Re: Pacman Lua Levels Needed
« on: July 12, 2011, 12:52:09 pm »
Whoa, those levels are way too big.
I was thinking more along the lines of the levels in one of the Pacman games for the 84 on ticalc.org

Pages: 1 ... 12 13 [14] 15 16 ... 32