Cubytes / AssaultCube Devlog - REVIVAL

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: Cubytes / AssaultCube Devlog - ALPHA 2 DL

Post by Battlefrog » April 3rd, 2017, 1:03 am

Alpha! 2.5! Is! Here!

The only reasons this exists is this:
  • Alpha 3 will rewrite a core system, the levels, and will quite possibly take some time.
  • Alpha 2 was kind of shit, in my opinion.
Anyway, without further opposition, here's the changelog!

Changelog:
  • Added PlayerRespawn sound
  • Added Background Music
  • Added the first line of the 'Announcer', more on him in a couple of updates ;) (Right now, he's just an excuse :P)
  • You now spawn at the points you've 'collected'
  • Changed sounds into .mp3 (So much smaller :) )
  • Changed the executable name (Way more applicable :P )
Downloads:

x64 - Please refer to the front page for downloading.

x86 - Please refer to the front page for downloading.

Have fun!
Last edited by Battlefrog on June 16th, 2017, 2:10 am, edited 1 time in total.
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: Cubytes / AssaultCube Devlog - ALPHA 2.5 DL

Post by Battlefrog » June 3rd, 2017, 9:09 pm

Reviving the dead thread to update you guys on what's been the big deal.

Without telling either myself or you guys, I accidentally put myself on hiatus with respect to Cubytes' development.

I apologize for this action. I was behaving selfish.

However, let's focus on what we're all here for: Cubytes, and where the hell is Alpha 3, and possibly more.
  • Alpha 3 will contain the level loading technology with std::vector, and therefore new levels can be added and played around with. The release of Alpha 3 will be shortly, in a week or so. I promise this time. And if I don't deliver, I'll go live on Twitch and eat apples while you guys watch. ;)
  • Alpha 4 will contain a tutorial, designed for new players to teach them the mechanics, which is needed because noone will read a README. It'll also contain some new gameplay mechanics, such as moving obstacles and more of the Announcer, who will have a great impact on the story that is being planned.
  • Alpha 5 will contain a proper menu and titlescreens, with the beginning and end images having more "atmosphere" than the current ones. It'll also have some internal refactoring, with some simplifications of the code. Also, I'll add some polish to the game, with nicer sound effects, and an icon.
  • Alpha 6 will be another content update with in general more stuff. However, one other thing I'll do is lock down the Github from public to private, because eventually I want to sell Cubytes.
Beyond this stage, it gets a bit hazy. However, around Alpha 7 or 8 I want to release the game out of Alpha and onto the Beta stage, where squashing bugs and more content will be more of a priority than it is now. Also, in Beta I'll work on the two current modes I have in plan: Arcade and Story.

The Arcade mode will be typical: Complete these group of levels, oh look you have a bronze medal because you were slow. Things like that.

The Story mode will have a different experience, with no scores and simply gameplay with a story being thrown in there a little bit. Think of Story mode being a "tutorial" to Arcade mode.

I'd like to release this game around Q4 2017 or Q1 2018. Fingers crossed on that front, though, as I'm sure you guys are aware with me and deadlines at this point.

Also, I've taken someone's advice and soon after this post I should have the other versions uploaded to Dropbox and the forum, because apparently they couldn't download from MEGA, or something like that.

Doesn't hurt to have three places to download my games from :P

- Battlefrog
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by Battlefrog » June 4th, 2017, 5:01 am

I made a sound glitch again.

https://www.youtube.com/watch?v=ayNkkMAinIE
Spoiler:
please help
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by chili » June 4th, 2017, 12:51 pm

Sounds good man, looking forward to seeing how this progresses :)
Chili

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by albinopapa » June 5th, 2017, 12:06 am

Sounds like the sound file is being repeated every frame instead of being allowed to finish before starting over.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by Battlefrog » June 6th, 2017, 5:14 pm

albinopapa wrote:Sounds like the sound file is being repeated every frame instead of being allowed to finish before starting over.
Yep, that's what was happening. I tried to do a collision revamp (common functions rather than just a copy+paste) but my implementation didn't seem to work for some functions, namely the wall collision as shown in the video looping the same sound effect used when hitting the walls.

Some other time I'll work on the collision again, but for now I need to start research on the Level System.
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by Battlefrog » June 16th, 2017, 2:05 am

