You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
Wario Ware: Virtual Boy
Posted on: 2017/3/29 4:46
VB Gamer
Joined 2016/9/18
USA
28 Posts
Long Time User (3 Years)
I have an interesting idea for a collaborative project. You are probably familiar with the Wario Ware games, in which the player has a limited time to complete several small "microgames":
https://www.youtube.com/watch?v=B6J_Mo0A8OU

Planet Virtual Boy should develop a collaborative Wario Ware game for the virtual boy, in which programmers can submit a small independent microgame and add it to the game.

The idea is that the main game has a common include file, but authors write games in their own private c files and submit them. The common interface has things like the key presses, and the time remaining.
We use a struct to give the main loop the necessary info to run the game at random:

struct MICROGAME{
const char*instruction;
const char*author;
void(*init)(void);
void(*microGameLoop)(void);
void(*draw)(void);
enum time time{SHORT, LONG};
};
The "instruction" field is the message that pops up before starting a game.
The "author" field will be used in credits.
Each function pointer is called by the main game loop to simulate the game.
Finally, time specifies to the main loop how long the game should be active.

The author writes their game in their own .c file, keeping all state for that game static to the .c file they wrote it in, including any libraries they will use. The author exposes the struct with their own header file, and we place a pointer to it in an array. A random function chooses a game from this array, and ends the game when time is up.

struct MICROGAME* game_list[]={
...
};


If everyone designs one simple microgame, we could have a great community-driven Wario Ware homebrew. The design will be expandable, all we need to do to add a new microgame is add a new pointer to the array and recompile.
Would anyone be interested in something like this?
Top

#2
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 13:01
Administrator
Joined 2000/1/8
Germany
2519 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (15 Years) App Coder90+ Game Ratings
The idea is cool and I'd probably like to contribute a game or two. But I'd propose a different approach:
  • Don't use any copyrighted material but make it an original game
  • Build the game framework as a VUEngine project and push it into a public code repository (preferrably Git). Instead of that struct, have a minigameBaseState which all mini games inherit from.
Top

#3
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 14:33
Newbie
Joined 2017/3/19
7 Posts
Long Time User (2 Years)
Would echo KR155E's sentiments: it'd be nice if the games were original, definitely great if the code was in a public repository, and having something mini games inherit from would benefit streamlining the whole process (and is basically what syncophono seeks to do with the struct).

Sign me up for making something for this btw. :)
Top

#4
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 17:06
VB Gamer
Joined 2016/9/18
USA
28 Posts
Long Time User (3 Years)
Making it original is a great idea! Though, not sure what to call it. VBWare?
A repository like github would certainly aid in the open development process, I like it.
The VUEngine would be a useful tool in microgame development, especially with the new release.
What is the purpose of using inheritance? My intent for the microgame struct is to give the primary game access to each subgame's functions. The data for each microgame can just be global and static inside its own file:

----Example Microgame file:

#include "common.h"

static int exampleData, moreExampleData;

void init(void){
exampleData=0;
/*Called once at start of game*/
}
void update(void){
exampleData++;
/*Game logic*/
}
void draw(void){
...
}
/*Fill out function pointers here, the only part of the file that is given to the primary game.*/
const struct MICROGAME_INFO example{ init, update, draw };
----

If we do it this way, a microgame creator can just write their game all in one file, without needing to inherit from anything. They can then include anything they want, such as the libgccvb or the vuengine. Of course some basic functionality can be given in common.h so that devs aren't doing the same initialization in every file.
Edited by syncophono on 2017/3/29 17:17
Top

#5
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 19:11
Newbie
Joined 2017/3/19
7 Posts
Long Time User (2 Years)
So, after reading over @syncophono's reply and pausing for a second, I think I am/was still in the C++/C# mindset. C doesn't have inheritance unless you implement it, which uses structs (if I'm not mistaken?). Plus, not sure why someone would want to extend the struct anyways, since any additional functions would be called in one of the functions that has a pointer. @KR155E, what would be the advantage of creating an inheritance? (Feel free to correct me, I'm super rusty with C.)

On a side note, @syncophono: I'd be pretty keen on being able to pass some optional information between games, that way a microgame developer could leverage it for their game's initialization. (Like having the player's character position be passed, if that were to be available. That way, the next microgame could start with the player at the same spot. Or maybe passing the score from the previous microgame [if there were one] to influence the difficulty of the microgame being made. Hopefully that makes sense... xD) In some sense this could be a situation where the inheritance may be useful (that way a microgame could pass arbitrary extra information in its struct, which another microgame could try to access if available?).
Top

#6
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 20:04
Administrator
Joined 2000/1/8
Germany
2519 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (15 Years) App Coder90+ Game Ratings
The VUEngine offers various OOP features like inheritance through macros.

The way I'd do such a game would be the following:
  • The baseMinigameState would define all the attributes and methods a mini game has to have at minimum
  • There's no "primary game" running at the same time as the mini games, instead the engine would be directly executing the various minigameStates. Since these inherited from baseMinigameState, they include all the logic needed to execute themselves, start a new mini game and pass their variables over (good idea there, Twila!), etc.
  • The various minigameStates hold their attributes like winning message, etc. and they have the ability to overwrite their base methods to customize, for example, how the remaining time is displayed
  • There's a global array that holds all the available minigameStates

That's actually pretty similar to syncophono's approach, but in VUEngine terms. :)
Top

#7
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 20:55
VB Gamer
Joined 2005/12/1
Brazil
18 Posts
Long Time User (14 Years)
Very good idea...

I'd like to create a mini-game...

I'll stay tunned to this post...
Top

#8
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 22:29
VB Gamer
Joined 2016/9/18
USA
28 Posts
Long Time User (3 Years)
@Twila The state is global, so all you would need to do to retain the previous player position is simply not update it in your INIT function. However I recommend initializing all your data before the game starts. These games only give you a few seconds, and as such, its better for the player to have some familiar aspects to rely on.
Top

#9
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 22:46
VB Gamer
Joined 2016/9/18
USA
28 Posts
Long Time User (3 Years)
@KR155E
I think there is value in having a primary game running in a main loop. The primary game keeps track of your score, lives, and the game speed.
Game speed is especially a reason there should be something calling a step function for each game. Because if we want to run at double-time, the main game can call the update function twice.
If each microgame had its own main loop and was running independently, every game would need to individually implement speed-up behavior on its own.
If the programmer needs access to the time remaining, we can expose it in "common.h".

On game speed, what do you think about implementing speeding up? Is calling the update function multiple times adequate, or maybe some VUEengine parameters can be tweaked?
Top

#10
Re: Wario Ware: Virtual Boy
Posted on: 2017/3/29 22:51
VB Gamer
Joined 2016/9/18
USA
28 Posts
Long Time User (3 Years)
@Twila
The passes parameters should be less specific to the individual minigames themselves, but maybe based on how the player is doing.
For instance, we could pass if the player lost the last game, what the speed is, and the level of difficulty, ect.
The games can use these params to create these adjustments.
Top

 Top   Previous Topic   Next Topic


Register To Post