Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
23 May, 2013, 16:11:51 *
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]   Go Down
  Print  
Author Topic: scrolling and tilemapping tutorial?!?! -  (Read 814 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Today at 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197


Total Post Ratings: +185

View Profile WWW
« Reply #15 on: 21 January, 2012, 22:50:28 »
0

In english?

Google translate the original topic ?

sorry Undecided
Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #16 on: 21 January, 2012, 22:51:23 »
0

ok I'll do that... but I still think if yunhua can put it into my code it would be easier for me to understand
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
yunhua98
You won't this read sentence right.
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 14 May, 2012, 03:06:37
Date Registered: 26 May, 2010, 22:58:45
Location: Somewhere in Deep Space.
Posts: 2717


Total Post Ratings: +199

View Profile
« Reply #17 on: 21 January, 2012, 22:54:21 »
0

i'm not sure whether this works, if it doesn't could you screenshot it so I can see what's wrong?


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
:.TILES
:Full
:Lbl TMAP
:ClrDraw
:[01010101010101010101010101]→GDB1
:[01000000000000000000000001]
:[01000000000000000000000001]
:[01000000000000010101010101]
:[01000000000000000000000001]
:[01000101010000000000000001]
:[01000000000000000000000001]
:[01010101010101010101010101]
:[7E81A581A599817E]→Pic1
:0→R→C
:[3C429581818D423C]→Pic1MAN
:[003C7E7E7E7E3C00]→Pic2MAN
:[3C42A98181B1423C]→Pic3MAN
:45→X:45→Y:0→J:1→D
:Repeat getKey(15)
:
:Pt-On(X,Y,Pic2MAN)r
:If getKey(2) and (pxl-Test(X-1,Y+6)=0) and (pxl-Test(X-1,Y+1)=0)
:C++
:2→D
:End
:If getKey(3) and (pxl-Test(X+8,Y+6)=0) and (pxl-Test(X+8,Y+1)=0)
:C--
:1→D
:End
:If getKey(4) and (pxl-Test(X+1,Y+8) or pxl-Test(X+7,Y+8)
:18→J
:End
:If (J>0)
:R++
:J--
:End
:If (pxl-Test(X+6,Y+8)=0) and (pxl-Test(X+1,Y+8)=0) and (J=0) or (pxl-Test(X,Y) or (pxl-Test(X+7,Y)
:R--
:0→J
:End
:If getKey(1) and (pxl-Test(X,Y+8)=0)
:R--
:0→J
:End
:If (D=1)
:Pt-Change(X,Y,Pic1MAN)
:End
:If (D=2)
:Pt-Change(X,Y,Pic3MAN)
:End
:Pause 25
:DispGraph
:DispGraphr
:ClrDrawr
:If (D=1)
:Pt-Change(X,Y,Pic1MAN)
:End
:If (D=2)
:Pt-Change(X,Y,Pic3MAN)
:End
:sub(MAP)
:End
:
:Lbl MAP
:For(B,0,9)
:For(A,0,13)
:{B+(R/8)*12+A+(C/8)*8+GDB1}→T
:If T
:T--
:Pt-On(A-1*8+C^8,B-1*8+C^8,T+Pic1)
:DispGraph
:End
:End
:End
« Last Edit: 21 January, 2012, 23:12:22 by yunhua98 » Logged


Spoiler for =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.

On hold for Contest.


Spoiler for ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11

saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #18 on: 21 January, 2012, 22:55:12 »
0

sure, I'll try it out thanks Smiley
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #19 on: 21 January, 2012, 23:10:00 »
0

ok so it just drew everything in the top right hand corner I think resulting in a black box in the top corner shocked
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
yunhua98
You won't this read sentence right.
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 14 May, 2012, 03:06:37
Date Registered: 26 May, 2010, 22:58:45
Location: Somewhere in Deep Space.
Posts: 2717


Total Post Ratings: +199

View Profile
« Reply #20 on: 21 January, 2012, 23:13:54 »
0

I edited the code in my earlier post.

Change line 67 into what it is now.
Its the 8th row from the bottom, I think, with the part where it stores the stuff into T.
and then in line 70, remove the "*8" in the "T*8"
Logged


Spoiler for =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.

On hold for Contest.


Spoiler for ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11

saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #21 on: 21 January, 2012, 23:17:45 »
0

ok compiling...one sec

edit: same problem...except it I press right then it draws everything down 8 and right 8..resulting in two black boxes
« Last Edit: 21 January, 2012, 23:19:02 by saintrunner » Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
yunhua98
You won't this read sentence right.
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 14 May, 2012, 03:06:37
Date Registered: 26 May, 2010, 22:58:45
Location: Somewhere in Deep Space.
Posts: 2717


Total Post Ratings: +199

View Profile
« Reply #22 on: 21 January, 2012, 23:22:18 »
0

hmm...  I'm not sure what's wrong.  Its hard to do this without a calc sitting in front of me.  Undecided
I left it at school this weekend.  Shocked
Logged


Spoiler for =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.

On hold for Contest.


Spoiler for ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11

saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #23 on: 21 January, 2012, 23:25:29 »
0

The problem is defiantly with the tile map drawing Tongue problem is knowing which part
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
yunhua98
You won't this read sentence right.
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 14 May, 2012, 03:06:37
Date Registered: 26 May, 2010, 22:58:45
Location: Somewhere in Deep Space.
Posts: 2717


Total Post Ratings: +199

View Profile
« Reply #24 on: 21 January, 2012, 23:36:07 »
0

changed the map routine.
I really have no idea why it shouldn't display the entire screen though...


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
:.TILES
:Full
:Lbl TMAP
:ClrDraw
:[01010101010101010101010101]→GDB1
:[01000000000000000000000001]
:[01000000000000000000000001]
:[01000000000000010101010101]
:[01000000000000000000000001]
:[01000101010000000000000001]
:[01000000000000000000000001]
:[01010101010101010101010101]
:[7E81A581A599817E]→Pic1
:0→R→C
:[3C429581818D423C]→Pic1MAN
:[003C7E7E7E7E3C00]→Pic2MAN
:[3C42A98181B1423C]→Pic3MAN
:45→X:45→Y:0→J:1→D
:Repeat getKey(15)
:
:Pt-On(X,Y,Pic2MAN)r
:If getKey(2) and (pxl-Test(X-1,Y+6)=0) and (pxl-Test(X-1,Y+1)=0)
:C++
:2→D
:End
:If getKey(3) and (pxl-Test(X+8,Y+6)=0) and (pxl-Test(X+8,Y+1)=0)
:C--
:1→D
:End
:If getKey(4) and (pxl-Test(X+1,Y+8) or pxl-Test(X+7,Y+8)
:18→J
:End
:If (J>0)
:R++
:J--
:End
:If (pxl-Test(X+6,Y+8)=0) and (pxl-Test(X+1,Y+8)=0) and (J=0) or (pxl-Test(X,Y) or (pxl-Test(X+7,Y)
:R--
:0→J
:End
:If getKey(1) and (pxl-Test(X,Y+8)=0)
:R--
:0→J
:End
:If (D=1)
:Pt-Change(X,Y,Pic1MAN)
:End
:If (D=2)
:Pt-Change(X,Y,Pic3MAN)
:End
:Pause 25
:DispGraph
:DispGraphr
:ClrDrawr
:If (D=1)
:Pt-Change(X,Y,Pic1MAN)
:End
:If (D=2)
:Pt-Change(X,Y,Pic3MAN)
:End
:sub(MAP)
:End
:
:Lbl MAP
:For(B,0,9)
:For(A,0,13)
:{B+(R/8)*12+A+(C/8)+GDB1}→T
:If T
:T--
:Pt-On(A*8-8+C^8,B*8-8+R^8,T*8+Pic1)
:End
:End
:DispGraph
:
Logged


Spoiler for =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.

On hold for Contest.


Spoiler for ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11

saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #25 on: 21 January, 2012, 23:46:28 »
0

Nope Tongue it just draws REALLY SLOW and all in the upper left corner.
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
yunhua98
You won't this read sentence right.
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 14 May, 2012, 03:06:37
Date Registered: 26 May, 2010, 22:58:45
Location: Somewhere in Deep Space.
Posts: 2717


Total Post Ratings: +199

View Profile
« Reply #26 on: 21 January, 2012, 23:47:23 »
0

huh.  I'll check it out on my calc later.
Logged


Spoiler for =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.

On hold for Contest.


Spoiler for ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11

saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #27 on: 21 January, 2012, 23:47:48 »
0

ok, thanks for all the help anyways Smiley I really appreciate it
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
leafy
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 02:05:15
Date Registered: 26 December, 2010, 05:27:03
Location: the ninth circle of hell
Posts: 1545


Total Post Ratings: +371

View Profile WWW
« Reply #28 on: 22 January, 2012, 00:16:41 »
0

Fellas, here is your problem.

Pt-On(A*8-8+C^8,B*8-8+R^8,T*8+Pic1)

This line, near the end. Axe ignores order of operations, so you're really taking that entire mod 8 which returns a value from 0-7. This means that it'll always draw the tile in the same little corner at the top left. Try this:

Pt-On(A*8-8+(C^8),B*8-8+(R^8),T*8+Pic1)
Logged

In-progress: Blastlabs, TMJO, qb?, VVVVVV?
Finished: Tag, Tap, MFQT, Nyan
Dead: Graviter
saintrunner
Custom Spriter: You ask it! I'll Make it!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 09 March, 2013, 02:00:40
Date Registered: 27 October, 2011, 21:52:46
Location: Right here....I think?
Posts: 1776


Topic starter
Total Post Ratings: +97

View Profile WWW
« Reply #29 on: 22 January, 2012, 00:25:12 »
0

OHHH so close! It draws a bunch of random stuff though but his time all over the screen. I think a few numbers are off
Logged

My Sprites Thread   :Updated often Smiley for your viewing pleasure

GAMES:
Pages: 1 [2]   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.274 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.