|
Post by salamiboy2 on Apr 16, 2016 9:34:00 GMT -5
Hey. I used to be quite skilled at BasiEgaXorz (when I was acting stupid as beginnerxorz) but having not used it in a while some of the stuff I used to know just vanished. POOF! So finally I've taken your suggestions. I'm now posting all my questions in this one thread to save space.
First of all, I've totally forgotten how to draw image maps. I want to do it, so there won't be tons of black tiles in the file that take up 1/2 the space. Thanx.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 16, 2016 10:25:30 GMT -5
I've totally forgotten how to draw image maps. Please read the documentation / search the forum / check the examples drawtiles map,0,16,10,8,8
map: data 8,8,8,8,8,8,8,8 data 8,0,0,0,0,0,0,8 data 8,7,0,0,0,0,0,8 data 8,8,0,0,0,7,7,8 data 8,0,0,0,0,8,8,8 data 8,0,0,0,0,0,0,8 data 8,0,0,0,0,0,0,8 data 8,8,8,8,8,8,8,8
|
|
|
Post by salamiboy2 on Apr 16, 2016 11:13:58 GMT -5
I've totally forgotten how to draw image maps. Please read the documentation / search the forum / check the examples Thanks, but since my tilemaps are in DATAINT mode they come looking like rubbish:
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 16, 2016 14:46:10 GMT -5
Thanks, but since my tilemaps are in DATAINT mode they come looking like rubbish The DrawTiles command only works with a 8-bit map. If you need to use a 16-bit map ( for example when your map uses more than 256 different tiles ), you can use the DrawTiles16 routine written by Mairtrus .. Declare Asm Sub DrawTiles16(d5.l, d0.w, d1.w, d2.w, d3.w, d4.w) movea.l d5,a0 subq.b #1,d2 subq.b #1,d3 move.w #$2700,sr and.l #63,d0 and.l #63,d1 and.l #511,d2 and.l #511,d3 lsl.w #6,d1 add.w d1,d0 move.w d2,d1 lsl.l #3,d0 lsr.w #2,d0 swap d0 add.l (GFX_PLANE),d0 move.w #$8F02,4(a4) @1: move.l d0,4(a4) @2: move.w (a0)+,d7 add.w d4,d7 move.w d7,(a4) dbf d2,@2 add.l #$800000,d0 move.w d1,d2 dbf d3,@1 move.w #$2000,sr End Sub .. which uses the following syntax: DrawTiles16 <map_address>, <x>, <y>, <width>, <height>, [tile vram offset]
|
|
|
Post by salamiboy2 on Apr 17, 2016 4:12:46 GMT -5
YES! It works really well! My picture looks really good now! That's that question sorted out. I'll post here again when I want to know something else. But for now, I'll carry on with my game
|
|
|
Post by salamiboy2 on Apr 17, 2016 6:26:26 GMT -5
Okay, I have got another question. I've made scrolling in my game. When it gets to "game over", it seems to center where the scrolling was (if you know what I mean) How do I reset the scrolling? I've tried switching planes and such, but they don't do a damn thing.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 17, 2016 6:44:16 GMT -5
How do I reset the scrolling? Using the Scroll2 command you can set the absolute scrolling values of the active plane ( SetGFXPlane ). So for instance the following snippet resets the scrolling of plane A. setgfxplane scroll_a
scroll2 right, 0 scroll2 up, 0 By the way, judging from the screenshot you posted it seems unlikely you actually need a 16-bit map .. in which case your map is twice the size ( bytes ) that it needs to be.
|
|
|
Post by mekanaizer on Apr 21, 2016 5:06:19 GMT -5
Since he said that there are 1/2 of black tiles on his picture I think he used 16bit. He should have croped the picture first!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 21, 2016 6:50:27 GMT -5
Since he said that there are 1/2 of black tiles on his picture I think he used 16bit. He's using a map to draw his image, so a thousand black tiles will still only account for one tile / index in total.
|
|
|
Post by salamiboy2 on Apr 25, 2016 6:14:05 GMT -5
I have everything with my game sorted now. I'll start a new project later on
|
|
|
Post by Sg on Jun 11, 2016 18:21:37 GMT -5
i use this thread for posting some questions question too
How duplicate the same sprite 10 times in different coordinate positions at the same time ?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 12, 2016 8:32:33 GMT -5
i use this thread for posting some questions question too How duplicate the same sprite 10 times in different coordinate positions at the same time ? A sprite can be only in 1 given place at a time, so there's 3 options for you: 1. Create 10 total sprites and place them where you need them to be 2. Use flickering 3. If they're just static sprites (ie, will never move), you can draw them on a background plane and use collision detection to interact with them
|
|
|
Post by Sg on Jun 12, 2016 8:47:59 GMT -5
thank you very much elusive
i have another question
i have a charachter sprite and when i jump (if j.0) , when the guy is ine right direction but dont move, he do a static jump (sprite in right direction) but when he is in left direction and dont move, he do a static jump with horizontal flip sprite (in left direction )but i try different things , it doesn't work i know how to do the feature = propsprite c,128+hfliptile(j.0),1, but if i use j.0 , he do 2 jumps , in the 2 directions How do you make that?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 12, 2016 9:03:40 GMT -5
Okay, I think I understand what you're trying to do.
For flipping a sprite (or tile), you don't want to use the joypad variable (once you release it, the value goes away). I'd suggest trying something like:
if j.2 then flipvar = 0 if j.3 then flipvar = 1 PropSprite MySprite,128+hFlipTile(flipvar),1
|
|
|
Post by Sg on Jun 12, 2016 9:21:04 GMT -5
OK but if i use if j.2 and j.3 , the charachter move and i want a static jump
|
|