I'm using a older version of dolphin, ver3.0 Versions above that will give random wiimote movements running homebrew, anyone one why this is?by Titmouse - Coding
Component cable plugged into a Samsung HD 1080p, does look nice! (so no real need for tv settings, wii settings are on HDTV 480p / wide) (In the past I did use 678 on CRT TV with good results, via scart RGB) Owen, what results do you get with the new code above (better with or without for left/right borders only)? One quick way to test your display is to add 4 extra wii screen pointers relaby Titmouse - Coding
Given this a quick go under via wii emulator - looking good Owen. Idea: Defend your mother ship and mining vessels from pirates while the mining vessels extract stuff from the asteroid belt return it to the mother ship. Each level can be randomly generated with resources stretched out more, later you can add R&D and all the bells and whistlesby Titmouse - Testing Corner
Using this example now (stops the left/right border showing a dead space by stretching) 678 is a tried and tested value, works well for me as a starting default. GXRModeObj* WiiManager::GetBestVideoMode() { GXRModeObj* vmode = VIDEO_GetPreferredMode(NULL); // get default video mode if (CONF_GetAspectRatio() == CONF_ASPECT_16_9) { vmode->viWidth = 678; vmode->viXOrigin = (by Titmouse - Coding
I'm too lazy for all that, do most my debugging via Dolphin emulator, printf's are sent via the log window. The Emulator is good at finding hardware programming type bugs that don't show up on the wii straight away, plus you can turn on fancy display features to help your developement. Thinking of adding a special mode that uses the SMB network, same aim as DRS_ but you can aby Titmouse - Coding
After posting I've looked at the libs source, noticed my code could do odd things since VIDEO_GetPreferredMode can return these; Component Cable: TVNtsc480Prog,TVEurgb60Hz480Prog,TVPal576ProgScale,TVMpal480Prog Without Component Cable: TVNtsc480IntDf,TVEurgb60Hz480IntDf,TVPal576IntDfScale,TVMpal480IntDf Think I'll run some tests with a edge border test graphic to see if at leasby Titmouse - Coding
Help - with the latest libs, anyone know if we still need to tweak the results from VIDEO_GetPreferredMode to get the most from the visible display. I'm thinking the latest lib now has TVPal576IntDfScale, so this code bellow may now be outdated. I.e. I used to do something like this, but I've just refresh to the latest libs and found this may now break things. GXRModeObj* WiiMaby Titmouse - Coding
Yes the GameLogic::GunTurretLogic() has gotten big, don't think encapsulation it the right word (as the function makes use of classes). More a case of me being lazy and not breaking up the complexity, it is in need of a refactor (but that will never happen). It was originally under 1/2 the size – then I added bullets because it reused calculations and saved having to iterate the list all ovby Titmouse - Coding
#define guMtxRotDeg(mt,axis,deg) guMtxRotRad(mt,axis,DegToRad(deg)) #define guMtxRotAxisDeg(mt,axis,deg) guMtxRotAxisRad(mt,axis,DegToRad(deg))by Titmouse - Coding
I see, think I have something close. Take a look at my bolt thrower code, void GameLogic::GunTurretLogic() look for something like // use bone points for both turret barrels. Allows shots to fired out the end of the barrel in 3D. GameLogic::GunTurretShotsLogic does the detection (I use radius detection) this does 2D detection, ignores z. But the shots are moving on screen in 3D its just finaby Titmouse - Coding
Owen, Not sure if you are aiming for the thing as the example I gave in this same thread (posted January 28, 2012 12:10PM) Keep in mind you can simplify your code - remove the first guMtxIdentity and last guMtxConcat (and use something like single param guMtxTrans so no need for identity) Note that guMtxApplyTrans and guMtxTransApply do not do the same thing. (is guMtxApplyTrans what you nby Titmouse - Coding
Owen, my mind is probably playing tricks with me – think a while back you said you might use the C++ compiler on plain C code to get nice things like strings for free, that sounded like great plan for starters. ( when you feel ready giving containers a go - honestly you would love them, saving huge amounts of time buy using them and they cut down on bugs! Arrays really are nasty things of foulby Titmouse - Coding
Owen, have a think about using C++ & STL containers - lends itself well to things like that.by Titmouse - Coding
tueidj - I see, thanks for the info. Sorry Owen, hitting your thread a bit hard now wth off subject matters ;)by Titmouse - Coding
wilco2009 - I'll keep a look out for your space shooter in the near future, must admit I'm starting a 3D shooter myself, based kind of on the 3D intro scene from my Bolt Thrower game. I'm just pondering on using quaternions (I think rather than say changing Up, Right and Front ) since I'll have all types of camera views, gimbal lock in general will be an issue for me. Yesby Titmouse - Coding
Owen, for a asteroids you only need to spin arround two axis. (think you know that) What you have looks spot on - just leave one spin axis as zero.by Titmouse - Coding
wilco2009 – do you have any open projects (i.e. shared Google code) with these techniques. (your wii brew link is blocked) Things like guVecScale(&player_front, &player_front, -1); // to flip, is something I would not thought of doing, obvious now I've seen it! Infact I've never though about changing things like the up,left vectors, to alow for 360 rotation without issues!by Titmouse - Coding
Owen, same thing as my example code post to this thread on January 28, 2012 12:10PM (I optimized a little and has things like scaling too) But yes it looks like it should work fine. Please note: You will need to read up on gimbal lock - this method will fail if you use it the wrong way!!!by Titmouse - Coding
Array & functions yes - but structures using pointers for you? (just checked guVector is a struct), new one on me! that would break C. Is it in some way marked as an array, hidden away somewhere - I've yet to see this How does it do this???by Titmouse - Coding
good tips from wilco2009 Owen, small speed up for you... (I've left the return by value as is) Code snip... guVector get_rotation_degrees_to_face_target(guVector* pCurrent, guVector* pTarget ) { float dx = pTarget->x - pCurrent->x; float dy = pTarget->y - pCurrent->y; float dz = pTarget->z - pCurrent->z; ... rest the same example calling code.. guVector p1 = {by Titmouse - Coding
Computer_graphics_-_common_problems I've just cut and paste the sites code and changed to use things like using guVector (may not compile, just an example) It's the same method as my turret rotation - my link example was rotating a 3D model in space not flat 2D! void calcPitchAndYaw( guVector* c, guVector* targetP, float* pitchX, float* yawY ) { float dX = targetP->x - c->by Titmouse - Coding
Owen, for some extra reference see, GameLogic.cpp under void GameLogic::GunTurretLogic() .. look for comment // Get Direction Vector for the Turret My lock on stuff looks very close to what your doing above (but keep in mind my maths is very poor so use it as a helper)by Titmouse - Coding
Owen Q: for you - are you at this state yet - i.e. rotate,scale & translating objects independent of the camera. I use this but it suffers from gimbal lock (I'm looking into using quaternions, but I'm finding it hard going) The rotation part is giving me big problems (gimbal lock) Are you turning the car on just one axis - so don't suffer from gimbal lock? // suffers from gimbby Titmouse - Coding
I've found GRRMod to work well for mods - plays loads of module types without random bad notes. Libmodplay is OK but it's now seen its day. However I did need to add a few changes/fixes for it to become useable - as playing other sounds at the same time while it was in use caused bad noises at the start of any new sounds. go here for fixed version - or downloaded the original andby Titmouse - Coding
I'm probably going to use this for my stuff (sorry lost 1/2 in the original cut'n'paste in my above post) It's my test routine, so has fudged static floats which need replacing if you need to use more wiimotes. Becomes more accurate over time (few seconds of play!) but will still work very well before that point, it's just finding the optimum center for the -/+ levels.by Titmouse - Coding
Owen, best avoid using the center.x/y values, please consider calculating them as in my first example - I would never use these center values myself. Please note: One of my 2 nunchucks (mine are all identical & nintendo make) does not work with any wii brew but works just fine with normal games I don't think I've found a single wii brew app that it works with!!!, yet my code doesby Titmouse - Coding
Second part of the first post does use dynamic min & max? Just as long as a dead zone is given allowing for all types of nunchucks. This is the method I'm using - but I've only been look at nunchuck coding for a day - so this is my first attempt, any issues let me know (it's self configuring and gives -1 to 1 values that I find useful) static float offsetX(0); if ( (by Titmouse - Coding
I've found the values from nunchuk.js.center (expansion_t structure) give wild x/y results, it will work fine for one nunchuck yet not for another. Both my nunchucks are Nintendo and both work fine for official games. I've fixed this with the second example - both of my nunchucks work fine for wiibrew now. I'm going to avoid using the expansion_t structure's centre valuby Titmouse - Coding
That behavior does sound very odd. What happens if you call the texture loading twice just own its own as a test - does it still crash? Jpg does have a few file variations (so some loaders can’t cope) but from what you say, it loads and works first time. I don’t use things like grrlib myself, so I not going to be much help beyond this point. You could try http://wiibrew.org/wiki/GameFrameby Titmouse - Coding
Your code snip looks ok, but you are using a single global variable named “tex_foto” This limits you to just use one loaded image. If that’s the way you designed it then that's fine, otherwise use another array like you have for the filename list "lista"by Titmouse - Coding