TDG Development Diary

headkaze · 208825

Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #90 on: September 03, 2009, 08:21:29 am
I guess its for rain and lightning effects? It cant been used another layer with transperancy for such of effect on the top?

The Musician for the RetroBytes Portal Projects.


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #91 on: September 03, 2009, 12:07:12 pm
Yes this is all about a new character we've added to the game who is a ghost who haunts the mansion. Just a new touch to the original game. There are also two extra locations not found in the original. Lobo did a great job on this and they are seamless. I don't want to give much more info about it because for those people who have completed the original game have an extra challenge.

The good thing about setting the global sprites to bitmap mode is you can use both tiled and bitmap sprites.

Anyway I've improved the collision map detection and general way the character moves. Mainly by using floating numbers and rounding (using round, floor or ceil as needed). It feels perfect (to me anyway) now, so I'm happy with the way that works. Now I have just added all the doors as attachments to the levels.

I'll attach a picture showing what I mean. Flash and I used the same technique for Warhawk and again in MMLL. This allows us to dmacopy the section of the map over the visible map to animate it. I've done a slightly different method to describe the location because unlike Warhawk each room can have different animated objects. I have described these objects in the colmap's. So each tile is given an id and during initialization the x,y and width height (aka RECT struct) of tiles with the same id can be calculated and thus animated as needed.

Oh and Flash came up with the idea of animating the clock in the clock room. I thought it was a great idea and gives me a chance to use the pixel drawing code from earlier. So yeah the clock will show the correct game time :)
« Last Edit: September 03, 2009, 12:17:33 pm by headkaze »



Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #92 on: September 03, 2009, 12:30:21 pm
Your posts sometimes are too much complicated for me... what do you mean saying

The good thing about setting the global sprites to bitmap mode is you can use both tiled and bitmap sprites.

 ??? What do you mean with "global sprite"? Of course you can use both sprites and bitmap objects at the same time, you just have to pay some attention at the way you allocate them in VRAM...




Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #93 on: September 03, 2009, 01:49:01 pm
Sorry yes it's the way libnds is designed. I am still getting used to it myself. Last game I worked on we dealt with the registers directly so it is quite new to me aswell.

With libnds you allocate a local copy of oam to manipulate and then update by copying oam to VRAM during vblank (ie. oamUpdate(&oamSub))

Here is the initialization for 256 colour sprites.

Code: [Select]
oamInit(&oamSub, SpriteMapping_1D_32, false);
And this is the initialization of 16 bit bmp sprites

Code: [Select]
oamInit(&oamSub, SpriteMapping_Bmp_1D_128, false);
I don't understand why you need to specify which type your using because you can call either of these

Code: [Select]
m_gfxSub = oamAllocateGfx(&oamSub, SpriteSize_32x32, SpriteColorFormat_256Color);
m_gfxSub = oamAllocateGfx(&oamSub, SpriteSize_32x32, SpriteColorFormat_Bmp);

It must be to do with the amount of VRAM it allocates for sprites. If you call oamInit with SpriteMapping_1D_32 the bitmap sprites are corrupted. So you must use SpriteMapping_Bmp_1D_128 instead and then both 256 color and bitmap sprites work.
« Last Edit: September 03, 2009, 01:52:21 pm by headkaze »



Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #94 on: September 03, 2009, 02:20:39 pm
I've never used oamInit() or  oamAllocateGfx(), I prefer to initialize and allocate sprites by my own.
About memory allocation, there are 4 different choices for sprites (1D mode, I never use 2D mode)
DISPLAY_SPR_1D_SIZE_32
DISPLAY_SPR_1D_SIZE_64
DISPLAY_SPR_1D_SIZE_128
DISPLAY_SPR_1D_SIZE_256
The 1st assigns a tile number every 32 bytes, so it gives you up to 32 KB VRAM for your sprite tiles, the 2nd assigns a tile number every 64 bytes... and so on. (Remember that every 8x8 pixel tile at 256 colors needs 64 bytes ...)

