Author Topic: Eat Nethams Lua Edition  (Read 6312 times)

0 Members and 2 Guests are viewing this topic.

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Eat Nethams Lua Edition
« on: January 02, 2013, 11:05:53 am »
My first game in Lua has been released :D
You control a lobster hungry monster omnom (for which I really need a better sprite :P) who must stop the lobster army from invading his calculator :) It has an animated title screen and lots of lobsters.

Screenshots and tns attached below :)

Controls:
Movement: left/right or 4/6
Eat lobster: automatically :P
Reset: ESC
Start: enter
Increase/decrease lobster spawning: +/-

Changelog
1.0 - Initial release
1.01 - Changed timer from 1/30 to 0.03
1.02 - Fixed issues with monster hitbox. Changed lobster spawning. Fixed a few bugs (starting with lobster filled screen, having <100 lives, having >0 lobsters eaten).

To do:
* Improve the hitboxes for eating
* Get a decent sprite for the lobster eating monster

The lobster sprite is made by yeong, I plucked them from a topic which I can't seem to find anymore, I hope it's ok? :)

New version is up which hopefully fixes the crash.Crash is fixed, new version changes the spawn rate to a more playable state :)

Source code: https://github.com/ElementCoder/Eat-Nethams-Lua-Edition
Download: https://www.dropbox.com/s/abtt0bl32beapxd/EatNethams.tns
« Last Edit: January 03, 2013, 06:28:24 am by ElementCoder »

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

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: Eat Nethams Lua Edition
« Reply #1 on: January 02, 2013, 11:35:08 am »
My Nspire student software almost instantly says "not enough memory" :(

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Eat Nethams Lua Edition
« Reply #2 on: January 02, 2013, 12:46:03 pm »
That's weird, it runs just fine on mine. Maybe Java is going crazy, have you tried a reboot?

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

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Eat Nethams Lua Edition
« Reply #3 on: January 02, 2013, 01:17:35 pm »
I tried it too. It said:

"Insufficient Memory

This applicaton was stopped because of insufficient available memory."

It was taking 418MB of RAM, but never actually worked. I wasn't able to control anything (in the time it didn't show insufficient memory, I couldn't do anything either)

If I analzed the code correctly, you are adding a new lobster every 1/30 (0.033) seconds? that is quite much, since once image takes a whole lot of place in memory, that kinda makes sense.

And another thing. I don't really know if it's such a good idea to take 1/30 as timer interval. I'd rather take something like 0.03 instead, because i don't think it handles that kind of intervals good.

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Eat Nethams Lua Edition
« Reply #4 on: January 02, 2013, 01:54:19 pm »
I tried it too. It said:

"Insufficient Memory

This applicaton was stopped because of insufficient available memory."

It was taking 418MB of RAM, but never actually worked. I wasn't able to control anything (in the time it didn't show insufficient memory, I couldn't do anything either)
Well that is very strange, I just tested the TNS I distributed and it works fine for me on both TINCS and handheld (CX, 3.1)

If I analzed the code correctly, you are adding a new lobster every 1/30 (0.033) seconds? that is quite much, since once image takes a whole lot of place in memory, that kinda makes sense.

And another thing. I don't really know if it's such a good idea to take 1/30 as timer interval. I'd rather take something like 0.03 instead, because i don't think it handles that kind of intervals good.
Every time the timer ticks (so yes every 0.03 seconds I'll change it to decimal) it runs addLobster which has a certain chance of spawning a lobster. I'll upload a new version in a few minutes to see if it fixes it.

[edit] After testing the uploaded one, it indeed doesn't work for me too. Let me know if the new one works (first post will be updated).
[edit2] New version uploaded.
« Last Edit: January 02, 2013, 01:57:55 pm by ElementCoder »

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

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Eat Nethams Lua Edition
« Reply #5 on: January 02, 2013, 02:40:52 pm »
It works now, but it's sooooo hard to catch :) i never played an actual Eat Netham game, but it looks like it's good

The only thing i would change/add is escape as reset button too. A lot of people use [esc] as first try to get to the menu (so did I).

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Eat Nethams Lua Edition
« Reply #6 on: January 02, 2013, 04:35:54 pm »
Eat nethams is getting so popular :P
Looking nice btw :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Eat Nethams Lua Edition
« Reply #7 on: January 02, 2013, 06:10:56 pm »
Lol now there are 2 Lua Eat Nethams clone :P. I wonder if this one runs as fast as the original? :P

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Eat Nethams Lua Edition
« Reply #8 on: January 02, 2013, 06:26:43 pm »
Actually, you can eat lobsters in NyanCat when you reach score 1000 :p
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Eat Nethams Lua Edition
« Reply #9 on: January 02, 2013, 08:28:05 pm »
Looks nice :)

Did you get the idea from me, or did we both get the idea at the same time? :P

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Eat Nethams Lua Edition
« Reply #10 on: January 03, 2013, 05:25:31 am »
Lol now there are 2 Lua Eat Nethams clone :P. I wonder if this one runs as fast as the original? :P
Probably not :) Lua is quite slow with images (especially when you start drawing a lot of them :P).

Looks nice :)

Did you get the idea from me, or did we both get the idea at the same time? :P
I thought it was time for me to create and release my first game, then I saw your topic of Eat Nethams II for ndless, so I thought I'd do one in Lua :P

Uploading a new version probably today, it'll add ESC as a menu button instead of 'r' and make the lobsters move a bit slower (or perhaps adjustable/increasing over time)

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