Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 21:42:23 *
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: Optimization Help -  (Read 904 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
shmibs
bonsai bok choy wiseguy waterboy
Administrator
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Last Login: Today at 21:04:10
Date Registered: 11 June, 2010, 19:36:15
Location: 89B6
Posts: 1873


Total Post Ratings: +244

View Profile
« on: 04 April, 2012, 06:54:09 »
0

EDIT:ninjasked

it's just moving up/down/left/right and remembering the direction the character is facing? i'd structure it differently, with something like this:


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
ClrDraw
DiagnosticsOff
.A=x_pos, B=y_pos, C=direction_faced
0->A->B->C
[sprite data, one after another, ordered up, down, left, right stored here]->Pic1

Repeat getkey(15)

if getkey(4)-getkey(1)
.go up
if getkey(4)
-1->C
B--
end

.go down
if getkey(1)
->C
B++
end
end

if getkey(2)-getkey(3)
.go left
if getkey(2)
+1->C
A--
end

.go right
if getkey(3)
+2->C
A++
end
end

ClrDraw
Pt-On(A,B,C*8+Pic1
DispGraph
end
« Last Edit: 04 April, 2012, 07:27:25 by shmibs » Logged



We're not human, are we?
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.193 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.