Nicht eingeloggt.
Passwort vergessen?


Bitte erst registrieren. Danach ist es möglich Beiträge zu schreiben.



 Nach unten   Vorheriges Thema   Nächstes Thema

#11
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 01.10.2008 5:39
PVB Elite
Dabei seit 25.07.2003
USA
1507 Beiträge
PVBCC 1stCoderContributor#3 PosterHOTY09 EntryLong Time User (15 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
Thanks for the comments... yeah, the player 3D effect isn't perfect on all characters because I'm using kart images from the SNES SMK, and to get the 3D effect I'm using images of a turn slightly off center on each eye, but the original images aren't necessarily good for stereoscopic viewing. I think it looked better than 2D cutouts like I originally was using though, and I plan on tweaking/redoing the graphics for the characters in the future.

The affine ground and parallax are probably not perfect, and I plan on checking over it again in the future, but especially when a map is rotated at intermediate angles there is inherently less precision in the affine tables. Of course imperfections are more visible with textured ground rather than plain ground, but tracks like the Ghost House are much cooler looking than the untextured track in Mario Circuit IMO.

Overall, the minor imperfections weren't worth spending too much time on though, since the idea is to be racing rather than staring at the track ;-). I thought it was more important (and fun) to add some interesting things like having Lakitu, background music, speech, sound effects, rotating camera, etc.

DogP
Nach oben

#12
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 01.10.2008 8:31
PVB Elite
Dabei seit 25.07.2003
USA
1507 Beiträge
PVBCC 1stCoderContributor#3 PosterHOTY09 EntryLong Time User (15 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
Alright... for the people too lazy to burn this to a cart, or those without a cart, here's a video I posted of it on youtube: http://www.youtube.com/watch?v=k2FKFqO8Kpw .

Oh, and to answer the questions about controls... the right trigger is gas, B the is brake/reverse, the left trigger is jump, the left D-Pad turns, and the right D-Pad changes camera angle.