For the bitmap objects, there are only 2 different choices (always speaking about 1D mode)
DISPLAY_SPR_1D_BMP_SIZE_128
DISPLAY_SPR_1D_BMP_SIZE_256
The 1st assigns a tile number every 128 bytes, so it gives you up to 128 KB VRAM for your bitmap objects. (Ok, you haven't got 'tiles' in this mode... let's say it's an offset from the beginning...)

You can mix any of those as long as you pay enough attention, but I'd use those with the same figures in the name (for example: DISPLAY_SPR_1D_SIZE_128 and DISPLAY_SPR_1D_BMP_SIZE_128) unless you're using only small (8x8 pixel) 16 colors sprites, so in that case DISPLAY_SPR_1D_SIZE_32 will give you enough for up to 1024 of them, and you can consider as "reserved" the upper 96 KB of the VRAM bank for bitmap objects using DISPLAY_SPR_1D_BMP_SIZE_128 mode.

But that's not what you're doing (because you're using 256 colors sprite...) so you should change to DISPLAY_SPR_1D_SIZE_64 probably, so having room for up to 1024 8x8 pixel 256 color sprite tiles. (The way you're doing it now limits you to 512 sprite tiles...)

Well, not a big problem, anyway :D

« Last Edit: September 03, 2009, 02:23:40 pm by sverx »



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #95 on: September 04, 2009, 06:09:52 pm
I've recently implemented opening and closing doors (sounds simple but when using screens greater than 256 pixels the DS stores maps in screenblocks and they are a total pain). I have the menu system implemented so you can use the touchscreen to select icons to open and close doors. The only problem is I find it a bit unintuitive having to use the pen. So I think I will have to also add an arrow sprite like the original and allow you to select things using the D pad and A button. I will keep the touchscreen support in there aswell.

Also implemented background animations, like the fireplace and torches :)



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #96 on: September 04, 2009, 06:24:43 pm
Looking great mate!!

Is the icon display going to be bigger in the end? Just a bit too small for my fat arsed fingers.. (I could grow my nails and sharpen them to a point though?)

(I cant be bothered with the pen either)
« Last Edit: September 04, 2009, 06:32:01 pm by Flash »

Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #97 on: September 04, 2009, 07:03:40 pm
I dont plan on making the icons any bigger, I think they are fine especially if I add an arrow to select them instead. I am going to also add a little keyboard somehow for entering stuff. I didn't think that anyone actually used their fingers though? Wouldn't that make the screen all greasy and horrible?

BTW I can't seem to get sprites displaying on both screens. It's really wierd. I didn't have a problem getting sprites on both screens for Warhawk. Anyway I have made a post about it on gbadev.org here so if anyone can help that would be great.



Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #98 on: September 04, 2009, 08:38:31 pm
For the icons and bottom screen in general, I guess keeping the arrow move with D-Pad and stylus as well should do. I would rather 'tap' but some people might prefer the arrow. The only thing that I think is needed is a gap, well 1 px at least (   :) ) between the icons to somehow visually separate them.
Also, I see that it's just a bottom menu hackslashed down there temporary but once you know how to organize the bottom screen then I should draw it proper and align things and such so let me know.



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #99 on: September 05, 2009, 03:47:48 pm
I will be sending you and SF a new demo soon so perhaps you can have a brainstorm then about the interface?



Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #100 on: September 05, 2009, 11:21:22 pm
Yeah, I'm pretty sure about the icons and the frame plus the left side needs to be open for the objects you interact with. However, since all the text has moved to the top screen, there should be one strip left above the icons, maybe the one to provide additional description for stuff. Say, you click on 'look' icon and it says 'Look at..' in the strip? Then you click on the bag and it goes 'Look at bag...it's empty'...that kinda thing?



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #101 on: September 06, 2009, 12:59:53 am
The only problem I'm having at the moment is that the console output area is  smaller than on the C64 but it's not too bad. Your right the text area will also be used to select items to use etc. just like on the C64 version. I've also added a keyboard for entering text.



Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #102 on: September 06, 2009, 02:01:23 am
AaAhh, very Cool, love the keyboard. Just one thing, are the keys big enough? They look a bit smallish especially for people with gorilla fingers <coughflashcough> :D.
Anyhoo, once you know how it goes, lemme know as I would just set the bkg there as well so you don't have to use that one from the game menu.

