|
Post by mkg on Dec 2, 2013 12:58:57 GMT -5
I made my first +64 scroll engine, its for use with planes with more than 64 tiles of width/height. the example has a size of 100*50 tiles. (the height is 50 tiles because the lack of zoom-out of Imagenesis , but a +64 height can be done) Attachments:
|
|
|
Post by mkg on Dec 2, 2013 13:08:48 GMT -5
Using get_tilemap: get_tilemap(lblptr&(map),width,x,y) while map is your map data, width is the actual width of your map (in tiles), x and y are the coords of the map where you want to extract. (sorry my english )
|
|
|
Post by mkg on Dec 2, 2013 15:49:45 GMT -5
A second test, with now, +64 VSCROLLING! Map size: 128*128 (original: 64*64 , I rezised the imagen in Imagenesis ) Attachments:
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 7:29:12 GMT -5
I appreciate your enthusiasm .. but i'm not sure what good it is posting examples of a scrolling "engine" that runs at a abysmal 15 fps just by itself ( without there even being a game ).
Are you looking for feedback? Or are you trying to educate / help others?
|
|
|
Post by mkg on Dec 3, 2013 9:05:49 GMT -5
that's the problem,Is purely made in basigaxorz, i need to learn asm
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 9:49:59 GMT -5
that's the problem,Is purely made in basigaxorz, i need to learn asm No need to learn assembly .. you can make a scrolling engine that runs at 60 fps in BASIC just fine ( proof ).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 10:25:32 GMT -5
Or YouTube affinity sorrow. The later videos use large maps with animated tiles that runs at full speed with zero slowdown, and is coded in bex
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 14:46:34 GMT -5
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 14:54:48 GMT -5
It's not required for proof but it helps to show that it can be done after compiled.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 14:59:17 GMT -5
I think code he can actually view and compile himself would be mroe effective. These guys aren't listening anyway .. in fact i'm not even sure why i'm still posting.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 15:01:25 GMT -5
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 15:02:37 GMT -5
Code isn't effective if the person is just copying and pasting.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 3, 2013 15:03:29 GMT -5
yeah. I didn't trim the attitude out of my comments fast enough. Sorry about that, man! A little grumpy due to not making progress on my own projects.
|
|
|
Post by mkg on Dec 4, 2013 9:36:35 GMT -5
now , anyone can tell me what is making the slowdown in my scrolling engine? I would appreciate it
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 4, 2013 17:32:31 GMT -5
anyone can tell me what is making the slowdown in my scrolling engine? It's simply badly coded. Let me give one example .. you're using the following concept to read data from your map. pointer& = lblptr&(map) x = peekint(pointer&) map: dataint 0,1,2,3 The "x = peekint(pointer&)" line compiles to the following assembly. movem.l d0/d1/d4,-(a7) move.l d2,-(a7) move.l (__LONG_pointer),d0 move.l (a7)+,d2 move.l d0,a0 clr.l d2 move.w (a0),d2 movem.l (a7)+,d0/d1/d4 clr.l d0 move.w d2,d0 move.w d0,(__INTEGER_x) The alternative / correct way of doing these kind of things is as follows. reload map readint x map: dataint 0,1,2,3 The two lines "reload map" and "readint x" compile to the following* move.l #__DATA_Pmap,a6 lea (__INTEGER_x),a0 move.w (a6)+,(a0) Guess which one is faster *When you make sure you sequentially read your data, you even omit the 1st instruction for any consecutive reads.
|
|