Page 2 of 2

Re: Newbie wanting help

Posted: January 18th, 2015, 6:18 pm
by Chris
So I tried doing this:

Code: Select all

    for(treea.x=-10;treea.x<200;treea.x=treea.x+40)
    {
         // if the tree is off the screen, update the position
         if (treea.x == 30) { treea.x = treesxscreen1[0]; treea.y = treesxscreen1[0]; }
         if (treea.x == 70) { treea.x = treesxscreen1[1]; treea.y = treesxscreen1[1]; }
         if (treea.x == 110) { treea.x = treesxscreen1[2]; treea.y = treesxscreen1[2]; }	
         if (treea.x == 150) { treea.x = treesxscreen1[3]; treea.y = treesxscreen1[3]; }
         if (treea.x == 190) { treea.x = treesxscreen1[4]; treea.y = treesxscreen1[4]; }	 
    }	
and it just puts one tree at 190,190.

Re: Newbie wanting help

Posted: January 18th, 2015, 8:41 pm
by Shadow
Ensure it is in your entire program loop. The for loop may not be required as it was just an example. I don't know your code, but just play around and you will eventually figure it out. Just think logically, and use what you can in C to get it going :)

Re: Newbie wanting help

Posted: January 19th, 2015, 12:02 pm
by Chris
I've tried a lot of stuff and nothing seems to do anything. The best I could do was get five trees flashing, but I don't want them to do that, I want them to be all on the screen at once. Or is there a limit to how many sprites can be on the screen at one time? Link to my code is here:
http://www.atari2600land.com/jackandthebeanstalk/

Re: Newbie wanting help

Posted: January 25th, 2015, 4:17 am
by Chris
What nobody told me is I had to define each tree copy as its own sprite. If I do this, then why bother with the array and just define each tree with the treea.x and treea.y variables? I guess I could see where an array would come in handy for each screen, but I just did what I did for now. So I guess the next step is collision detection for the trees. I would have absolutely no idea how to do this. Will anyone help me?

Re: Newbie wanting help

Posted: January 25th, 2015, 6:25 am
by Greg
Hello Chris,

I tried to compile your source, but the "main.h" file is missing.

Re: Newbie wanting help

Posted: January 25th, 2015, 8:58 am
by Chris
I didn't know you would need the .h file. I've added it on the website.

Re: Newbie wanting help

Posted: March 10th, 2015, 4:25 pm
by Chris
So I was going to ask for help with collision detection when I thought it out and I think this works OK. Took me at least a couple of hours, though. Link to the latest version is in my signature.

Re: Newbie wanting help

Posted: March 10th, 2015, 4:50 pm
by Shadow
I just tested it on PSIO, and it works fine. I'm not sure what is going on, but it's pretty funny :)

When I press start on the "chicken cut-scene", the whole screen goes black and then flickers every 5 seconds.
Nothing else happens after that...

Here is an ISO of the PS-EXE dated March 9, 2015. It's licensed for Japan.
JACK.ISO

Re: Newbie wanting help

Posted: March 10th, 2015, 5:16 pm
by Chris
Nothing real exciting going on right now, just Jack walking among the trees. I tested this in PS7 and everything works fine, so I wonder what is going on with PSIO.

Re: Newbie wanting help

Posted: March 10th, 2015, 7:12 pm
by Shadow
Have you tested in on real hardware before?

Re: Newbie wanting help

Posted: March 10th, 2015, 7:24 pm
by Chris
No, I don't know how.

Re: Newbie wanting help

Posted: March 10th, 2015, 7:41 pm
by Shadow
Okay, it would be that you have developed and optimised it for use under PS7 which you should never do. Always program PlayStation games for the original hardware. Use PSXSERIAL (and make a cable) to test your game if you don't have an Xplorer. If you can't make a cable, I can make one for you. Just let me know :)