EDIT: Waitaminutethere! Did you just..didya...didya use some kinda nice shadow drop below the watch???  ???
Ah-mazing!





Seriously!






you have until monday to finish this...
« Last Edit: September 06, 2009, 02:09:09 am by Lobo »



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #103 on: September 06, 2009, 05:18:58 pm
Currently you have to use the keyboard with the pen, but I find most onscreen keyboards (including the one in Pictochat) also requires the pen. There is only one part of the game where you have to type something in so you will need to take it out then. I guess I could make it bigger but with size contraints and the fact it's only used once I think it will do the job okay. Sorry Flash you big awkward gorilla fingers guy you! Oh yeah and there will be an onscreen pointer you can bring up with the "A" key so you don't have to use the pen if you don't want. I just gotta figure out why I can't get sprites displaying on both screens right now.. hmmm...

Oh and yes the cool little drop shadow effect is done by a special HDMA technique that I used in Warhawk for colour cycling text and spotlight effect. It just means you can set values in a register during HBLANK by giving it a simple lookup table. Very simple to do but a great effect and to be honest, after adding the effect I think it's an essential part of the look now!

BTW I can read super duper small fonts and I'm sorry but I need at least until thursay for this one I'm afraid!  :D



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #104 on: September 06, 2009, 05:27:42 pm
The font need to been mear clear and is very much wanish out due the light gray background.

Can you teel which events and locations I should create music for? I was in recently creating music for miner as well, but need doing this game as well finished.

I guess one of them is when weapon being found, and there is still a guitar riff in original sid not used in the new main theme, but that riff can been used there instead?

The Musician for the RetroBytes Portal Projects.


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #105 on: September 06, 2009, 09:17:54 pm
Well, blimey but it's a great effect right there, so 'simple' but it adds so much. Also, yeah I think the keys are big enough they just need to be redrawn to 'look bigger' as they now blend and all (gray+white not good as spacefractal said). Some gorillas might be happy then, some fathers/brothers might get a furburger even. Anyhoo, again, send the stuff when you're ready.








ps. Thursday is fine...make it Wednesday.



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #106 on: September 06, 2009, 09:28:46 pm
SF: There are a few events that could do with some mini tunes. I think one for when you find evidence, also I wanted a soundtrack in the main game. After the intro song finishes playing I want an amient track for when you are just walking around the place. I guess something like the music from Halloween?



Or perhaps it would be better with just a sfx track? Creaking doors and things like that? I don't know. Some other stuff needed is rain and thunder for the outdoor areas. There are some really nice samples for weather fx here

I was thinking of just using samples for the rain and thunder but I guess a small mod would be better. I can still have the background flash white randomly for lightning. And when you think about it lightning and thunder is never in perfect sync.

Lobo: I just got an updated pack ready to send to you with all the current graphics including the keyboard. Just be aware that the keys are currently in 8x8 areas because I use a font overlay (it makes it much easier that way really) it also means I don't have to make a map with non 8x8 offsets. If the keys are made to look bigger it will just mean you will think your pressing a key when your not. I don't know; if it's a real problem I may have to re-design the keyboard but there is more important stuff to work on right now.

Next up I have the inventory system (picking up and dropping objects) and then adding in the other characters moving around the mansion.. then the event system. Oh yeah I may end up adding the arrow cursor now that I have sprites working on both screens :)



Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #107 on: September 06, 2009, 09:55:18 pm
I let me inspirated by that track, which is a great one for a ingame like this. It would been a diffecent xm, due I not playing to share any instruments. If no instruments is shared it better own xm, but I guess you can control that quite fine now. 300kb is okey as max? I think I did have about 1.5mb total?

I think it would pretty much a original piece.

I also see I do a little weather mod as well (4 channels, can this been xm as well?).

