Two Questions By Fenix Newbie


shinneri posted on Mar 3 2005 at 03:03 AM said:
I just want to chime in here.

How similar is Fenix coding to coding in C++? I am currently in a C++ class in school, and it's certainly just beginner stuff, but its a good foundation. I was just wondering whether I can build off of my knowledge of C++ in order to learn Fenix (I plan to at some point.. not before summer though.. very busy :().

I`ve not tried it myself yet. But looking at some of the listings people have been posting, It looks a lot like B.A.S.I.C (Beginners All Symbolic Instruction Code).

Trooper
 
Last edited by a moderator:
trooper posted on Mar 3 2005 at 03:33 AM said:
I`ve not tried it myself yet. But looking at some of the listings people have been posting, It looks a lot like B.A.S.I.C (Beginners All Symbolic Instruction Code).

...otherwise known as BASIC :p
 
Last edited by a moderator:
It's not basic, more like a blend of Pascal and C, with only a small taste of OOP. C++ classes would certainly help in general programming skill, after those learning Fenix would be a breeze :).

1.
Is there a command to adjust the contrast? Or do I have to change the sprites(I hope not!)?

Yup, change the sprites, there is no brightness adjust build in(assuming you are using 16 bit graphics).

2.
How do I play sounds (for example, when I shoot a bullet) and how do I play background music?

Try the Load_Song() and Play_Song() to load and play music, for small sound effects try the Load_WAV() and Play_WAV() commands and look here for related command information. Also there was a topic about that not that long ago.

3.
How do I change the font color?

For the system font you can use set_text_color(int color). The color can be generated with RGB(red,green,blue) which needs values in the 0-255 range. FNT font's can't be changed.

4.
I use this code segment:
Code:
blabla
all write/write_int commands return a text id. If you throw that at delete_text it will delete only that specific text. With zero it always deletes all texts on screen. ie: var = write(0,0,0,0,&fps); delete_text(var); would delete that specific text.


5.
When I have the same process two times on screen and one of them is changing the direction, the other one is changing the direction as well. (when one ball hits a wall, the other ball changes the direction even when he isn? touching anything.
How can I fix this?

Software error, I'd suggest to post your code if you really can't find where mr bug is hiding.

6.
How do you pause a process?

One can pause a process by sending it a freeze or sleep signal. This can be done with the signal()
function, this one can be used to wake them up afterwards too. To sleep for a certain amount of time you will have to use the frame command with a parameter(percentage). 100 means a one frame pause, 200 2 frames, 1000 ten frames and (x*fps*100) x seconds(fps holds the amount of frames every second). ie: frame(10*fps*100); makes the process wait 10 seconds.

Time to go to bed, hope you can make something out of this.

EDIT: why isn't that hyperlink working, is there a maximum of BB code things you can have in a post?
 
Last edited by a moderator:
Moogle posted on Mar 3 2005 at 04:19 AM said:
It's not basic, more like a blend of Pascal and C, with only a small taste of OOP. C++ classes would certainly help in general programming skill, after those learning Fenix would be a breeze :).

1.
Is there a command to adjust the contrast? Or do I have to change the sprites(I hope not!)?

Yup, change the sprites, there is no brightness adjust build in(assuming you are using 16 bit graphics).

2.
How do I play sounds (for example, when I shoot a bullet) and how do I play background music?

Try the Load_Song() and Play_Song() to load and play music, for small sound effects try the Load_WAV() and Play_WAV() commands and look here for related command information. Also there was a topic about that not that long ago.

3.
How do I change the font color?

For the system font you can use set_text_color(int color). The color can be generated with RGB(red,green,blue) which needs values in the 0-255 range. FNT font's can't be changed.

4.
I use this code segment:
Code:
blabla
all write/write_int commands return a text id. If you throw that at delete_text it will delete only that specific text. With zero it always deletes all texts on screen. ie: var = write(0,0,0,0,&fps); delete_text(var); would delete that specific text.


5.
When I have the same process two times on screen and one of them is changing the direction, the other one is changing the direction as well. (when one ball hits a wall, the other ball changes the direction even when he isn? touching anything.
How can I fix this?

Software error, I'd suggest to post your code if you really can't find where mr bug is hiding.

6.
How do you pause a process?

One can pause a process by sending it a freeze or sleep signal. This can be done with the signal()
function, this one can be used to wake them up afterwards too. To sleep for a certain amount of time you will have to use the frame command with a parameter(percentage). 100 means a one frame pause, 200 2 frames, 1000 ten frames and (x*fps*100) x seconds(fps holds the amount of frames every second).

Time to go to bed, hope you can make something out of this.

I did say,

It looks a lot like B.A.S.I.C

Trooper
 
Last edited by a moderator:
Back
Top