Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: Nick on May 28, 2012, 02:55:56 pm
-
Hi
I made this topic to present you the first stage of my 'Omnimaga Contest 2012: AI'-project.
Some of you may have already heard the (n/g)ame Osmos..
Osmos is a game in which you are a (life)cell and you have to complete several targets.
- Become the biggest
- absorb some special lifeforms
- avoid some other special lifeforms
- etc.
you are a dark blue cell, and live together with other creatures (cells). Some of them are nice, others try to destroy you, so watch out!
you can move by clicking 'behind' him. it gives you speed, but it also decreases your size, so you have to choose wisely..
Smaller normal cells are lighter blue, bigger normal cells are red. If a cell is bigger than you it absorbs you (and you obviously die), but if you can absorb a smaller cell you grow.
There are special lifeforms such as biophobias and other (forgot the names xp ), and those are special.
The biophobias are the only ones i implemented already, and they are those green cells. And this is where the AI comes in.
If you look closely, you can see the biophobia tries to escape from you if you are bigger than him, but he 'sees' the cells around him and absorbs the ones that are smaller.
This means he grows faster than the normal cells, so you'll have a hard time fighting them...
as you can see in the screenshot, i already reached a reasonable state after 2 days of working. But there are a lot of glitches and bad things in it though..
The AI has to be better, since it sometimes gets stuck between two big cells, and thus starts to shake between those 2 :)
Nick
-
I'm liking the concept, graphics are pretty good too. :)
Good luck with this!
-
Wha, that's looking cool!
Good luck with it!
-
This looks and sounds very nice !
Good luck and have fun coding :)
-
Wow, very nice
But where is the screenie? :/ and what platform? Axe, asm,...
-
thanks everyone :)
But where is the screenie?
it's a youtube video (embedded) i posted here, maybe you can't see it because of you ipod or something..
what platform? Axe, asm,...
it's nspire, which you could see in the screenie, but that seems to be hard for you though xp
-
No i see it, then it's very very nice, i thought it was based on the video, but it is the video :o that's one amazing game you allready made man
-
Nice job there. You had brought this idea up in another place, and I had actually considered doing something like this. :P
It looks really cool. :D
-
Wow, nice concept. It kinda reminds me of Flow (http://interactive.usc.edu/projects/cloud/flowing/), and it looks really fun :D
-
Nice job there. You had brought this idea up in another place, and I had actually considered doing something like this. :P
It looks really cool. :D
yes i did, in some challenge me topic, but i'm not sure who's topic it was.. and i was like AI, hmm, where did i see an AI lastly, and then i came across that video :)
-
My topic. :)
The difference is: On the nspire this game is easier to make due to the touchpad.
-
Wow, nice concept. It kinda reminds me of Flow (http://interactive.usc.edu/projects/cloud/flowing/), and it looks really fun :D
never heard of it, but flow is fun indeed (just tried it out), it indeed can remind you of it, it somehow has the same thing (i don't know how to call it xp )
and yeah, the touchpad is useful, but i'll add arrowsupport too in the future, since some people don't like the touchpad, which i can understand
-
never heard of it, but flow is fun indeed (just tried it out), it indeed can remind you of it, it somehow has the same thing (i don't know how to call it xp )
Flow is an incredible time-waster. I guess it's something about transforming yourself from a tiny speck into a badass worm—like Spore (remember when that was a thing?). Osmos still looks like an original game though. Did you come up with the concept yourself? I like it.
-
Nah, Osmos is actually a pretty cool iphone game that he cloned. Are you planning on adding gravity?
-
Osmos is a game that is already in the market, this is the official page:
http://www.hemispheregames.com/osmos/ (http://www.hemispheregames.com/osmos/)
And that game reminds me a bit to Bubble Tanks (http://www.kongregate.com/games/HeroInteractive/bubble-tanks)
-
Osmos is a game that is already in the market, this is the official page:
http://www.hemispheregames.com/osmos/ (http://www.hemispheregames.com/osmos/)
this ^
and gravity?where should i add that? i could, if i knew where, since i haven't seen any gravity in ther (iirc)
-
There's one level in particular, with a massive number of particles all in orbit around a "sun-like" osmo.
-
oh that one, no.. the calculator can't handle that many calculations (in fact, it surely can, but in the way they implemented lua (==>slow) it's not possible)
so i'll just stick with these 4 and one additional that i will add in the next month (just a little different than these ones, and maybe a custom one i made myself). i would like to implement that sun-like system, but now the calc is already slowing down because it has to keep track of 40 cell instances/frame, which is nothing in comparison with the sun-like system xs
-
What about the physics engine in 3.2 ? :D
-
Congrats Nick :D
Looking very good !
Also, using the Physics Engine with that kind of stuff is very fast (smooth)... :D (and not very bad at all on calc)
I may upload a video later today, just so you can see...
-
really? great :) then i could update it if i get used to the engine :)
is the new lua faster in general ?
-
Hmmm no, Lua itself hasn't changed...
-
Wow, I already played this game on android, but this port looks... awesome ! o_o
-
thanks :)
i improved the AI for now, but i still seem to have troubles making the AI avoiding the cells.. sometimes it avoids them, but for some reason it shoots to it like hell ö i suppose there's something simple wrong, but i'll have to take a fresh new look at it
i also decided to go with less cells on the screen, but they will be bigger. This because:
1) it gets a lot faster if i remove cells -->playablility (is that even a word) gets improved
2) better overview
3) looks better in general
new progress will come slowly (exams), but i'll get there..
i'll take another look at the sun-like system too, maybe it's possible with less cells, i'll see what i can do, it would be nice though
-
If you'dd finish the game and all of those functions in it, that would be nice
I'm gonna buy a ti nspire (where in belgium is that possible?) and play your game
-
here is the first show-off of Osmos running on Pscspire. as you can see it's not really optimized yet, but the screenfitting are working, and so are the buttons and the amount of cells in the game
i made it that way so that it can take any screensize, so you will all be able to play this on your pc/linux/mac or whatever you want :)
As you can see in the vid the code itself isn't totally optimized yet for the big screen (the cell don't move fluently but this is not the final version yet)
the vid lost most of its quality though while uploading, but you can see what's happening
I recommend switching to full screen mode, since in this embedded video you won't see a thing over the look of how awesome it is :)
-
Nice. I hope you keep working on it
-
Very nice, glad it is working properly :)
Also, it is PCspire not Pscspire :P
-
Another demo showing how awesome PCSpire is :P
-
This is just awesome :D I love Osmos, great game. I can't wait till this gets released.
-
because of the exams development slowed down a lot.. in fact i haven't done anything since last update xp
i'll continue tomorrow, since then my biggest exams are finished, and i'll finally get some spare time again :)
also, I discovered that coding in the exams isn't really that relaxing ö especially debugging, it makes me nervous..
-
Lol ^^
Also, if you code with PCspire or the new SDK it's more easy to debug :)
(You need to run PCspire from a console for that)
-
yeah, you told me to run it from the console, but nothing happened (well, it opened PCspire, but that's it..)
hmm, for the sdk i'll need to find my registration key first, and i don't really know where i left that xs so i'll look for it tomorrow.
i saw that there is a kind of console in the sdk, can you print to that using print() or how else?
it feels like i'll have loads of work to do tomorrow ö (not school related xp )
-
Ah, I just checked. You need to add "--console" to the parameters of love in windows.
-
i tried it, and now it opens a console window, but the only thing it outputs is 'starting', nothing more..
twice btw, once the general scriptselectionmenu opens, and once the program opens
edit: wait, it's ok now, it only prints to the console when it crashes :)
-
You can add a "-v" if you want more debug info.
Also, you can add print functions to your code, to debug stuff.
You get the "starting" twice, because the loader is actually an application too :D
-
yeah, i saw that in your code :) (yes i took a look in the code of PCspire too xp )
ok, nice, i'll check that out
thanks for making PCspire, it's really wonderful :)
-
Ok :)
I'm glad it is useful, and it will become even better in the future.
Also, don't hesitate to report any function that doesn't work the same as on the TI-Nspire.
-
UPDATE!!
i rewrote it totally, and now it uses more classes :)
new stuff:
- menu: now it comes scrolling down, but it's hard to see in the video
- modes updated
- antimatter mode added
- optimized, but a lot of other optimization is needed
that's about it.. it's getting finished :)
oh and you might see in the video that i did not yet make them better looking with that darker border, i might or might not add that in the future, we'll see (it all depends on the speed)
-
great :D good work :thumbsup:
-
Wha, that is looking nice!
-
thanks, although i optimized it, i seem to have a 'problem':
(http://img.removedfromgame.com/imgs/DSC00208.jpg)
as you can see, it only reaches 0.66 fps, which is terrible ö i really hope i get this number to rise, since now it's just frustrating xs
i had a mistake in my fps counter lol it's about 11 fps (which is still too low)
-
Optimized for speed or size?
-
speed optimization, size optimization is a minor importance here (for now it's only 5kB) and the nspire has enough memory for size optimization not being such an important matter (at least not at 5kB)
with 6 cells, i can reach 20 fps, but that's too few cells :(
-
The games all seem very fast. There was that one game where you spawned and had already won because no one else was bigger than you... :-\
Size optimization is not an issue for Nspire Lua Programming. The biggest Lua program takes a little over 1 MB (Loulou's translator). There is over 100 MB available. If there's a size issue, it's probably the huge roms/wads/movies for your ndless programs. :) That case is different for 8x dev though.
-
Nick, don't forget to localize functions you use a lot. This can give a big speed gain.
-
localize functions ?? how can you possibly localize a function?
-
He means to make them local.
(not localized here as a language point of view)
-
i understand what he means :) i just don't know how..
-
This link should help: LUA Performance (http://trac.caspring.org/wiki/LuaPerformance)
-
thanks, but i've already done all that :)
i did a little testing, and it seems like those 12 fps is more than enough to play. i increased the speed of the cells with 2.5 and now everything is ok (they were moving at a speed between 2*10^-3 and 0.2 pixels per loop, that's why it seemed so slow)
the only thing now is that i never really thought about grayscale calcs xs the black antimatter cells are really hard to see on the dark blueish background in b/w, so i'll have to find a way to solve that. also the difference between blue and red cells is hard to see in b/w xs but that's a sorrow for later, i have to make it work first :)
-
The graphics are great, but on a b/w calc it's a bit too difficult. I think moving is a bit too expensive anyway.
And that it crashes most of the time if you press an arrow key is a bit annoying.
Don't get my wrong, I think this is a great game and I like it very much ;)
-
hmbug press the right arrow key, after you select intro and the game crashes, and btw fun game.
-
well, it has an error for every arrowkey press and enterkey press that does not happen in the menu part.
since i simply forgot to remove 2 lines of code (or to add about 20) it throws errors, i know about it
thanks for telling me, and thanks for the comments
-
With Osmos on the calculator the initial moving speed is too slow, 1px/sec or something like that. This makes it less fun as you need to click a couple of times to move in a respectable speed (and losing lots of size). It works perfect in PCspire though .. :P
-
hmm, i'll change that in a later version. i did not test it with PCspire, i actually never thought of that xs i just did it with the student software and my calc of course, and it was reasonable imo..
it's sad how there are two bugs in it, it's really stupid how i forgot these functions, but yeah, they will be gone in the newest version i will release :)
-
Nick, you definitely played too much Spore!
Spore Galactic adventures or Spore Creatures? :D
But it looks really cool! ;)
-
Nick, you definitely played too much Spore!
Spore Galactic adventures or Spore Creatures? :D
But it looks really cool! ;)
uh, what's spore? i don't know that xp
it's a clone of the real Osmos game, even the name is the same :)
but thanks anyway
-
That's spore
OSMOS = call-stage in Spore
EDIT:
I just notices it:
SOMETHING'S MISSING!!
The cells don't have biig eyes!!
*.* <-----that's how they should look like! ;)
-
haha, cells with eyes :o
well, it's a totally different ganme though, the osmos i know (and cloned here) is a game on itself (an android app, but now also available as computer game)
-
well, cells, swimming around, eating each others and growing!
only the eyes are missing!
(I expect your cells to look CUTE with big baby-eyes!!!) ;) :D
EDIT:
I think I have to agree you're right: The goal in OSMOS is, to survive by not swimming too much and eating enemies. In SPORE, you need to eat them to become bigger AND to increase our own powers (speed, eaing plants, poisons, ...)
-
but actually the idea of eyes is not bad :) maybe i can add them to osmos, with a toggle function (so can choose to see or not see them yourself)
it'll slow it down even more though..
-
Another major difference is that Osmos, at least the PC version, was very puzzle centric for a lot of the levels, where spore is more of an action game.
-
Well, Spore is not really an action game!
It tells you the history of a single cell and lets YOU control it!
at the beginning, you are a cell.
later, you have laser guns and that stuff, thats right! ._.
-
at the beginning, you are a cell.
later, you have laser guns and that stuff, thats right! ._.
so basically a cell with eyes shooting at other cells with lasers :o well, that's some nice cell xp
all those things slow down a lot, and for now it's already very slow (i could optimize it somehow though)
-
so basically a cell with eyes shooting at other cells with lasers :o well, that's some nice cell xp
;D nice idea! But That's not what I ment!
at the beginning you're a cell
then you become an animal (leave the water)
then you're the leader of a tribe (fight against other tribes)
then you can build airplanes and cars (this is supposed to represent the present)
and in the last stage, you become the captain of a spaceship! ;)
and with "Spore - galactic adventures" you can also baem onto planets and complete missions - sometimes with nice weapons! ;)
-
hmm, that sure is too complicated for me i guess.. but a cleaned-up version of osmos will surely come if i find the time and motivation to finish speedX3D :)
-
Yeah, porting an accurate version of spore would not be easy :P
-
I think this game is fine as is. if you want eyes, make another game :P
-
I think this game is fine as is. if you want eyes, make another game :P
thanks, that might probably be a good idea :)