You are not logged in.
Lost Password?

All Posts (DaVince)




#21
Re: Recent Pickups
Posted on: 2014/11/15 14:19
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
Cool. I had enough trouble finding a regular DC and here you have all these shiny interesting ones. :)
Top

Topic | Forum


#22
Re: Postman Walter brings a Virtual Boy Store Kiosk
Posted on: 2014/11/15 13:59
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
I really enjoyed the super cheesy plot and acting. Hilarious camera work, and nice shots of the unit.

I'm also impressed you got such a nice and complete store unit. Freakin' cool.
Top

Topic | Forum


#23
Re: Translating from jap to english /flyers/pic and more
Posted on: 2014/11/14 13:08
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
It seems like there's more supply than demand, then. (I can read a fair bit of Japanese.)
Top

Topic | Forum


#24
Re: Best Vintage Console?
Posted on: 2014/11/13 20:24
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
Tough. I don't know if I like the SNES or the Playstation more, so I picked Playstation since it'll probably tip the scales a little bit more.
Top

Topic | Forum


#25
Re: Virtual Boy 25th Anniversary Project
Posted on: 2014/10/31 15:33
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
I didn't manage to compile this on VBDE, either. I wouldn't mind designing some levels and playtesting the game if you can get it to compile.
Top

Topic | Forum


#26
Re: Random numbers
Posted on: 2014/10/29 13:20
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
I'd like to revisit this topic, since random numbers are mighty useful in games. So I did a search for random number generators and found this page:

http://www.math.sci.hiroshima-u.ac.jp ... MT/MT2002/emt19937ar.html

Specifically, this .c file:

http://www.math.sci.hiroshima-u.ac.jp ... /MT2002/CODES/mt19937ar.c

This is a random number generator based on the Mersenne Twister, which is supposedly reliable and fast. It requires you to either give it a seed to start with, or set up an array with some seed numbers. From there on it will give you nice random numbers.

Now, the C file linked above will error out horribly if you try to include it in a VB project. Thing is, the genrand_real functions contain stuff that will not compile on VB. The thing also has an stdio.h include and a main() that we'll want to remove.

Luckily, this file has a very liberal license, so it can be modified to our wishes. Attached is a modified mt19937ar.c that properly gives you pseudo-random numbers on VB! (I tried it on one of the demo files, and it seems to be returning random numbers quite nicely!)

Usage:

//On init:
init_genrand(18293); //Or any number you like

//Whenever you need it:
int randomnumber genrand_int32()%10//%10 means between 0 and 9

Attach file:


c mt19937ar.c Size: 5.13 KB; Hits: 102
Top

Topic | Forum


#27
Re: Insect Combat
Posted on: 2014/10/29 13:05
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
The way you have set it up, it sounds like the pattern would be very predictable: press L or R, and you will most guaranteed see the enemy jump, then punch, then try a special.

Here's my tip: randomize it, and randomize it based on a timer (that counts up by 1 each frame) and your character's proximity to the opponent. Actually, have two randomized timers: one determining the enemy's movement, and the other their actions.

For the movement timer:
Once it reaches its max value, it is time to perform a movement action. Then do a check how close/far the opponent is from the player.
- If they're further than, say, 200 pixels away, then always move the enemy closer by, say, 100 pixels.
- If they're between 100 and 200 pixels, randomly decide if they should be moving a random amount forward, do nothing, or move backward a tiny bit (you can influence the chance this happens by comparing their HP, too).
- If they're closer than that, randomly decide whether they should move forward a random amount, do nothing, move backward a (larger) random amount, or jump.

For the action timer:
This timer needs to be a little bit shorter (so moves are attempted more often), but still at random intervals. When it's time to decide on an action:

- Check whether the player is in, say, a 50 px proximity. If they are, attempt one of the moves (or do nothing). This way, might try to attack even when it's not close enough this way, but it'll just look as if the enemy attempted and failed at an attack, which gives you, the player, a chance to retaliate.

Outside of both:
- If the enemy is jumping and near you, it could randomly try to do its special move right afterward.

You can add to this, and add more conditions that specifically change the behavior based on which bug it is, how aggressive/cowardly they are, if they're almost out of HP, etc.


The issue
Now, there is one big problem. All of the logic above relies on randomization. That is, the kind of logic that looks like this:

int random_number 
= (select a random number between 0 and 10);
if (
random_number 5) {
  
//Perform action of type 1
}
else {
  
//Perform action of type 2
}


The big problem is that the VB doesn't seem to have a function to create such a random number! There's no rand() function (like in traditional C) to rely on to give you a random number. That's going to complicate things. I've found a potential random number generator you could use but I need to test it first. In the meantime, think about the fighting logic like the above a bit more, try to expand on it, and carefully consider how you would start implementing it.

Edit: and now we have a solution.
http://www.planetvb.com/modules/newbb ... t_id=30500#forumpost30500
Edited by DaVince on 2014/10/29 13:20
Top

Topic | Forum


#28
AVGN re-releases Virtual Boy episode, gets positive comments
Posted on: 2014/10/28 13:18
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
So I noticed that the AVGN has re-released his Virtual Boy episode in a higher resolution. The interesting thing? I look at the comments, and the majority of it isn't actually saying anything spiteful against the VB, as I expected!

It seems like people have become more educated about just what this system was, and there's even of interest from a bunch of people who want to play the games that were on the system.

I wonder if it's because 3D in general is more widely accepted now (thanks in part to Nintendo's 3DS), and because of the Oculus Rift looming on the horizons... Frankly, it makes me pretty happy to see these responses.
Top

Topic | Forum


#29
Re: Insect Combat
Posted on: 2014/10/24 0:27
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
Nice work, glad it functions. I still have suggestions though!

Quote:
Most of the work came from the fact that I don't want the fighter and opponent to be the same insect. So that took a whole lot of time to sort that out.

Well, about that, I actually explained how you can solve that by using function arguments:


int charselect
(int hidecharacter) {
  
//In your code, use the value of int hidecharacter to hide
  //the specific character you don't want to appear in the list
}


And during the function call:


fighter 
charselect(-1);  //All bugs visible
opponent charselect(fighter); //The bug the player selected is not visible


This way, you can get rid of the remaining use of the "fighter" variable in the function (like if ((fighter==showchar)) showchar++;).

You can even give the function several arguments, for example to set the default character to show:


//The charselect function:
int charselect(int startingcharacterint hidecharacter) {
  
showchar startingcharacter;
}


//Inside main():
fighter charselect(1, -1);
//1 means start by showing bug 1,
//-1 means don't hide any from the possible options

opponent charselect(fighter+1fighter)
//fighter+1 means start by showing the bug right after the one the player selected,
//fighter means hide the bug the player selected from the possible options


Function arguments are super useful and will save you a few headaches, I think. :)


Quote:

VirtualChris wrote:
Despite the lot of stupid, needless warnings

Did my suggestion above work to fix these? Over here they did. You just put that stuff right above int main(). (Oh, and void charselect(); has become int charselect(int startingcharacter, int hidecharacter); if you implement my above code).
Top

Topic | Forum


#30
Re: Super Mario Bros, Virtual Boy
Posted on: 2014/10/23 17:50
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (10 Years)
Guy Perfect said it. ;)
Top

Topic | Forum