Author Topic: The animal crossing team.  (Read 14902 times)

0 Members and 1 Guest are viewing this topic.

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: The animal crossing team.
« Reply #45 on: October 16, 2012, 01:29:22 pm »
Code: [Select]
      temp = string.sub(Map[i],ii,ii)
      if table[temp] then   -- Checks if key exists in the table before painting
        gc:drawImage(table[temp], BlockSize*(ii-1), BlockSize*(i-1))
      end
First he defines temp as the token you have on your map. This would be fine, since there should always be something on the map. But imagine there is a small mistake, and there isn't anything in the map or you're accidentally trying to paint outside of the map (e.g. row 5 when there are only 4 rows). Then temp doesn't exist. If you'd remove the if statement(trying to paint the tile directly) and temp all of a sudden doesn't exist, it will crash the entire program. The if statement prevents this. If temp exists, then it draws the accompanying image. If it doesn't, it skips to the next thing to do.
Table, I think, you should replace with either object or frontObject.

I hope I explained it correctly, correct me if I'm wrong someone :)

Some people need a high five in the face... with a chair.
~EC

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: The animal crossing team.
« Reply #46 on: October 16, 2012, 01:29:30 pm »
if table[temp] means : if table[temp] ~= nil. An image is stored there.
« Last Edit: October 16, 2012, 01:29:42 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: The animal crossing team.
« Reply #47 on: October 16, 2012, 01:50:10 pm »
I understand now, thanks.

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: The animal crossing team.
« Reply #48 on: October 28, 2012, 03:10:52 pm »
Good news, I have added Tom nook(Who looks like an owl).
Also sorry for the slow development.
And sorry for the double post.

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: The animal crossing team.
« Reply #49 on: November 02, 2012, 04:33:21 am »
Well as long as updates keep coming, I'm glad. I'd really like to see this project finished.

Some people need a high five in the face... with a chair.
~EC

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: The animal crossing team.
« Reply #50 on: November 17, 2012, 12:18:10 pm »
Sorry for the slow development this is just because I find LUA incredibly boring. I prefer C#. Sorry but I don't think this will ever be finished.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: The animal crossing team.
« Reply #51 on: November 17, 2012, 01:35:09 pm »
Sorry for the slow development this is just because I find LUA incredibly boring. I prefer C#. Sorry but I don't think this will ever be finished.

What's boring on it? If you know the language well enough, you can do awesome stuff with it.

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: The animal crossing team.
« Reply #52 on: November 17, 2012, 01:36:45 pm »
Well C# seems more speedy and stuff also I just got into using XNA and it is pretty awesome.

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55828
  • Rating: +3151/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: The animal crossing team.
« Reply #53 on: November 17, 2012, 02:36:43 pm »
Have you considered giving C a try? It would allow you to continue working on a TI-Nspire version as well as one for the computer.
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF



T-Shirt store | Reverbnation | Facebook | Youtube | Twitter | Spotify

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: The animal crossing team.
« Reply #54 on: November 17, 2012, 02:57:48 pm »
Yeah but MSYS didn't want to work.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: The animal crossing team.
« Reply #55 on: November 17, 2012, 03:26:32 pm »
You actually don't need to install MSYS anymore to develop for Ndless.
Did you try the latest standalone Ndless SDK that includes everything you need to edit, build et test your C programs?
Ndless.me with the finest TI-Nspire programs

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: The animal crossing team.
« Reply #56 on: November 17, 2012, 04:58:20 pm »
Thanks for that. Now all I have to do is learn how to use C for the calc

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3913
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: The animal crossing team.
« Reply #57 on: November 18, 2012, 06:11:03 am »
That's not too hard. C for the nspire is just like C for the computer, but you have other libraries and stuff. I think everything you need is in the SDK.
I'm not a nerd but I pretend:

Offline Augs

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 306
  • Rating: +30/-29
    • View Profile
Re: The animal crossing team.
« Reply #58 on: December 01, 2012, 08:01:53 am »
Minor update guys, but expect more frequent ones in the future



Added:
-Another guy
-Press tab to talk to the person in your sector

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3913
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: The animal crossing team.
« Reply #59 on: December 01, 2012, 08:03:37 am »
Nice :D
I'm not a nerd but I pretend: