Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post Posted: June 17th, 2017, 1:20 am 
User avatar

Joined: March 31st, 2015, 10:10 pm
Posts: 67
Location: Florida, United States of America
Cooked up something for the project after Cubytes is finished. GX19 is the working title.

Image

And yes, that's what the game will look like. I'm aiming for a old graphics card showcase look. (But apparently way shittier... :lol: ) Also, not far off from LSD: Dream Emulator. :P

Oh, before I forget, still working on the Level class, and right now I'm implementing albino's suggestion into the codebase.

_________________
Broc W.

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


Top 
 Profile  
Reply with quote  
 Post Posted: June 17th, 2017, 3:46 am 
User avatar

Joined: March 31st, 2015, 10:10 pm
Posts: 67
Location: Florida, United States of America
Tonight went alright.

As albinopapa suggested, I implimented his advice - slightly.

For some reason, I couldn't get the iterator working (Most likely because I didn't know how it works :lol: ), so I settled for this instead:

Code:
bool foundLevel = false;

   if (foundLevel == false)
   {
      for (int i = 0; i < numStoryLevels + 1; ++i)
      {
         if (storyLevels[i] == level)
         {
            LoadLevelIntoCurrentLevel(storyLevels[i]);
            foundLevel = true;
         }
      }
      for (int i = 0; i < numArcadeLevels + 1; ++i)
      {
         if (arcadeLevels[i] == level)
         {
            LoadLevelIntoCurrentLevel(arcadeLevels[i]);
            foundLevel = true;
         }
      }
   }


Most likely less functional than iterators, but the main thing is that it compiles.

Tomorrow, I'll be finding out how to load custom levels from levels(if refactoring doesn't get in the way...)!

_________________
Broc W.

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


Top 
 Profile  
Reply with quote  
 Post Posted: June 17th, 2017, 4:06 am 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2779
Location: Oklahoma, United States
I'd maybe put a break in there. That way when the level is found, it exits the loop. Maybe even combining the loops if the number of story levels and arcade levels are the same.

Sorry about the iterator thing, don't have your code, so couldn't test what I wrote.

_________________
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


Top 
 Profile  
Reply with quote  
 Post Posted: June 17th, 2017, 4:15 pm 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3445
Location: Japan
Not sure what that is but it looks cool. :lol:

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: June 17th, 2017, 6:06 pm 
User avatar

Joined: March 31st, 2015, 10:10 pm
Posts: 67
Location: Florida, United States of America
albinopapa wrote:
Sorry about the iterator thing, don't have your code, so couldn't test what I wrote.


You're fine albinopapa. Besides, you gave me inspiration!

chili wrote:
Not sure what that is but it looks cool. :lol:


New project in the works after Cubytes. It'll be using Unity, and it'll be quite odd. It'll be a exploration game, with extremely odd visuals, as you can see :lol:.

Like Cubytes, the project will work with my limitations (with 3D Modeling) and hopefully bulid around it by using cool shader tricks or something along the lines of that :P.

It'll focus more on the story than Cubytes, that's for sure.

I'll be telling more when Cubytes is more or less starting to get finished.

_________________
Broc W.

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


Last edited by Battlefrog on June 18th, 2017, 3:44 am, edited 2 times in total.

Top 
 Profile  
Reply with quote  
 Post Posted: June 18th, 2017, 3:38 am 
User avatar

Joined: March 31st, 2015, 10:10 pm
Posts: 67
Location: Florida, United States of America
Alright, I finished a rough state of level loading.

Next up on the agenda is to figure out FileIO, so I can load information about levels from txt files. It'll make it easier to maintain and create levels.

After that I'll be working on getting the system to work in the game. :)

Hold tight. Alpha 3 will be the the largest gap between updates. Hopefully after Alpha 3 I should get out weekly or bi-weekly updates.

_________________
Broc W.

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


Top 
 Profile  
Reply with quote  
 Post Posted: June 19th, 2017, 1:44 am 
User avatar

Joined: March 31st, 2015, 10:10 pm
Posts: 67
Location: Florida, United States of America
Encapsulated the shit outta the level code, or at least the things I NEED to encapsulate. :lol:

Tomorrow I'll work through the Intermediate series to FileIO, and see if that solves my problems :P

Here's the code, if any of you are interested.

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

#include <vector>
#include <string>
#include <assert.h>

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, BUT ONLY ONCE!
   // Again is a waste of time.
   bool InitLevels();

   // Finds and loads the level requested into the CurrentLevel.
   void FindAndLoadLevel(Level &level);

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

   int GetGoalX();
   int GetGoalY();

   int GetPlayerStartX();
   int GetPlayerStartY();

   // Vectors for holding the blocks and the points
   std::vector<Block> blocks;
   std::vector<Point> points;

   // 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;

private:

   // Scans a .txt file for level infomation and adds it to
   // the various factors of the level
   void CollectAndStoreLevelInfo(Level &level);

   // Actually loads the level. Not needed to be called, this is used internally.
   void LoadLevelIntoCurrentLevel(Level &level);

   // Simple x and y pos of the goal
   int goalX;
   int goalY;

   // Two ints for holding the starting position of the player
   int playerStartX;
   int playerStartY;

};

int numStoryLevels = 6;
int numArcadeLevels = 6;

std::vector<Level> storyLevels;
std::vector<Level> arcadeLevels;

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

_________________
Broc W.

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


Top 
 Profile  
Reply with quote  
 Post Posted: June 19th, 2017, 2:36 am 
User avatar

Joined: March 31st, 2015, 10:10 pm
Posts: 67
Location: Florida, United States of America
I created a Trello board for monitoring my progress on the game.

It won't die, I promise.

https://trello.com/b/TiNYWGFh/cubytes

_________________
Broc W.

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


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3, 4

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron