Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Nick on November 19, 2011, 12:58:25 pm

Title: Bloxorz
Post by: Nick on November 19, 2011, 12:58:25 pm
yeah, i'm quite busy for the moment, on the coding field i mean..

i made a lua game called Bloxorz, a port from the bloxorz game on spele.nl, but there are many more variations on this game, but i haven't seen one on the nspire yet

so, what does it do, you have to lead a block to the red tile within the field of tiles, you can move anywhere you want, but you block has to stand completely on the tiles. Every time you move, your block changes his position. When you are standing and you move, you will be lying down on the next tiles, understood? well, that last thing is  not implemented yet xp

for those who don't understand anything of my explanation, here's a screenshot (sorry for the text in the middle of the screen, it was the only way i know until now..)
Title: Re: Bloxorz
Post by: DJ Omnimaga on November 19, 2011, 01:51:42 pm
Seems interesting. So when the block is lying on the next tiles, you can't move there if there's no more tiles ahead, right?
Title: Re: Bloxorz
Post by: mrmprog on November 19, 2011, 01:59:20 pm
Nice! this game is one of my favorites, keep it up. Will there be buttons and stuff like in the real thing?
Title: Re: Bloxorz
Post by: DJ Omnimaga on November 19, 2011, 02:06:55 pm
Btw I think this is in the wrong sub-forum. It should be in Other calc projects/ideas, not Lua.
Title: Re: Bloxorz
Post by: Jim Bauwens on November 19, 2011, 02:07:49 pm
Looks nice, good luck* coding :)
*have fun
Title: Re: Bloxorz
Post by: epic7 on November 19, 2011, 02:41:20 pm
I thought the block has to flip in those games
Title: Re: Bloxorz
Post by: saintrunner on November 19, 2011, 02:46:57 pm
yeah the way I've always seen the game, It has the block turn on its side when you go a direction. like this
http://www.coolmath-games.com/0-bloxorz/index.html

But I assume this is what your doing.
And it looks really good so far!
Title: Re: Bloxorz
Post by: epic7 on November 19, 2011, 02:51:03 pm
It would be really easy if they didn't flip :P
Title: Re: Bloxorz
Post by: saintrunner on November 19, 2011, 02:55:42 pm
Takes away from the challenge.
Title: Re: Bloxorz
Post by: Nick on November 19, 2011, 04:11:33 pm
yeah, it has to flip, but i'm busy doing that right now, that game would be stupid if it didn't xp
uh, and if it's in the wrong forum, who can move it?
Title: Re: Bloxorz
Post by: epic7 on November 19, 2011, 04:19:13 pm
I'm pretty sure it's in the right forum.
Title: Re: Bloxorz
Post by: saintrunner on November 19, 2011, 04:20:08 pm
its the right forum
Title: Re: Bloxorz
Post by: shmibs on November 19, 2011, 04:25:51 pm
it's in the right forum (other calc-related projects and ideas) now because i moved it there.
Title: Re: Bloxorz
Post by: saintrunner on November 19, 2011, 04:28:24 pm
Oh ok then
Title: Re: Bloxorz
Post by: Adriweb on November 19, 2011, 04:55:01 pm
Awesome, it really looks good !!
Title: Re: Bloxorz
Post by: ztrumpet on November 19, 2011, 07:40:11 pm
This looks pretty cool; good luck with it, Nick.
Title: Re: Bloxorz
Post by: Nick on November 19, 2011, 08:26:15 pm
here's an update.. i worked on it until 02:25 xp but it's a lot better! block flips, bridges work, detects if you're dead instead of holding you from moving etc. etc.

Title: Re: Bloxorz
Post by: hellninjas on November 19, 2011, 09:29:08 pm
I remember this! Very nice!
Title: Re: Bloxorz
Post by: saintrunner on November 19, 2011, 10:53:48 pm
That's awesome! just wondering, in the original game, it made you fall of the edge when you went over it, are you going to do that?
Title: Re: Bloxorz
Post by: annoyingcalc on November 19, 2011, 11:52:09 pm
yeah the way I've always seen the game, It has the block turn on its side when you go a direction. like this
http://www.coolmath-games.com/0-bloxorz/index.html

But I assume this is what your doing.
And it looks really good so far!
I visit that site from school! and btw I think this could be released now and be awesome
Title: Re: Bloxorz
Post by: Chockosta on November 20, 2011, 06:15:03 am
Nice work !

This game is really addictive...
Title: Re: Bloxorz
Post by: saintrunner on November 20, 2011, 10:20:09 am
it could be released, but all it really needs is the block to fall of the edges.
Title: Re: Bloxorz
Post by: Nick on November 20, 2011, 10:23:25 am
you really want me to release it, but you'll have to wait until it's finished.. i'm adding the buttons on which you have to stand totally, and if that works, i'll implement the weight-sensitive tiles :) that falling will be done too, trust me
Title: Re: Bloxorz
Post by: Stefan Bauwens on November 20, 2011, 11:12:59 am
I didn't try it, but apparently it also exists for the 89. You''l find an animated screenshot too there:
http://www.ticalc.org/archives/files/fileinfo/430/43015.html
Looks really fun.
Title: Re: Bloxorz
Post by: annoyingcalc on November 20, 2011, 11:41:02 am
cool!
Title: Re: Bloxorz
Post by: Stefan Bauwens on November 20, 2011, 11:42:07 am
cool!
I didn't make it so I don't know if I deserve that +1. :)
Title: Re: Bloxorz
Post by: DJ Omnimaga on November 21, 2011, 04:07:46 am
Looks nice, but I don't understand much how it works, looking at the 2nd screenshot. I will definitively need to try it myself when it eventually comes out to figure it out. XD
Title: Re: Bloxorz
Post by: aeTIos on November 21, 2011, 04:47:21 am
The game (??) is also on miniclip. Looks nice so far!
Title: Re: Bloxorz
Post by: saintrunner on November 21, 2011, 05:32:59 pm
The game (??) is also on miniclip. Looks nice so far!