To get the boost at startup you have to do a burnout while waiting for the light to go "green". If you do a burnout too long it stalls... and to get the most boost, you want your engine to be at max rev, and you have to let off the brake the moment before the light changes (if you're holding the brake after the light changes, you spin the tires at the start). It's a little more complex than most Mario Kart games, but I find them to be too easy, and this way can give you a partial boost if you're close, but it's really tough to get the max boost.

DogP
Nach oben

#13
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 01.10.2008 17:07
Nintendoid!
Dabei seit 15.03.2006
Ecuador
236 Beiträge
PVBCC 3rdCoderLong Time User (13 Years)
Hey DogP, I'm really curious about what kind of tricks are you putting off to made all those affine calculations.

I've changed the code provided in libgccvb to use always fixed point math:

typedef struct PDx_ST {
fix7_9 pa;
fix13_3 pb;
fix7_9 pc;
fix13_3 pd;
fix13_3 dx;
fix13_3 dy;
s16 paralax;
} PDx_ST ;

and using the following code to write the param table:


void affineSetAll(u16 param, PDx_ST * pdx, s16 max) {
s16 i ;
AFFINE_ST *affine;
affine = (AFFINE_ST*)PARAM(param);
CACHE_ENABLE;
for (i = 0; i < max; i++) {
fix13_3 iFix = ITOFIX13_3(i);
affine[i].pb_y = FIX13_3_MULT(iFix, pdx->pb) + pdx->dx;
affine[i].paralax = pdx->paralax;
affine[i].pd_y = FIX13_3_MULT(iFix , pdx->pd) + pdx->dy;
affine[i].pa = pdx->pa;
affine[i].pc = pdx->pc;
}
CACHE_DISABLE;
}


but I suspect it is still too slow, are you writing your functions in asm?

jorgeche
Nach oben

#14
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 01.10.2008 17:25
Nintendoid!
Dabei seit 08.08.2007
Großbritannien
201 Beiträge
CoderContributorHOTY09 EntryLong Time User (12 Years) App Coder
jorgeche, you might find some useful tips here:

http://www.coranac.com/tonc/text/mode7.htm
http://www.coranac.com/tonc/text/mode7ex.htm
Nach oben

#15
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 01.10.2008 17:29
Nintendoid!
Dabei seit 15.03.2006
Ecuador
236 Beiträge
PVBCC 3rdCoderLong Time User (13 Years)
Thanks dasi.

jorgeche
Nach oben

#16
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 02.10.2008 3:03
PVB Elite
Dabei seit 25.07.2003
USA
1507 Beiträge
PVBCC 1stCoderContributor#3 PosterHOTY09 EntryLong Time User (15 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
Nope... no ASM (yet). I'm not using the affineSetAll function though... I've rolled the initial calculations of the pa, pb, etc into the same loop, taking out parts that are constant throughout the calculation, and enabling cache over the entire loop (the pa, pb, etc calculations take the majority of the time since the affineSetAll stuff can be done w/ just bit shifts and a few additions). I actually have some other speed improvements that I took out while I was debugging some other stuff which I haven't put back in, since it was working fine, so I'll put them back soon and see what happens.

DogP
Nach oben

#17
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 02.10.2008 4:27
Nintendoid!
Dabei seit 15.03.2006
Ecuador
236 Beiträge
PVBCC 3rdCoderLong Time User (13 Years)
Do you mean something like this?

void affineScale(u16 param, fix7_9 zoomX, fix7_9 zoomY,
····································s16 bg_x, s16 bg_y, s16 fg_x, s16 fg_y) {
········PDx_ST pdx;

········CACHE_ENABLE;

········if(zoomX < 0){

··················fg_x *= (-1);
········}

········pdx.pa = FIX7_9_DIV(ITOFIX7_9(1), zoomX);
········pdx.pb = ITOFIX13_3(0);
········pdx.pc = ITOFIX7_9(0);
········pdx.pd = FIX7_9TOFIX13_3(FIX7_9_DIV(ITOFIX7_9(1), zoomY));

········pdx.dx = ITOFIX13_3(bg_x - (fg_x));
········pdx.dy = ITOFIX13_3(bg_y-(fg_y));

········pdx.paralax = 0x0000;

········{
················AFFINE_ST *affine = (AFFINE_ST*)PARAM(param);

················AFFINE_ST source = {
································pdx.dx,
································pdx.paralax,
································pdx.dy,
································pdx.pa,
································pdx.pc

···············};

················int max = FIX7_9TOI(FIX7_9_MULT(ITOFIX7_9(fg_y << 1), zoomY));

················int i = 1;
················affine[0] = source;
················for (; i < max; i++) {

························fix13_3 iFix = ITOFIX13_3(i);

························source.pb_y = FIX13_3_MULT(iFix, pdx.pb) + pdx.dx;
························source.pd_y = FIX13_3_MULT(iFix, pdx.pd) + pdx.dy;

························affine[i] = source;
················}
········}
········CACHE_DISABLE;
}

jorgeche
Nach oben

#18
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 02.10.2008 4:57
PVB Elite
Dabei seit 25.07.2003
USA
1507 Beiträge
PVBCC 1stCoderContributor#3 PosterHOTY09 EntryLong Time User (15 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
Yeah, all in one function like that, and cache enabled around the whole thing. Of course I'm doing scaling, rotation, and a tilted view, so mine does a lot more computation than that, but I was able to break down all the variables and move some of the calculations outside of the loop and do minimal expensive calculations inside the loop.

DogP
Nach oben

#19
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 02.10.2008 5:10
Nintendoid!
Dabei seit 15.03.2006
Ecuador
236 Beiträge
PVBCC 3rdCoderLong Time User (13 Years)
Cool thanks!, I plan to have different methods for rotating/scaling/skew, etc, to make my Sprite interface very simple:


void Sprite_scale(Sprite this);

void Sprite_rotate(Sprite this, int angle);

and doing the heavy stuff there.

jorgeche
Nach oben

#20
Re: [ENTRY] Mario Kart Virtual Cup
Geschrieben am: 02.10.2008 23:54
VUE(xpert)
Dabei seit 27.10.2007
Schweden
418 Beiträge
ContributorLong Time User (12 Years) 40+ Game Ratings
good game, to bad all the levels are from snes and there are no unique vb levels but still very good

Hope the game will be made within a year, cant wait ;)
Nach oben

 Nach oben   Vorheriges Thema   Nächstes Thema


Bitte erst registrieren. Danach ist es möglich Beiträge zu schreiben.