This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Sonic => Your Projects
United-TI Archives -> Sonic
 
    » Goto page Previous  1, 2, 3, 4, 5, 6 ... 36, 37, 38  Next
» View previous topic :: View next topic  
Author Message
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 27 Dec 2004 04:20:48 am    Post subject:

Good idea. I assume since the scrolling engine is mostly done we can move straight to character movement?
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 31 Dec 2004 11:52:09 am    Post subject:

yep...exactly! I still cant get the thing to compress! I get a negative compression! I must be doing something wrong... Laughing But I have gotten the new titlepic done...oh about a week ago! I will send them to Digi to compress and then we can go from there. I'll send him the GS and the B&W one...did you want me to invert it? Cause I can do that too. I'll send him an inverted one and the regular and we can see once I get it done which saves more bytes.
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 31 Dec 2004 02:22:59 pm    Post subject:

Wait.. How does the compression work again? And why don't you guys come on IRC?
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 31 Dec 2004 05:59:21 pm    Post subject:

The compression prog just looks for repeating binary patterns, and uses flags to describe how long the pattern is. Naturally, that doesn't work for 'complex' patterns text and some graphics. I'll try recompressing the new sonic title to see if I can get another good ratio out of it.
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 03 Jan 2005 11:27:47 pm    Post subject:

Sorry about the delay, but I finally compressed the new graphics. I got the b&w down from 768 to 580 (25%), and the gs one down from 1536 to 850 (45%). Pretty good numbers. Laughing
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 04 Jan 2005 07:56:42 pm    Post subject:

Awesome man! That is totally a about the ratios! I'll post a new pic of the B&W titlescreen also I'll post the GS one tonight also! Thanks a bunch man! :D


(edit)
B&W:GS:


Last edited by Guest on 04 Jan 2005 10:01:01 pm; edited 1 time in total
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 06 Jan 2005 10:38:38 am    Post subject:

The graphics seem to be going well!! Now I just wonder if there's more people to help.
Back to top
L-Man


Newbie


Joined: 04 Nov 2004
Posts: 19

Posted: 06 Jan 2005 07:20:22 pm    Post subject:

wow guys they look awesome (the pics)! so anything on the actual engine of the game? Keep it up guys!! Very Happy Very Happy
Back to top
koolmansam375


Advanced Member


Joined: 09 Oct 2004
Posts: 254

Posted: 07 Jan 2005 06:09:30 pm    Post subject:

As much as I like the grfx (and I like them a hell of a lot! gj Madskillz!) isnt it more important to work on the main engine first? A really cool title screen means nothing if you never do the actual game engine.
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 07 Jan 2005 11:19:22 pm    Post subject:

That is true...I didn't actually wanna make this game, right now, fulltime. I simply wanted to get some life back into it...and at least give something for people to look forward too. Mike did say he has a scrolling engine, that should work for this type of game. Once we got that, we can go from there!
Back to top
tr1p1ea


Elite


Joined: 03 Aug 2003
Posts: 870

Posted: 11 Jan 2005 10:02:30 am    Post subject:

So there IS some progress with this game.
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 11 Jan 2005 10:22:52 am    Post subject:

tr1p1ea wrote:
So there IS some progress with this game.

LOL. Of course there is. We're working on it. Wink
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 11 Jan 2005 12:05:37 pm    Post subject:

I wouldn't worry too much about the development order. Actually, I always start with the title first. In a large project, it natural to target the simpler tasks first and build your program from the ground up. Plus, it gives us a few extra weeks to figure out what to expect from the engine before we dive into it.