I lost the game!
Title: Re: Bloxorz
Post by: mrmprog on November 21, 2011, 05:44:48 pm
This is pretty cool. AR you going to copy the levels exactly?
Title: Re: Bloxorz
Post by: AzNg0d1030 on November 22, 2011, 10:26:41 pm
:O here you are Nick! This looks great! >:D hope you get a beta out. Hehe...

(Trololol...?)
Title: Re: Bloxorz
Post by: Nick on November 23, 2011, 12:46:59 pm
working on it, but time is quite a mess right now...

i added a total of ten levels by now, should i already post it or not? it's a bit studpid, cuse they are quite easy xs but the levels are the real ones from the internet :)

and i found a strange error occuring, i know the reason, but the screen looks weird, like double layered xp
Title: Re: Bloxorz
Post by: aeTIos on November 23, 2011, 05:13:57 pm
hmm, indeed weird but actually useful for debugging :P
Looks very nice, would you mind posting your map rendering code?
Title: Re: Bloxorz
Post by: Nick on November 23, 2011, 05:22:05 pm
but as soon i press one key, doesn't matter which one, the background dissapears and everything returns to normal xp

well, for that code, it's quite "fake" 3D, i mean that i draw a tile (polygon) with a 3D look, and every row i place it a litte-le lower, and every collumn i place it a little higher..

Code: [Select]
tile = {0,84,6,94,21,92,15,82}
tilechange = {0,84,6,94,21,92,15,82}

function on.paint(gc)
gc:setColorRGB(170,170,170)
for i=1,10 do
for j=1,15 do
for k=1,7,2 do
tilechange[k]=tile[k]+i*7+j*16-18
tilechange[k+1]=tile[k+1]+i*11-j*2+5
end
gc:fillPolygon(tilechange)
tilechange = {0,84,6,94,21,92,15,82}
end
end
end

--edit--
this draws the full map on the screen, in the game i have another list for each level that contains 10 rows of 15 tiles to see if it has to be drawn or not
Title: Re: Bloxorz
Post by: Jim Bauwens on November 29, 2011, 07:05:16 am
That code looks quite nice :)
Only one thing, wouldn't tilechange better be a local variable?
From what I see I don't think its necessary to be global, and if you do lots of tweaks like this you will get speed improvement :)
Title: Re: Bloxorz
Post by: Nick on December 01, 2011, 03:43:21 pm
i'll change it directly, hope it got some effect, but it think that speed improvement isn't needed, as it reacts to keypresses nearly directly...

Does anyone have some ideas for a highscore? i don't really know what i should count as highscore, as when i take the lowest nr of movements, you have a highscore when finishing the first level. It has to be something that's over all the levels. Now i use totalmoves/levels played, but it's kinda strange i think.

update:
16 perfectly working levels (not those with the splitting parts), i think i'll keep it with that. Maybe i'll make a leveleditor in later updates, but we'll see..

now working on a graphical level selector and menu
Title: Re: Bloxorz
Post by: AzNg0d1030 on December 02, 2011, 07:36:24 pm
i'll change it directly, hope it got some effect, but it think that speed improvement isn't needed, as it reacts to keypresses nearly directly...

Does anyone have some ideas for a highscore? i don't really know what i should count as highscore, as when i take the lowest nr of movements, you have a highscore when finishing the first level. It has to be something that's over all the levels. Now i use totalmoves/levels played, but it's kinda strange i think.

update:
16 perfectly working levels (not those with the splitting parts), i think i'll keep it with that. Maybe i'll make a leveleditor in later updates, but we'll see..

now working on a graphical level selector and menu

ooohoo hoo hoo looking forward :D
Title: Re: Bloxorz
Post by: DJ Omnimaga on December 25, 2011, 11:26:44 pm
Is double layering normally possible in Lua? If not, then maybe you just unintentionally discovered how to? O.O (Although I bet this might go away in future OS updates)
Title: Re: Bloxorz
Post by: Nick on December 26, 2011, 02:15:23 am
what do you mean with double layered? i just draw the field first, whereafter i draw the block. That way the block is always painted last and stand at the top of the 'layering' so you can see that one here it it drawn.. was that what you ment?

or do you mean with the error screen?
Title: Re: Bloxorz
Post by: DJ Omnimaga on December 27, 2011, 01:10:16 am
I mean how the text displays over the game graphics without erasing them (when the error occurs).
Title: Re: Bloxorz
Post by: Nick on December 27, 2011, 02:34:56 am
well, i'm afraid this is a OS feature, and not one of the lua itself. Since when an error occurs, the lua stops running and the OS takes back control, i think that somehow the lua still runs while the os has taken over.
Title: Re: Bloxorz
Post by: DJ Omnimaga on December 27, 2011, 02:47:14 am
Too bad. If only it was possible. It's funny how some stuff that is achievable in TI-83+ BASIC on a shitty hardware can't even be achieved in Nspire Lua on a 10x more powerful hardware, larger screen and faster language. X.x

In TI-83+ BASIC you draw your stuff, store it into a pic, then display your text, then recall the pic. :P
Title: Re: Bloxorz
Post by: Jim Bauwens on December 27, 2011, 04:45:08 am
Well, with nspire Lua you can draw text over stuff without that it will look bad. There is no white background behind the text.
But of course it would be nice to have pixel level manipulations.
Title: Re: Bloxorz
Post by: DJ Omnimaga on December 30, 2011, 06:14:06 pm
Oh ok I thought it did some background thing, like in PRIZM BASIC.