Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 June, 2013, 07:45:16 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3 4 ... 6   Go Down
  Print  
Author Topic: Color tetris -  (Read 5165 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Online Online

Gender: Male
Last Login: Today at 07:44:40
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50592


Total Post Ratings: +2634

View Profile WWW
« Reply #15 on: 08 November, 2011, 03:57:16 »
0

Looks nice. As for the blocks, the lighter ones could probably have a darker color or a lighter outline thing to the top/left.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
AzNg0d1030
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 06 June, 2013, 19:33:43
Date Registered: 26 October, 2011, 04:43:09
Location: Over the rainbow
Posts: 489


Total Post Ratings: +37

View Profile
« Reply #16 on: 08 November, 2011, 04:38:40 »
0

Looks nice. As for the blocks, the lighter ones could probably have a darker color or a lighter outline thing to the top/left.
True, it looks like a tiny triangle in the top right corner of the block, or top left in this case.  Whichever looks better here.
Logged

What? WHAT? WHATTTT?Huh??

You just lost the game.

Suck it up.
ralphdspam
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 09:10:11
Date Registered: 01 February, 2011, 07:58:40
Location: California, USA
Posts: 841


Total Post Ratings: +36

View Profile
« Reply #17 on: 08 November, 2011, 07:36:37 »
0

Nice!  It doesn't necessarily need the fast down button, as I normally don't use it. 

I'd like the fast-down button; I use it more often than the soft-down button.  Wink
Logged

ld a, 0
ld a, a
Nick
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 28 May, 2013, 18:19:14
Date Registered: 05 June, 2011, 20:01:07
Location: 51° 12′ 34″ N, 3° 13′ 31″ E
Posts: 1179


Topic starter
Total Post Ratings: +158

View Profile WWW
« Reply #18 on: 08 November, 2011, 07:52:12 »
+1

i'll have a try on that button Smiley cause it's nice to have..

i also have a problem with the turning of the blocks it seems. i thought i only had to transpose the matrix, but in fact, it doesn't work, cause you only have two positions then. how can i fix this?
Logged

AzNg0d1030
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 06 June, 2013, 19:33:43
Date Registered: 26 October, 2011, 04:43:09
Location: Over the rainbow
Posts: 489


Total Post Ratings: +37

View Profile
« Reply #19 on: 08 November, 2011, 08:06:52 »
0

i'll have a try on that button Smiley cause it's nice to have..

i also have a problem with the turning of the blocks it seems. i thought i only had to transpose the matrix, but in fact, it doesn't work, cause you only have two positions then. how can i fix this?
maybe the person who made nTris will know. Search it up on here. There is a thread for it. It's for nspire too (just not cx or something)
Logged

What? WHAT? WHATTTT?Huh??

You just lost the game.

Suck it up.
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 00:06:13
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1736


Total Post Ratings: +180

View Profile WWW
« Reply #20 on: 08 November, 2011, 17:41:33 »
0

and for the code, yeah it is to check if that blocks[][] (that's the matrix that includes the total field) is not 0, i've tried it with ~=0, but it didn't work properly, it wouldn't move anymore...
Well, it should work, so probably the problem is somewhere else.
You say that it only works with 1, while even with this setup it should work. This confirms the thing above even more.
So .. have fun with bug hunting, and don't hesitate to ask questions Smiley

I'm also Belgian, and there are quite some dutch speaking people over here. So if you really don't know how to explain something in English, don't be afraid to ask it in dutch Smiley
Logged

Nick
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 28 May, 2013, 18:19:14
Date Registered: 05 June, 2011, 20:01:07
Location: 51° 12′ 34″ N, 3° 13′ 31″ E
Posts: 1179


Topic starter
Total Post Ratings: +158

View Profile WWW
« Reply #21 on: 08 November, 2011, 18:02:25 »
0

I just solved the problem, it all works nice, i have add the marathon function: every 5 lines you go a level up, and you get a higher score when erasing multiple lines at once.
I used 2*numberoflines if linescleared>1, so 1 line gives 1 point, 2 lines gives 3 points, 3 lines gives 7 points and so on...

Oh, and that's really nice to know, it might be very handy to know, merci om 't met andere woorden te zeggen Smiley
« Last Edit: 08 November, 2011, 18:04:22 by Nick » Logged

Nick
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 28 May, 2013, 18:19:14
Date Registered: 05 June, 2011, 20:01:07
Location: 51° 12′ 34″ N, 3° 13′ 31″ E
Posts: 1179


Topic starter
Total Post Ratings: +158

View Profile WWW
« Reply #22 on: 09 November, 2011, 02:04:59 »
0

can somebody tell me what's wrong with the code below?
it has to erase the upper line of a tablematrix if all the entries on the first row are 0 and replace it with a {0,0,0,0} entry on the 4th place of the table...
transpon is the table that holds the values 1 and 0 like this: transpon = {{0,1,0,0},{1,1,1,0},{0,0,0,0},{0,0,0,0},..and yet some other stuff here}


1
2
3
4
5
6
7
8
9
10
11
count = 0
for i=1,4 do
if transpon[1][i]==0 then
count = count + 1
end
end
if count==4 then
table.remove(transpon[1])
table.insert(transpon,4,{0,0,0,0})
count = 0
end
« Last Edit: 09 November, 2011, 02:06:13 by Nick » Logged

AzNg0d1030
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 06 June, 2013, 19:33:43
Date Registered: 26 October, 2011, 04:43:09
Location: Over the rainbow
Posts: 489


Total Post Ratings: +37

View Profile
« Reply #23 on: 09 November, 2011, 04:32:58 »
0

I just solved the problem, it all works nice, i have add the marathon function: every 5 lines you go a level up, and you get a higher score when erasing multiple lines at once.
I used 2*numberoflines if linescleared>1, so 1 line gives 1 point, 2 lines gives 3 points, 3 lines gives 7 points and so on...

Oh, and that's really nice to know, it might be very handy to know, merci om 't met andere woorden te zeggen Smiley
Every 5 lines?  I went up to level 20 and saw how fast it was.  Are you sure 5 lines? :O  Or maybe it should be like steps, where level 1 is # of lines, then level 2 is # of lines + 1, level 3 # +2  or something.  Or else for some it might get too hard too fast...
Logged

What? WHAT? WHATTTT?Huh??

You just lost the game.

Suck it up.
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 00:06:13
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1736


Total Post Ratings: +180

View Profile WWW
« Reply #24 on: 09 November, 2011, 11:23:54 »
0

I think you are mixing transpon and transpon [1] :

1
2
3
table.remove(transpon[1])
table.insert(transpon,4,{0,0,0,0})

I think you need


1
2
3
table.remove(transpon, 1)
table.insert(transpon,4,{0,0,0,0})
« Last Edit: 09 November, 2011, 11:25:43 by jimbauwens » Logged

Nick
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 28 May, 2013, 18:19:14
Date Registered: 05 June, 2011, 20:01:07
Location: 51° 12′ 34″ N, 3° 13′ 31″ E
Posts: 1179


Topic starter
Total Post Ratings: +158

View Profile WWW
« Reply #25 on: 09 November, 2011, 20:20:02 »
0

yeah, that's it, thanks, now everything works as it should be, the only problem is that if a block turns when it's next to a wall, they dissapear like half into it, so i'll just have to fix that and the first "official" beta edition of ColorTetris will be finished. The only challenge included now is marathon, but this will be my next adjustment...

btw, if you have a cool name for it, shoot! cause ColorrTetris doesn't sound that explosive or atractive or...so if you know one, tell me



and maybe only  one thing: what is the shortest code to execute for the calc (to gain speed):


1
2
3
4
5
6
7
gc:setColorRGB(R,G,B)
gc:fillRect(x,y,10,10)
gc:setColorRGB(R,G,B)
gc:fillRect(x,y,10,10)
gc:setColorRGB(R,G,B)
gc:fillRect(x,y,10,10)
or

1
2
gc:drawImage(image,x,y)
with image a picture of a block of 10x10 (same as fillrect)

Every 5 lines?  I went up to level 20 and saw how fast it was.  Are you sure 5 lines? :O  Or maybe it should be like steps, where level 1 is # of lines, then level 2 is # of lines + 1, level 3 # +2  or something.  Or else for some it might get too hard too fast...

are you being sarcastic or is it true that it goes quite fast?

--edit--
but it's like 3 time setcolorrgb and fillrect, is it still faster than one drawimage?
« Last Edit: 09 November, 2011, 23:27:54 by Nick » Logged

Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 00:06:13
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1736


Total Post Ratings: +180

View Profile WWW
« Reply #26 on: 09 November, 2011, 23:22:16 »
0

fillRect is much faster than drawimage, so I suggest you to use that Smiley
Logged

AzNg0d1030
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 06 June, 2013, 19:33:43
Date Registered: 26 October, 2011, 04:43:09
Location: Over the rainbow
Posts: 489


Total Post Ratings: +37

View Profile
« Reply #27 on: 09 November, 2011, 23:42:06 »
0

Beta-version of the game coming up tomorrow!  (Yes, I know this stuff Tongue)
Oh, I lost the game due to that ^ (irrevelancy)
Logged

What? WHAT? WHATTTT?Huh??

You just lost the game.

Suck it up.
AzNg0d1030
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 06 June, 2013, 19:33:43
Date Registered: 26 October, 2011, 04:43:09
Location: Over the rainbow
Posts: 489


Total Post Ratings: +37

View Profile
« Reply #28 on: 09 November, 2011, 23:44:59 »
0


Every 5 lines?  I went up to level 20 and saw how fast it was.  Are you sure 5 lines? :O  Or maybe it should be like steps, where level 1 is # of lines, then level 2 is # of lines + 1, level 3 # +2  or something.  Or else for some it might get too hard too fast...

are you being sarcastic or is it true that it goes quite fast?
Yeah it does.  5 lines every level will be insane.  Level 5 already is sort of hard to get through.
Level 20 was absolutely insanity.  At least like every 10 lines.

Sorry for the double post guys...
« Last Edit: 09 November, 2011, 23:45:24 by AzNg0d1030 » Logged

What? WHAT? WHATTTT?Huh??

You just lost the game.

Suck it up.
Nick
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 28 May, 2013, 18:19:14
Date Registered: 05 June, 2011, 20:01:07
Location: 51° 12′ 34″ N, 3° 13′ 31″ E
Posts: 1179


Topic starter
Total Post Ratings: +158

View Profile WWW
« Reply #29 on: 09 November, 2011, 23:48:27 »
0

dude, why you guys know the game too xp

Ok then, it's nice to hear that speed isn't a problem here Smiley and i might change that levelup condition if it's not only you who thinks it goes to fast Smiley
but if i change it, it will take loooong to finally reach level 20, but if you agree, i do too
« Last Edit: 09 November, 2011, 23:49:19 by Nick » Logged

Pages: 1 [2] 3 4 ... 6   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.29 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.