GLBasic forum

Main forum => Announcements => Topic started by: Darmakwolf on 2012-May-26

Title: Some fun.
Post by: Darmakwolf on 2012-May-26
I'm working on an 8-bit smash brothers-esque game to play with some friends. I call it X Bit Tournament. It's pretty easy to work on, and I just finished a stage editor. It supports up to 4 players via game controller.

Characters possible in the roster:
Megaman
Mario + friends
Bionic Commando
Contra-guys
Ninja Gaiden protagonist
Kirby!
Various enemies from games (for fun!)

I'm going to use scaling so that the camera zooms in to where the action currently is, rather than showing the whole map zoomed out. This is just something I'm doing for fun, nothing commercial or high profile.

[attachment deleted by admin]
Title: Re: Some fun.
Post by: mentalthink on 2012-May-26
Very Nice Stuff!!!
Title: Re: Some fun.
Post by: erico on 2012-May-26
Great!
The zoom in into action can be really nice.
Title: Re: Some fun.
Post by: kaotiklabs on 2012-May-26
looking good!
Title: Re: Some fun.
Post by: Schranz0r on 2012-May-26
We need the "I like" Button ;)
Title: Re: Some fun.
Post by: Darmakwolf on 2012-May-26
Alright - got some more done! Full 4 player menu support implemented. 4 different colored hands can move around at once. Character selection is complete, now I just need to pick all the characters. Reply with suggestions! (Remember: 2D platformer legit nes-characters only, e.g: mario.) I have FIFTY slots to fill!

I don't really intend to add multiple "versions" of the same character, such as mario from 1,2 and 3. It'd be too cheesy. There are lots to pick from though!

If you want, you can even throw together a character pane for a suggested contestant. Template attached.

[attachment deleted by admin]
Title: Today's addition
Post by: Darmakwolf on 2012-May-27
Added: playable Mega Man. Full map tile collision detection, jumping + gravity enabled!

[attachment deleted by admin]
Title: Re: Some fun.
Post by: Wampus on 2012-May-27
Awesome! I love Smash Bros and have had daydreams about doing what you're doing.

If you finish this you are a god
Title: Re: Some fun.
Post by: Ian Price on 2012-May-27
Have you seen the GameBoy like game, Super SmashLand (it looks like a GB game, but isn't and is available for pc)



http://geek.pikimal.com/2011/09/14/super-smash-land-releases-today/
Title: Re: Some fun.
Post by: Darmakwolf on 2012-May-28
I have seen that, Ian. It's pretty great! But I have a heart for the NES. And there are so few characters in that... :P
Title: Re: Some fun.
Post by: erico on 2012-May-28
Rygar the legendary warrior could be a nice chap on this!
Not the newer crap, but Argos no senshi of course. ;)
Title: Re: Some fun.
Post by: Ian Price on 2012-May-28
I didn't mention Super SmashLand so that you'd go GameBoy stylee - I mentioned it so that you can see that a project like this can work on pc and could get inspiration from how it plays.