But now that the title screen is out of the way, it should be safe now to start on the graphics engine. Before that, we might have to figure out the max level size (if there's going to be such a thing) for scrolling purposes. I'm guessing each level is going to be around 1k, so if you want, you can reuse the decompressor that's already in the game to ZCP encode the levels.
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 12 Jan 2005 10:04:10 am    Post subject:

Yes, reusing the ZCP compressor would I think be a grand idea. Since we already used it one, and got fairly awesome results, I think it is safe to say, that we will use it for the levels too! No if I could just get in touch with Mike... Very Happy

Also...about getting the titlepic done first...I, like Digi...roll with the same philosophy. I think once you get that done, the stuff just seems to come together more. The title is more than just a menu, it can tell you so much more about the game. i.e. if the graphics and gameplay will be good...and it can show how much time was spent on the game. (That goes along with the graphics/gameplay)One of the easiest parts...of the game, but it is a very important part! Very Happy
Back to top
koolmansam375


Advanced Member


Joined: 09 Oct 2004
Posts: 254

Posted: 14 Jan 2005 01:36:25 pm    Post subject:

Madskillz wrote:
The title is more than just a menu, it can tell you so much more about the game. i.e. if the graphics and gameplay will be good...and it can show how much time was spent on the game. (That goes along with the graphics/gameplay)One of the easiest parts...of the game, but it is a very important part! Very Happy

True, (usually, TVF doesnt have one and in Desolate its like the 3rd thing you see) the first thing you see when the game starts up is a title screen. First impressions can mean alot but some games (Jezzball, Falldown, Avalanche) use the same type of Ion-esque title screen and there good fun entertaining games.
Back to top
Mike_k


Newbie


Joined: 16 Sep 2004
Posts: 45

Posted: 14 Jan 2005 02:12:34 pm    Post subject:

Alright! I'm here. And with the scrolling / tilemapping routine all in one. I can't remeber who developed this, but much thanks to them. Now onto the code, basically viewx and viewy are what control the window. Increasing either by 32 will cause the engine to rotate one pixel next cycle. This way, you can have the screen scroll 2 pixels if viewx is 64, and so on. viewx and viewy can also be less than 32, scrolling the map less than one pixel per frame. Quite useful, and comes with a tilemapping routine! Here is the code:


Code:
;------------------
;- backgroundDraw -
;------------------
; this is the all-purpose scrolling routine!
; no need to modify anything here, just cut-and-paste  

backgroundDraw:
   di

   ld a,$80
   out ($10),a;row inc mode
   
   ld hl,(viewX)
   call convHLtoPixels
   ld a,l
   cpl
   and 7
   add a,a
   ld h,0
   ld l,a
   ld bc,shfXadrs
   add hl,bc
   ld a,(hl)
   ld (shfXadr),a
   inc hl
   ld a,(hl)
   ld (shfXadr+1),a
   
   ld hl,(viewY)
   call convHLtoPixels
   ld a,l
   and 7
   ld (shfY),a

;viewY/8 * mapWidth
   ld hl,(viewY)

   ld a,(mapWidth)
   ld e,a

Mul8b:; this routine performs the operation HL=H*E
   ld d,0; clearing D and L
   ld l,d
   ld b,8; we have 8 bits
Mul8bLoop:
   add hl,hl; advancing a bit
   jp nc,Mul8bSkip; if zero, we skip the addition (jp is used for speed)
   add hl,de
Mul8bSkip:
   djnz Mul8bLoop
   
   ex de,hl
;viewX/8
   ld hl,(viewX)
   ld l,h
   ld h,0
   add hl,de
   ld de,(mapAdress)
   add hl,de;hl = tilemappos
   
   ld ix,plotsscreen
   
   ld a,$20
   ld c,a

bigloop:
;increment column
   inc c
   out ($10),a
   
   push bc
   push ix;save plotsscreen
   
;=== draw upper tile
   ld a,(shfY)
   ld (Ybegin),a
   cpl
   and 7
   inc a
   ld (Ylength),a
   
;=== set row to zero (temp between here)
   ld a,$80
   out ($10),a

   push hl
   call drawtile
   pop hl
   ld de,(mapWidth)
   add hl,de
   
;=== draw middle 7 tiles
   ld a,8
   ld (Ylength),a
   xor a
   ld (Ybegin),a
   ld b,7
midloop:
   push bc
   push hl
   call drawtile
   pop hl
   pop bc
   ld de,(mapWidth)
   add hl,de
   djnz midloop
   
;=== draw bottom tile
   ld a,(shfY)
   and 7
   ld (Ylength),a
   xor a
   ld (Ybegin),a
   
   push hl
   call drawtile
   pop hl
;ld de,32
;add hl,de
   
   ex de,hl
   ld hl,(mapWidth)
   add hl,hl
   add hl,hl
   add hl,hl
   ex de,hl
   or a
   sbc hl,de
   inc hl
   
   pop ix
   inc ix

   pop bc
   ld a,c
   cp $20+12
   jr nz,bigloop

   ret

;========================
; drawtile
;========================
; this is needed by drawBackground!
; INPUT: hl = tile
; YScroll = mod(Y/  

drawtile:
   push hl
   ld a,(hl)
   ld h,0
   ld l,a
   add hl,hl
   add hl,hl
   add hl,hl
   ld de,tiles
   add hl,de
Ybegin = $+1
   ld bc,$00
   add hl,bc;add Y scroll
   ex de,hl;de = tilepos 1
   pop hl
   inc hl
   ld a,(hl)
   ld h,0
   ld l,a
   add hl,hl
   add hl,hl
   add hl,hl
   push bc
   ld bc,tiles
   add hl,bc
   pop bc
   add hl,bc;add Y scroll
;hl = tilepos 2

Ylength = $+1
   ld b,0
   ld a,b
   or a
   ret z
   
   push hl
   ld hl,(shfXadr)
   jp (hl)

shf1:
   pop hl
shf1loop:
   ld a,(de)
   ld c,a
   ld a,(hl)
   srl c
   rr a
   call screenupd
   djnz shf1loop
   ret

shf2:
   pop hl
shf2loop:
   ld a,(de)
   ld c,a
   ld a,(hl)
   srl c
   rr a
   srl c
   rr a
   call screenupd
   djnz shf2loop
   ret

shf3:
   pop hl
shf3loop:
   ld a,(de)
   ld c,a
   ld a,(hl)
   srl c
   rr a
   srl c
   rr a
   srl c
   rr a
   call screenupd
   djnz shf3loop
   ret

shf4:
   pop hl
shf4loop:
   ld a,(de)
   ld c,a
   ld a,(hl)
   srl c
   rr a
   srl c
   rr a
   srl c
   rr a
   srl c
   rr a
   call screenupd
   djnz shf4loop
   ret

shf5:
   pop hl
shf5loop:
   ld a,(de)
   ld c,(hl)
   .db $CB, $31;SLL c (unsupported by tasm)
   rl a
   .db $CB, $31
   rl a
   .db $CB, $31
   rl a
   call screenupd
   djnz shf5loop
   ret

shf6:
   pop hl
shf6loop:
   ld a,(de)
   ld c,(hl)
   .db $CB, $31
   rl a
   .db $CB, $31
   rl a
   call screenupd
   djnz shf6loop
   ret

shf7:
   pop hl
shf7loop:
   ld a,(de)
   ld c,(hl)
   .db $CB, $31
   rl a
   call screenupd
   djnz shf7loop
   ret

shf8:
   pop hl
shf8loop:
   ld a,(de)
   call screenupd
   djnz shf8loop
   ret

screenupd:
   push bc
   ld b,(ix)
   xor b
   out ($11),a
   ld bc,12
   add ix,bc
   pop bc
   inc hl
   inc de
   ret


shfY: .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
shfXadr: .dw 0
shfXadrs: .dw shf1, shf2, shf3, shf4
   .dw shf5, shf6, shf7, shf8

speed: .dw 0
speed2: .dw 0
time: .dw 0
time2: .dw 0
angle: .dw 0
angle2: .dw 0
angle3: .dw 0
calcmapvar: .dw 0
hlvar: .dw 0
   


;=== convHLtoPixels
; drawBackground and drawTile need this routine!
; INPUT: HL
; converts the detailed fixed point coord in HL to coord in pixels
; hl = (BBBBBBBB BBB.BBBBB) -> (BBB BBBBBBBB)
convHLtoPixels:
   push de
   ld d,h
   ld e,l
   srl d
   rr e
   srl d  
   rr e  
   srl d  
   rr e     
   srl d  
   rr e
   srl d
   rr e
   ld h,d
   ld l,e
   pop de
   ret


;=====================
;=== MAP VARIABLES ===
;=====================
; this are the variables needed by the map drawing routines
; you can change these in-game, of course!
; viewX is the X location of the left boundary of the screen.
; viewY is the Y location of the upper boundary of the screen.
; You can increase/decrease the coordinates by increasing/decreasing
; it by 32. You can also increase it by less then one pixel,
; this will make the screen increase/decrease by one pixel each few frames.


viewX: .dw 0;starting X
viewY: .dw 0;starting Y
;viewx equ saferam2
;viewy equ saferam2+5
mapAdress: .dw map;location of current map
mapWidth: .db 20;width of current map (in # of tiles)
   .db 0;just leave this here  

;================
;=== MAP DATA ===
;================
; here comes your map!

Map:;data examples
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2
   .db 1,0,1,0,1,0,1,0,1,0,1,0,2,1,2,1,2,1,2,1
   .db 0,1,0,1,0,1,0,1,0,1,0,1,1,2,1,2,1,2,1,2

;=================
;=== TILE DATA ===
;=================
; here come your tiles!

Tiles:
   .db 00,00,00,00,00,00,00,00;tile 0
   
   .db %00010000;tile 1
   .db %10000010
   .db %00100000
   .db %00000100
   .db %01000000
   .db %00010010
   .db %00000000
   .db %10000100
   
   .db %01010101
   .db %10101010
   .db %01010101
   .db %10101010
   .db %01010101
   .db %10101010
   .db %01010101
   .db %10101010


Copy and paste, and let me know if you have difficulties, I may have left something out.

-Mike
Back to top
shadowing
Powered by 64


Calc Guru


Joined: 06 Jan 2004
Posts: 1002

Posted: 14 Jan 2005 06:29:18 pm    Post subject:

That code seems pretty useful. It seems to be a code I was looking for before. Thx.
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 14 Jan 2005 06:57:12 pm    Post subject:

DigiTan wrote:
Sorry about the delay, but I finally compressed the new graphics.  I got the b&w down from 768 to  580 (25%), and the gs one down from 1536 to 850 (45%).  Pretty good numbers. Laughing

Have you tried using either PuCrunch or APack compression?
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 14 Jan 2005 08:08:07 pm    Post subject:

Actually, I've never heard of that one. What are the specs on it (horizontal compression or vertical)? Would it help out alot on graphics?

Last edited by Guest on 14 Jan 2005 08:08:17 pm; edited 1 time in total
Back to top
Madskillz


Active Member


Joined: 02 Jan 2004
Posts: 608

Posted: 17 Jan 2005 10:30:08 am    Post subject:

So, shadowing, I take it you are doing the rest correct? By the way, I think I can save even more bytes on the title screens! Also, I haven't looked into any of the other compressors, I did however, glance at the APack compressor. I have it on my comp, we'll see if I need to use it.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3, 4, 5, 6 ... 36, 37, 38  Next
» View previous topic :: View next topic  
Page 5 of 38 » All times are UTC - 5 Hours

 

Advertisement