How do I stop this code splitting the tiles up into 2 blocks?

SYS 64738
banman
Member
Member
Posts: 413
Joined: Sat Jun 15, 2019 12:21 am
Contact:

Re: How do I stop this code splitting the tiles up into 2 blocks?

Post by banman »

Hi the777,



I have been thinking on this subject.


I couldn't quite get your code to work correctly.
I think what I did is correct, loaded the machine code program then "newed" the computer. Then I ran the BASIC portion of the code. I got a checker board pattern at the bottom of the screen.


I think I'm correct in thinking you want to create a randomised mountain terrain.

A few things....

Some great 8 bit games like Moon Patrol, Ghosts and Goblins, Zaxxon pop into mind. These have a set predetermined background.
The appeal of course is that one knows from experience the way the game plays thru.
There might in fact be a hidden benefit that less processing of random numbers might lead to an increase in speed.



Now having said this. A randomised player environment is also a good thing.

Have you considered for example an alternative working piece of code.....

Say the program has 2 randomizing statements.

The first one might be say an altitude generator. It could provide say a number between 0, ground level and 10, the highest level. In theory it could be larger.

The other would generate a number between 0, going up and 1, going downhill. Let's call it direction.

A program loop using the altitude number could describe the mountains progress either up or down. A limiter could stop the progress going above 10 and below 0.

While this is happening the program could be monitoring direction. So the direction counter says upwards 10. A portion of code will draw the "up" part of the mountains.

While this is happening the randomised direction statement issues the down directive at say altitude level #7. So now for #3 levels (that's the 10 that was initially generated) a proton of code draws the mountains down. At completion the program will poll the randomised altitude generator for a new altitude number.

Just a thought.


the777
Member
Member
Posts: 10
Joined: Thu Dec 07, 2023 2:14 pm
Contact:

Re: How do I stop this code splitting the tiles up into 2 blocks?

Post by the777 »

banman wrote: Tue Dec 12, 2023 3:50 am Hi the777,



I have been thinking on this subject.


I couldn't quite get your code to work correctly.
I think what I did is correct, loaded the machine code program then "newed" the computer. Then I ran the BASIC portion of the code. I got a checker board pattern at the bottom of the screen.


I think I'm correct in thinking you want to create a randomised mountain terrain.

A few things....

Some great 8 bit games like Moon Patrol, Ghosts and Goblins, Zaxxon pop into mind. These have a set predetermined background.
The appeal of course is that one knows from experience the way the game plays thru.
There might in fact be a hidden benefit that less processing of random numbers might lead to an increase in speed.



Now having said this. A randomised player environment is also a good thing.

Have you considered for example an alternative working piece of code.....

Say the program has 2 randomizing statements.

The first one might be say an altitude generator. It could provide say a number between 0, ground level and 10, the highest level. In theory it could be larger.

The other would generate a number between 0, going up and 1, going downhill. Let's call it direction.

A program loop using the altitude number could describe the mountains progress either up or down. A limiter could stop the progress going above 10 and below 0.

While this is happening the program could be monitoring direction. So the direction counter says upwards 10. A portion of code will draw the "up" part of the mountains.

While this is happening the randomised direction statement issues the down directive at say altitude level #7. So now for #3 levels (that's the 10 that was initially generated) a proton of code draws the mountains down. At completion the program will poll the randomised altitude generator for a new altitude number.

Just a thought.
Someone fixed this over on another forum.

The problem I have now is that there is a gap between the / and _ ,etc symbols
the777
Member
Member
Posts: 10
Joined: Thu Dec 07, 2023 2:14 pm
Contact:

Re: How do I stop this code splitting the tiles up into 2 blocks?

Post by the777 »

i.e. the forum i cant post on here...
banman
Member
Member
Posts: 413
Joined: Sat Jun 15, 2019 12:21 am
Contact:

Re: How do I stop this code splitting the tiles up into 2 blocks?

Post by banman »

Hi the777,



That's great news about going forward with your project.

Glad to hear it.

On the other matter of spaces between the two characters..

Petscii graphics have a character that will do a back space. From memory, it's created by opening a quotation mark then hitting the backspace key then closing the quotation mark.
Maybe someone else here can confirm or deny this.

If you incorporated this into your code it may be possible to bring the characters together as you intended.

Maybe a Google search on C64 control codes will help....

https://dansanderson.com/mega65/petscii-codes/
the777
Member
Member
Posts: 10
Joined: Thu Dec 07, 2023 2:14 pm
Contact:

Re: How do I stop this code splitting the tiles up into 2 blocks?

Post by the777 »

banman wrote: Wed Dec 13, 2023 6:55 am Hi the777,



That's great news about going forward with your project.

Glad to hear it.

On the other matter of spaces between the two characters..

Petscii graphics have a character that will do a back space. From memory, it's created by opening a quotation mark then hitting the backspace key then closing the quotation mark.
Maybe someone else here can confirm or deny this.

If you incorporated this into your code it may be possible to bring the characters together as you intended.

Maybe a Google search on C64 control codes will help....

https://dansanderson.com/mega65/petscii-codes/
its not a problem with backspace, its a problem with there being a gap vertically
Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 0 guests