I think using NES characters is a great idea, as the graphics are pretty much readily available, simple, consistant and small and there's so damned many of them! =D
Title: Maps and Collision
Post by: Darmakwolf on 2012-May-30
I thought I had collision right down until I ran into several snags due to making character AI and detection "modular" (So I don't have to reinvent the wheel for each character.) So I got it close to perfect. There seems to be a slight issue where you can stick on corners if you fall into them *just* right. Why don't you guys test it out? The game REQUIRES a game controller. You cannot play with just a keyboard. This is because it's meant to be like a console game. It's designed with 360 controllers in mind. Other controllers will likely work but the buttons may be different for now. I'll add a detector later that sets up common controllers such as ps1/2/3 controller layouts.

left analog: move cursor / player
A: choose, jump
Start: start the game (press start after selecting a character)
Back: Go back (in the map editor, this saves the map and returns to the main map selector), un-select a selected character.

The entire level editor can be worked via controller OR keyboard/mouse.

Right now it's just a map test. You can only select Megaman. I have tested two players, and they can both simultaneously play. Four is possible but untested.
(There's no fighting action atm!)

Sorry about binary-only. It'll be fully open source when I'm done :)


[attachment deleted by admin]
Title: Re: Some fun.
Post by: erico on 2012-May-30
I will give a try, I have a joystick for such around here, just need a friend to visit over.
I may need some time for that as these days are quite bad ones.

Your idea + Ian´s recommendation made me remember an old MSX game where two robots battle, if I can recall the name I think it can also help you out on the inspiration front.

Can you post a sprite board for an actor? Should I get some 15min I could try and add Argos myself, can´t promisse.
Title: Re: Some fun.
Post by: Darmakwolf on 2012-May-30
Hey Erico - you don't need a 2nd controller. It's designed to be playable solo as well (for testing purposes, of course.) You can use a single controller and just load up a character and a map and hop around. Character template attached!

[attachment deleted by admin]
Title: Re: Some fun.
Post by: erico on 2012-May-30
Thanks Darmakwolf, :good:
Will check it out.

I´d hope the spanish mates on the board could help me out remembering the MSX game.
It was single screen, had destructible scenery. Damn memory, I sure would like you to check a video on that, it really could bring good inspiration at last.
Title: Stuck!
Post by: Darmakwolf on 2012-Jun-06
I really need to make a way to "zoom in" on where the action is. Think of Smash Bros - if two characters walk to opposite ends of the map, the camera zooms out. If anyone can help that'd be great and can help move this project forward! Source attached.

On the very top is camera_module = 0, set it to 1 to enable it. In my function section you will find game_camera:

I had it so that in single-player tests I could zoom in on one player. It got really tricky when I tried to make it so it'd detect player positions and adjust the camera accordingly. If you want to take a stab at it, here's what you need to know:

Characters are elements of an array. if you want the program to do something if there are two players, you'd do:

if numplayers = 2
<do something>
endif

The "camera" is simply a grabsprite (#9001.) I am clipping part of the screen and stretching it over the screen. the result is a "zoomed in" area. Let me know if there is a better way or if you can get it working. Currently the project is only set up for xbox 360 controllers. In the near future I am adding a module that detects playstation controllers and maps them correctly. As it is right now, they'll *work,* but the face buttons are in the wrong positions. 360 controllers work fine. The game itself is not playable via keyboard/mouse. I appreciate any input! :)


:good:

[attachment deleted by admin]
Title: Re: Some fun.
Post by: Slydog on 2012-Jun-06
I never looked at your code, but how do you do your sprite drawing?
If you don't use STRETCHSPRITE or POLYVECTORs, scaling is going to be very difficult.
Personally, I'd use polyvectors, mainly for the speed benefits.

You are going to want a global scene 'scale#' variable (or 'zoom#'), with say an initial value of 1.0.
Then I would have a 2d point (or just cur_map_x,cur_map_y) of what map location the center of the screen should center around.
(If you're 25% through a 1000 unit wide level, your x would be 250 - the 250 is the center of the screen, not the left edge)

Then when drawing your level, start at the map x,y position. (which will map to the center of the screen).
You can pre-calculate how far left, right, up, and down in your map you need to display, based on your current scale/zoom level.
Then draw each tile from the center based on the current scale. 

You could calculate each tile's top-left x,y, and width,height like this:
Code (glbasic) Select
tile_offset_from_center_x = cur_map_x - tile_map_x
tile_offset_from_center_y = cur_map_y - tile_map_y
x = tile_offset_from_center_x * scale
y = tile_offset_from_center_y * scale
w = tile_width * scale
h = tile_height * scale


I've never done this exactly, but shouldn't be too difficult.
You have to remove all hard-code coordinates from your map / sprite drawing code.
To keep things isolated, your map drawing code should be generic enough to apply to any of your future games.

With this concept, you can zoom in and out freely and smoothly to any location.
Title: Re: Some fun.
Post by: Darmakwolf on 2012-Jun-06
Hey Sly. The thing is, my map drawing code draws the map once when the round starts. The map is just essentially a tile-based "picture" designed with the level editor. Collision is array-tile based. I'm sure with grabsprite/stretchsprite it's possible to make the right zoom code, but it got kind of difficult when it came to getting the right "point" to zoom in on...
Title: Re: Some fun.
Post by: Slydog on 2012-Jun-06
Ah, ok, I never looked at your code to understand it.

I'm not sure what you mean by 'got kind of difficult when it came to getting the right "point" to zoom in on'.
Wouldn't the point be where the player is (or the average of the player's and opponent's position)?
Title: Re: Some fun.
Post by: erico on 2012-Jun-06
Quote from: Slydog on 2012-Jun-06
... (or the average of the player's and opponent's position)?

Is what I first thought too.
Other then this point, you way have to check each one, or the furthest one from this point to make sure no one gets cropped outside zoom area.
Title: Re: Some fun.
Post by: Darmakwolf on 2012-Jun-07
Erico - great suggestion. I'll try taking an average of player positions and adjusting the camera accordingly.
Title: Re: Some fun.
Post by: erico on 2012-Jun-07
Art of fighting on the neo geo can be inspiring on the ´zoom´ front.
Star Control too, the meele parts. :good:
Title: Re: Some fun.
Post by: erico on 2012-Jun-11
Some rygar, a bit of nes rip+some colors, nothing fancy, but there always must be a Legendary Warrior!

[attachment deleted by admin]
Title: Re: Some fun.
Post by: Darmakwolf on 2012-Jun-12
Thanks, Erico! My game is coming along well. I will be sure Rygar has a front row seat!
Title: Re: Some fun.
Post by: erico on 2012-Jun-12
Nice!

Now I remember the msx game I wanted to tell you for inspiration.
It is called warroid.



It had some destructable tiles and other then shooting(auto target) you could do a meele kick when close to the opponent(check 6:00 on video to get an idea).
After the other robot died, you could still kick its body around just for fun, and this made the whole game special. :P

Edit: moby dosen´t have much on it, so better post a video.
GFX there is upscalled and smoothed out (yuck!), but you get the idea...the opening music made a lot of people cry in full emotion!

Edit2: there was no destructable tiles... my mind played a trick on me.
Title: Re: Some fun.
Post by: Darmakwolf on 2012-Jun-12
Ha! Looks like a fun game. This is going to be a *little* like that kind of thing, but each character has 4 distinct abilities matching the four face buttons on the controller, so there's some more planning involved in the fighting. I plan on CERTAIN tiles being destructible depending on the character. Someone with explosives may be capable of removing tiles altogether. Perhaps the most annoying character to fight would be Dig Dug?? :P