UPDATE: I'm chugging along with this Level class. It's been a bitch, but hopefully in the next few nights I'll crank it out. In the mean time, here's the level class, and let me know if I should do things differently. (HINT: I SHOULD).

.h

Code: Select all

class Level
{
public:
	bool operator == ( Level &level);

	// Adds the titles and other misc. things to the levels.
	// THIS IS NEEDED. CALL ME!
	bool InitLevels();

	// Configures the level specifically for the specific level.
	void LoadLevel(Level &level);

	// Unloads the level generically so that a new level can be loaded.
	// A nice blank, clean state, really.
	void UnloadLevel(Level &level);

	std::vector<Block> blocks;
	std::vector<Point> points;

	std::vector<int> playerStartPosition;

	std::string title;

	int amountOfBlocks;
	int amountOfPoints;

	Goal goal;

};

// The container for the currently loaded level
const Level currentLevel;

// Story Mode Levels //

Level storyLevel1;
Level storyLevel2;
Level storyLevel3;
Level storyLevel4;
Level storyLevel5;
Level storyLevel6;

// Arcade Mode Levels //

Level arcadeLevel1;
Level arcadeLevel2;
Level arcadeLevel3;
Level arcadeLevel4;
Level arcadeLevel5;
Level arcadeLevel6;
.cpp

Code: Select all

#include "Level.h"

bool Level::operator==(Level & rhs)
{
	return this->title == rhs.title;
}

bool Level::InitLevels()
{
	storyLevel1.title = "SLevel1";
	storyLevel2.title = "SLevel2";
	storyLevel3.title = "SLevel3";
	storyLevel4.title = "SLevel4";
	storyLevel5.title = "SLevel5";
	storyLevel6.title = "SLevel6";

	arcadeLevel1.title = "ALevel1";
	arcadeLevel2.title = "ALevel2";
	arcadeLevel3.title = "ALevel3";
	arcadeLevel4.title = "ALevel4";
	arcadeLevel5.title = "ALevel5";
	arcadeLevel6.title = "ALevel6";

	return true;
}

// TODO: Could possibly change this to a switch statement, but it might not be nessessary
void Level::LoadLevel(Level &level)
{
	// Compare if the level wanting to be loaded is equal to any other level.
	// Currently this doesn't work, because I can't code operators worth shit.
	if (level == storyLevel1)
	{

	}
	else if (level == storyLevel2)
        // This goes on for more. Edited for simplicity.
}

void Level::UnloadLevel(Level & level)
{
	blocks.clear();
	points.clear();
	playerStartPosition.clear();

	amountOfBlocks = 0;
	amountOfPoints = 0;
}
I haven't got everything figured out (Namely comparing the levels), but the pieces are there.
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by Battlefrog » June 16th, 2017, 3:46 am

Alright. Good things happened.

I cranked out the Level Class. It's down below. It's neat. It bulids. That's all I need.

Tomorrow, I'll refine it and add the missing pieces. Then I'll test. That'll be fun. -_-

Hopefully, if all goes to plan, you guys might see an Alpha 3 in the next two days. ;)

Level.h:

Code: Select all

#pragma once
#include "Block.h"
#include "Player.h"
#include "Point.h"
#include "Goal.h"

#include <vector>
#include <string>

class Level
{
public:

	// Compares the level titles, not the actual content.
	// It's much nicer, and quite possibly faster.
	bool operator == ( Level &level);

	// Adds the titles and other misc. things to the levels.
	// THIS IS NEEDED. CALL ME!
	bool InitLevels();

	// Configures the level specifically for the wanted level.
	void LoadLevel(Level &level);

	// Unloads the level generically so that a new level can be loaded.
	// A nice blank, clean state, really.
	void UnloadLevel(Level &level);

	// Vectors for holding the blocks and the points
	// This will be multidimentional. Just have to figure
	// out how to do that...
	std::vector<Block> blocks;
	std::vector<Point> points;

	// Vector for holding the startPos of the Player.
	// No need to be multidimentional, that would be a
	// waste of time.
	std::vector<int> playerStartPosition;

	// Title for the level. Might be shown to the player, 
	// but the primary purpose is to compare levels.
	std::string title;

	// Amount of things in the level. Nice to use for loops.
	int amountOfBlocks;
	int amountOfPoints;

	// A singular goal, as you'd like a goal...
	Goal goal;

};