The Musician for the RetroBytes Portal Projects.


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #108 on: September 06, 2009, 10:17:28 pm
For the sfx mod it needs to be 4-channel but I think XM format is okay. MaxMod can use Jingle's that play alongside another mod. You still have about 1.5 MB left for music. Maybe more but I want to make sure there is room for everything else (including sfx, code, and possibly more gfx).



Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #109 on: September 06, 2009, 10:20:38 pm
Goody, just checked the demo for a sec, already kickass!  Gonna check out the gfx stuff tonight and yeah, 8x8 should be fine.   8)



Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #110 on: September 07, 2009, 08:51:16 am
I've seen the screenshot... wow, I really didn't think that darkening effect of the higher part of the screen could be so effective :) Really cool, man! :)

Bye!



Offline sverx

  • RBP Member
  • IBM PC
  • *****
    • Posts: 516
  • "Ow!!! What's that ?!?!"
    • My NDS folder
Reply #111 on: September 07, 2009, 09:30:14 am
BTW I can't seem to get sprites displaying on both screens. It's really wierd. I didn't have a problem getting sprites on both screens for Warhawk. Anyway I have made a post about it on gbadev.org here so if anyone can help that would be great.

Uh-oh, I'm late, as usually... Btw, yeah, I never liked how they defined those defines, it's really prone to generate errors.  :-X




Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #112 on: September 08, 2009, 03:01:41 pm
Look more more cool in the lastest demo.

- The title screen does not stay (nice one Lobo). Missing some sort of "touch to start or somewhere".
- Would been nice to use buttons direcly example to open and close doors without icons at the bottom screen.
- Doors can sometimes been stuck in open state, and can been very hard to close it again, after you have walked away from it. Need to been more tolerance.....
- Top shadow on watch is nice and cool.
- The 6 Icons if you ask me is also too small and need to been bigger. Why the gray area under them? Can they not been used, so it can been bigger by height (the gray area is NOT need to been used by the arrow) and I think that would been fine for the arrow version?
 + Alternativ it could been a big overlay version after have pressed on a button which can replace these 6 icons (so in that whay they can been bigger and easier). This alternative control method can been done by a option on the title screen and would been more touchscreen friendly, since both method should been keept.
« Last Edit: September 08, 2009, 03:06:10 pm by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #113 on: September 08, 2009, 06:43:57 pm
Think that 'Touch to Start' or 'Press play to...er' will probably be in the scroller, like in the original.
As for the icons, I wouldn't mind bigger ones either because I think that there is a lot of space actually left in there.
Left side has the written choices so that's Ok. Small description can be written in the strip above and since you see 6 icons the most at any given time (lots of time less-like 3), they might be bigger methinks.
Of course, maybe it's not gonna work so let's see what the others think.



Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #114 on: September 08, 2009, 10:18:34 pm
I just put Lobo's titlescreen piccy to show for a bit. I haven't even started on the proper titlescreen yet, but it will be like the original where each character appears from a questionmark and a description is shown.

I haven't done much lately as I had a bit of a break but just finished a simple little path finding rountine so now I can implement characters moving from place to place.

I'm still not sure about what to do with the interface yet. I think I'll wait until I have the item selection done as I may need to rethink things then. I think the main problem is the space for the text to the left of the menu not being wide enough.



Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #115 on: September 08, 2009, 10:28:40 pm
I think the main problem is the space for the text to the left of the menu not being wide enough.

Yep, that's the one I'm thinking of too. Do the check and if it fits then maybe icons can be a bit bigger. Other than that, I would rather prefer them at this size with 3 in a row then 2 in a row just to make it bigger, methinks its not hard to select them, except of course gorilla fingers :D.



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #116 on: September 08, 2009, 10:40:09 pm
gorilla fingers?

Who may that be...

I find "touch screen to start" tricky..

 :(

Coding for the love of it!


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #117 on: September 08, 2009, 10:41:57 pm
 :D
Well I find THAT easy! Press it with your thumbs (or banana) once it says 'health warning-ds is not healthy, etc.'



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #118 on: September 08, 2009, 10:45:35 pm
I tend to throw the DS and hope it catches a corner...

Coding for the love of it!


Offline Lobo

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 3119
    • Spitoufs
Reply #119 on: September 08, 2009, 10:48:24 pm
I opened it up once and spider came out..heh.