Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Ubermeowmix

Member Since 30 Jan 2010
Offline Last Active Jul 13 2015 12:01 PM

#5231514 Anyone got any ideas where 4k a sec is coming from?

Posted by Ubermeowmix on 28 May 2015 - 11:42 AM

4k a sec was a rough estimate as I wanted to get to the point without being anal about the irrelevant bits.

 

It's average at the start fluctuates and goes up and down all the time, but as stated it seems to be exponential from the values.

 

p.s.

As quoted above 4k a sec is not exponential and it was a bad description, apologies.




#5231099 Anyone got any ideas where 4k a sec is coming from?

Posted by Ubermeowmix on 26 May 2015 - 12:38 PM

Is this causing an actual problem? Other than the potentially eronous values in taskmanager?

When writing any software, there are too many actual challenges to spend time chasing ghosts.

 

Why is this not important, if I leave this program running for 5-10 mins it ends up as a 160mb file size instead of a 5mb one that it should be.

 

Am I missing the point here, games in my experience don't randomly Octuple themselves into infinity.




#5230894 Anyone got any ideas where 4k a sec is coming from?

Posted by Ubermeowmix on 25 May 2015 - 02:27 PM

I'm still no closer to figuring out why my program is causing infinitely exponential 4k from what seems to be SDL_RenderPresent(Renderer);

 

Any ideas, i've isolated the issue right down to basics:

 

 
#include <SDL2/SDL.h>
 
#include <iostream>
#include <stdio.h>
 
#define WINDOW_HANDLE "BasicEngine strip down"
 
///MAIN VARIABLES
bool appRunning= true;
const int WindowWidth = 1024;
const int WindowHeight = 768;
SDL_Rect screenCoords;
 
SDL_Window* Window= NULL;
SDL_Renderer* Renderer= NULL;
 
///FORWARD DECLARATIONS
bool OnInit();
bool fLoadMedia();
void OnEvent(SDL_Event* Event);
void OnLoop();
void OnRender();
void OnCleanup();
 
int main(int argc, char* argv[])
{
    if(!OnInit()) { return false; }
 
    SDL_Event Event;
 
while(appRunning)
{
while(SDL_PollEvent(&Event)!= 0)
        {
OnEvent(&Event);
}
 
OnRender(); ///WTF ARE THESE CAUSING EXPONENTIAL MEMORY CREATION!?
}
 
OnCleanup();
 
return false;
}
 
bool OnInit()
{
    if(SDL_Init(SDL_INIT_VIDEO)!= 0)
    {
        printf("Unable to Init SDL: %s", SDL_GetError());
        return false;
    } else {
        if( !SDL_SetHint( SDL_HINT_RENDER_SCALE_QUALITY, "1" ) )
{
printf( "Warning: Linear texture filtering not enabled!" );
}
 
        if(
        (Window=
        SDL_CreateWindow(
        WINDOW_HANDLE,
        SDL_WINDOWPOS_UNDEFINED,
        SDL_WINDOWPOS_UNDEFINED,
        WindowWidth,
        WindowHeight,
        SDL_WINDOW_SHOWN)
        )==nullptr)
        {
            return false;
        }
 
        if((Renderer = SDL_CreateRenderer(Window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC ))== nullptr) {
            return false;
        }
    }
 
    return true;
}
 
void OnEvent(SDL_Event* Event)
{
    if(Event->type== SDL_QUIT) appRunning= false;
    if(Event->type== SDL_KEYDOWN)
    {
        switch(Event->key.keysym.sym)
        {
            case SDLK_ESCAPE:
                appRunning= false;
            break;
        }
    }
}
 
void OnRender()
{
    ///WTF ARE THESE CAUSING EXPONENTIAL MEMORY CREATION!?
    SDL_SetRenderDrawColor(Renderer, 100, 0x00, 200, 0xFF);
    SDL_RenderClear(Renderer);
 
    ///UPDATE THE SCREEN
    SDL_RenderPresent(Renderer);
}
 
void OnCleanup()
{
    if(Renderer)
    {
        SDL_DestroyRenderer(Renderer);
        Renderer= nullptr;
    }
 
    if(Window)
    {
        SDL_DestroyWindow(Window);
        Window= nullptr;
    }
    
    SDL_Quit();
}
 



#5221584 Implementing a quest/achievement system

Posted by Ubermeowmix on 06 April 2015 - 03:45 AM

What's the best way to implement a quest system that's modular and how are the variables checked for say conversations being had, are they stored in the entities themselves as boolean triggers or in a bigger global list/class.

 

I've never done one before an it's a bit daunting trying to figure out what course of action is best.

 

I thought that if I store the variables in the NPC's and then have the quest class check for whether condition1 & itemB have been done then that would be the best way to bolt on extra levels and characters.

 

Am I on the right track?




#5220773 Anyone got any ideas where 4k a sec is coming from?

Posted by Ubermeowmix on 01 April 2015 - 12:54 PM

Even when it's sat dormant doing nothing?

 

not loading anything and no input from keyboard mouse or anything:

At start of timer:

4792k

after five mins of inactivity:

4832k

 

Initializing media by loading one image into a class, but not activating any objects using new.

At start:

6920k

after five mins of inactivity:

175,036k

 

That's more than a 2 hour soundtrack movie on youtube!!!




#5191708 Help, falling at the first hurdle as usual

Posted by Ubermeowmix on 07 November 2014 - 12:46 PM

Where is the file libglfw.a located? The option -lglfw on the linker command line is going to search the visible link directories for a static library called libglfw.a. If it is not located in any of the visible linker paths, then you need to specify the correct path using -L

 

I didn't understand this bit when you first advised me of it, very frustrating lol.




#5089142 Windows.h has just dissappeared!?

Posted by Ubermeowmix on 26 August 2013 - 05:03 AM

Rebooting did nothing, it seems only directX referenced files are showing up so I am uninstalling and reinstalling Visual studio and the DirectX SDK. It happened after I ran the code for a simple DirectX11 window. Was working fine then everything just dissappeared :S

 

Will let you know if it works, it's bloody frustrating. Everytime I have the time to really get going on a project, something kicks me in the nuts and stops me dead :(




#5089123 Windows.h has just dissappeared!?

Posted by Ubermeowmix on 26 August 2013 - 03:08 AM

I was coding some simple demo's, and then all of a sudden it came up with the following errors:

 

1>------ Build started: Project: Blank Direct3D, Configuration: Debug Win32 ------
1>  main.cpp
1>c:\users\Me\blank direct3d\blank direct3d\main.cpp(1): fatal error C1083: Cannot open include file: 'Windows.h': No such file or directory
1>  DX11DemoBase.cpp
1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\d3d11.h(27): fatal error C1083: Cannot open include file: 'rpc.h': No such file or directory
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

I cannot reinstall DirectX as it fails everytime, and yes I've redownloaded the install file twice now.

 

What the Hell is going on, I did one demo using #include <Windows.h> that worked fine, now it's fallen on it's arse.

 




#5068423 OpenGL driving me crazy

Posted by Ubermeowmix on 09 June 2013 - 09:19 AM

Fixed it, schoolboy error!

 

I was including the whole freeGlut folder under Linker->general->additional includes

 

That is sooooo totally wrong, you have to (step by step)

 

1. Download & copy the freeGlut folder to your project.

2. Link in VC++Directories

2a. In 'Include Directories' the include folder in your copied freeGlut folder

2b. In 'Library Directories', to the lib folder respectively.

3. Add OpenGL32.lib, freeglut.lib to the Linker->Input->Additional Dependencies section.

 

Run the code and have a great weight lifted from your shoulders!

 

Accidentally duplicated this post, sorry guys.




#5068421 Help with OpenGL initialization

Posted by Ubermeowmix on 09 June 2013 - 09:17 AM

Fixed it, schoolboy error!

 

I was including the whole freeGlut folder under Linker->general->additional includes

 

That is sooooo totally wrong, you have to (step by step)

 

1. Download & copy the freeGlut folder to your project.

2. Link in VC++Directories

2a. In 'Include Directories' the include folder in your copied freeGlut folder

2b. In 'Library Directories', to the lib folder respectively.

3. Add OpenGL32.lib, freeglut.lib to the Linker->Input->Additional Dependencies section.

 

Run the code and have a great weight lifted from your shoulders!




PARTNERS