// The container for the currently loaded level. Levels are just
// buckets of infomation, but the currentLevel is where everything
// gets rendered, collides with, etc.
const Level currentLevel;

// Story Mode Levels //

Level storyLevel1;
Level storyLevel2;
Level storyLevel3;
Level storyLevel4;
Level storyLevel5;
Level storyLevel6;

// Arcade Mode Levels //

Level arcadeLevel1;
Level arcadeLevel2;
Level arcadeLevel3;
Level arcadeLevel4;
Level arcadeLevel5;
Level arcadeLevel6;
Level.cpp:

Code: Select all

#include "Level.h"

bool Level::operator==(Level & rhs)
{
	return this->title == rhs.title;
}

bool Level::InitLevels()
{
	storyLevel1.title = "SLevel1";
	storyLevel2.title = "SLevel2";
	storyLevel3.title = "SLevel3";
	storyLevel4.title = "SLevel4";
	storyLevel5.title = "SLevel5";
	storyLevel6.title = "SLevel6";

	arcadeLevel1.title = "ALevel1";
	arcadeLevel2.title = "ALevel2";
	arcadeLevel3.title = "ALevel3";
	arcadeLevel4.title = "ALevel4";
	arcadeLevel5.title = "ALevel5";
	arcadeLevel6.title = "ALevel6";

	return true;
}

// TODO: Could possibly change this to a switch statement, but it might not be nessessary
void Level::LoadLevel(Level &level)
{
	// Compare if the level wanting to be loaded is equal to any other level.
	// Currently this does work, and I feel like a genius.
	if (level == storyLevel1)
	{

	}
	else if (level == storyLevel2)
	{

	}
	else if (level == storyLevel3)
	{

	}
	else if (level == storyLevel4)
	{

	}
	else if (level == storyLevel5)
	{

	}
	else if (level == storyLevel6)
	{

	}
	else if (level == arcadeLevel1)
	{

	}
	else if (level == arcadeLevel2)
	{

	}
	else if (level == arcadeLevel3)
	{

	}
	else if (level == arcadeLevel4)
	{

	}
	else if (level == arcadeLevel5)
	{

	}
	else if (level == arcadeLevel6)
	{

	}
	else
	{
		// ERROR: DIS IS GONNA FUCK UP!
		UnloadLevel(level);
	}
}

void Level::UnloadLevel(Level & level)
{
	blocks.clear();
	points.clear();
	playerStartPosition.clear();

	amountOfBlocks = 0;
	amountOfPoints = 0;
}
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by albinopapa » June 16th, 2017, 8:31 am

Don't think you'll be able to use a switch because switch/case requires integral comparisons. Since you are not needing to know the case of any level and use a if/else to find the correct levels, why not make two vectors ( storyLevels, arcadeLevels ).

Your init function would look like:

Code: Select all

bool Level::InitLevels()
{
   for(int i = 1; i < numLevels + 1; ++i)
   {
      storyLevels[i].title = std::string("SLevel") + std::to_string( i );
   }
   for(int i = 1; i < numLevels + 1; ++i)
   {
      arcadeLevels[i].title = std::string("ALevel") + std::to_string( i );
   }

   return true;
}

// LoadLevel function
void Level::LoadLevel(Level &level)
{
   // Compare if the level wanting to be loaded is equal to any other level.
   // Currently this does work, and I feel like a genius.
   {
      auto levelIterator = std::find_if(storyLevels.begin(), storyLevels.end(), [&level](auto &StoryLevel)
      {
         return level == StoryLevel;
      };
      if( levelIterator != stories.end() )
      {
         level = *levelIterator;
         return;
      }
   }
   {
      auto levelIterator = std::find_if(arcadeLevels.begin(), arcadeLevels.end(), [&level](auto &ArcadeLevel)
      {
         return level == ArcadeLevel;
      };
      if( levelIterator != arcadeLevels.end() )
      {
         level = *levelIterator;
         return;
      }
   }

   UnloadLevel(level);
}

The reason I suggest the change is adding even more levels or whatever, is going to be a pain in the ass, it's not easily scaleable. With a bit of ingenuity, you should be able to make it scale easier.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: Cubytes / AssaultCube Devlog - REVIVAL

Post by Battlefrog » June 16th, 2017, 5:25 pm

Wow albinopapa, that's pretty neat! :D

For sure I'll put that in!
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

Post Reply