A few questions (v3)
Displaying 1-17 of 17 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
geronimo

1.
What are the bitwise AND, OR, XOR, and NOT operators or functions? Is using such as AND the best way of checking a single bit of an int?
2.
What are the bitshift/rotate operators or functions?
3.
How do you switch to 16-bit graphics?
4.
Arrays... i can't seem to declare a new array inside of a routine. also, i can't figure out how to best initialise an array.
int derf[5]={0,1,2,3,4} causes verge3 to throw this compile error: expected ',' and got '}'. so is the only way to be all like... derf[0]=0; derf[1]=1; derf derf derf ??
5.
I got PlayMovie to play one divx and not another.. i don't really know, but i think the one that wouldn't play was encoded with divx Pro? i dunno, i didn't dwell on it.
6.
Can you not have structs within structs?
struct derf {
int property;
}
struct derfer {
derf business; <--- "derf is not a valid variable type"
}


That's all i can remember right now. I want to add that i like what verge is becoming (as a whole). I see awesome in the future.

Posted on 2004-04-03 21:55:58 (last edited on 2004-04-03 22:00:11)

zeromus

3. change your desktop resolution. verge uses whatever that is set to. it cannot be changed in the verge game; that would be rude to your users!

4. can't be done; and the only way to initialize is the painful way.

5. _do not use divx_ movies in games you intend to give to other people. divx craps out alot and theres no guarantee it will work on other peoples systems. email me if you want to talk about using a movie in a game. soon upon v3 release, i will write a little FAQ entry addressing this

Posted on 2004-04-03 23:54:31

zeromus

all operators are the same as in C
1.
and - &
or - |
xor - ^
not - appears to be missing?
2.
shl - >

Posted on 2004-04-03 23:58:19

zeromus

6. try it and see.

Posted on 2004-04-03 23:58:37

mcgrue

6. try it and see.

I think he already tried it, hence the error message in the comment. He wanted conformation.

No, there is no nesting of structures at this time. Yes, it'd be cool. However, it'd require a lot of compiler rewrite, so it's not planned to be in anytime soon.

Posted on 2004-04-04 00:29:56

geronimo

Got another one. When should i use UpdateControls, really? The controls seem to be updated automatically.

Posted on 2004-04-04 18:37:05

Overkill

Use UpdateControls(); whenever you don't have Showpage(); in your loop and are using the keyboard/mouse/joystick for something.

Posted on 2004-04-04 19:12:23

geronimo

How do i set the size of the main window? as in, WindowSetSize(THEMAINWINDOW,320,240);

Posted on 2004-04-05 20:53:28

mcgrue

How do i set the size of the main window? as in, WindowSetSize(THEMAINWINDOW,320,240);


I believe you're looking for:


SetResolution( int xres, int yres )



Although if it's at startup you're only concerned about changing the res, you want to go into verge.cfg and change xres and yes. For example, if you want a 640x480 game, you need to change them to:


xres 640
yres 480


That cover your needs? :)

Posted on 2004-04-05 21:15:57 (last edited on 2004-04-05 21:16:39)

geronimo

what i was hoping to be able to do is not have the window start out full-screen. i noticed it runs alot faster in a smaller window, and it would just suit me great :]

Posted on 2004-04-05 23:18:49

mcgrue

Ah, for that you want to change verge.cfg and add the line:

automax 0

Posted on 2004-04-05 23:41:58

geronimo

thanks! you rocks. :]

Posted on 2004-04-06 19:30:49

geronimo

What's the friendly way of putting a delay in your code flow? I'm currently using a while loop to keep my game going at 50fps (using systemtime), and though the main loop gets done with plenty of time to spare, the game uses loads of cpu cycles.

Posted on 2004-04-09 23:27:58

Overkill

This was included with the Sully Chronicles alpha pack-in:


void Wait(int _dur)
{
timer = 0;
while (timer<_dur)
{
Render();
ShowPage();
}
}

// ...

That would probably work fine.

Posted on 2004-04-09 23:53:34

geronimo

in that case... i hereby suggest that VERGE3 be equipped with a wait routine that surrenders some cpu time. :]

Posted on 2004-04-10 03:28:39

Overkill

Why do you need more cpu time? Multi-tasking is bad, and almost all games gobble cpu time.

Posted on 2004-04-11 00:13:26

vecna

even so, verge multitasks just fine.. it'll just use whatever cpu other apps arent using to give you a high framerate.

Posted on 2004-04-11 16:09:57


Displaying 1-17 of 17 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.