Recent posts by EndlessSporadic on Kongregate

Flag Post

Topic: Game Programming / Ive always wanted to make a game

I am going to disagree with both posts before mine. I believe you need to understand game programming concepts before you dive into programming. It is much harder to learn a language if you don’t know what you are trying to program.

I’ll leave some links to some reading material to get you started. Some of them use code in the examples they give, but you should be able to follow the logic behind all of it.

Source 0
Source 1
Source 2
Source 3

Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

Originally posted by Indy111:

I’m really loving Overlord, it is completely original and has great thriller aspects to it.

If you know anything about the source you’d think otherwise. The pacing of the source is really slow and steady. Trying to fit something decent in 12 episodes isn’t working in their favor here.

Flag Post

Topic: Game Programming / I'm new and need some help

Code is provided as-is. I am not guaranteeing it will work in every situation.

Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

It will be, yes. It will only be distributed as source code – no precompiled binaries. This will be months from now though, and it may never come to fruition depending on whether I can get employed immediately after graduation.

Flag Post

Topic: Technical Support / .GIF avatars seem to be broken.

Apologize for the bump. Take a look at the source code. Your image here on the forums is a resized .jpg image. This is likely done to save bandwidth. To be honest I am not interested in wasting my bandwidth to see your gif.

Flag Post

Topic: Technical Support / White Screen

This will probably get me in serious trouble but I’ll post this suggestion anyway. Install an ad-blocking plugin for your browser and try loading the game again. I’ve seen it before where various websites simply fail to detect when the ad has finished playing and therefore will not load the content. If the game loads we know that the ad interaction is where the problem is. Obligatory “uninstall the application or whitelist Kongregate when you are finished testing”.

Flag Post

Topic: Off-topic / If women are paid 30 cents less than men on the dollar

It’s also possible that certain men work harder than women and get raises, then the women bitch about it since they feel like they deserve a raise too even though they didn’t work as hard. There are two sides to every story. As I like to say, “Men rape, women lie.”

Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Originally posted by qwerber:
Originally posted by EndlessSporadic:


Thrilling, isn’t it?

What is this and what are you loading that takes that long?

I am building a game engine from scratch, and every displayed on the screen took less than 10ms. The “21:40:56” is the time the engine was launched, or 9:40:56PM. It stops at the rendering system since that is the furthest I had gotten at that point. I have since started over with the intention of doing a massive structural overhaul. I’ll also be using native platform-dependent code per platform instead of third party libraries. It will be significantly more work to get things up and running, but I feel it will benefit me more in the long run. I won’t have to rely on external code or keep it updated, and the knowledge of the native systems is more appealing on a resume.

Flag Post

Topic: Game Programming / C++ on Kongregate?

Most engines have HTML5 as a target these days. If you are writing a C++ application from scratch or are using the DX template you will be unable to upload the resulting executable to Kongregate.

Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

I don’t know about you, but I take weird satisfaction from redoing old systems that I’ve created and making them better by incorporating stuff I have learned since the last time I made it. Yeah it is reinventing the wheel, but if we did not reinvent the wheel all of our cars would still be using stone tires.

Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Originally posted by a3lex33:
Originally posted by yoyoad:

platformer that aims to capture the “old school difficulty”

Are you sure about it? There is a popular theory that old games were so hard only to make them last longer, since they could not have much of everything. Nowadays that kind of difficulty will be at least frustrating.

There is a very niche market for it. As long as this person is intentionally targeting that market then I see no problems. Just make sure your difficulty isn’t artificial.

Flag Post

Topic: Game Programming / JavaScript Good OR Not Good

Hello all, after reading this thread I come to conclusion that EndlessSporadic may be very under-informed. Please read up and do some more research on the technologies you are talk about, I hope you will become informed :)

Your post is just as useless as mine if you don’t provide your own sources. It was also really unnecessary as I already implicitly acknowledged I might be incorrect. I appreciate your smugness though. Really, I do.

(I know for a fact that CS6 is their last Flash iteration)

Strictly speaking I was not incorrect. Source here. I was incorrect that it was the last Flash iteration, but I was not incorrect that it is their last CS iteration.

Flag Post

Topic: Game Programming / Let's make a learn game development group

XMLHttpRequest or Ajax uses GET and occurs without a page load.

I am pretty sure you can use POST for XMLHttpRequest and AJAX. I was using it for BBCode parsing on my own website.

Javascript doesn’t have any of that. We have function hoisting which moves all declarations to the top so they can be used beforehand

Part of me loves that and another part of me hates that. Function hoisting is useful in many ways, but it can cause a lot of trouble in other ways, though I admit most of those are newbie mistakes when picking up the language. I don’t particularly support behind-the-scene operations that make your code behave in a way that is different than it appears to execute.

I get the feeling you’ve been stuck on this error for quite some time huh?

I threw myself into this state yesterday, actually. It’s as simple as making an adapter/interface and not actually having any of the underlying methods implemented. That will get you loads of compiler warnings extremely quickly ;)

I try to avoid this type of coding. I’m pretty trigger happy when it comes to compiles. If something doesn’t work I’ll comment it out until I can find a way to put it in without breaking everything else.

Generally I do as well, but I already have the class stubbed. My current short-term goals do not require that my project be able to compile. My existing framework is solid enough that I am 95% sure what I am implementing isn’t broken (since I’ve already implemented it in other projects and I know it works). Of course when I finish the implementation, the testing phase is going to take a while.

Guessing you did make some progress, so that’s a start at least. Just erm, don’t give up!

Despite the fact that it does not compile I’ve made significant progress. Unfortunately it is the type of progress that is not visible to the end user, but this is by far the largest project I’ve worked on and I am extremely pleased with the rate I am going. I have also gotten extremely comfortable with C++ pointers and memory management. Unfortunately certain template uses and forward declaring templates are still quite confusing for me. I’ll understand it. All in due time.

Flag Post

Topic: Game Programming / Let's make a learn game development group

GET is what you use when you type in a web address into the browser.
POST is used when a form is submitted.

Careful here. The only differences between GET and POST are the visibility of the variables and the method used to submit the data to the server (aka security). You are not restricted on when to use GET, though POST can only be done via code (can’t be entered into the URL bar). A common example of when to use GET via form is during login when the user should be redirected to another webpage. GET is also used when the data does not need to be private and the form is only there as a means to help the user format a query (url/index.php?color=blue" or "url/index.php?forum=offtopic&thread=letsmakealearngamedevelopmentgroup). Ultimately you use GET when you don’t need security, POST if you do.

I’m glad to see you are making progress though. I never could wrap my head around JavaScript. That language is messed up in so many ways (not all of which are bad – just weird and unexpected [controlled] behavior).

As for me, my game engine is in a state where it isn’t even remotely close to compiling due to the amount of IO-related dependencies I need to implement. I also have a 1/4 finished ThreadBase class that has a lot of forward-declared classes that I need to actually create as well as the actual implementation of the class (1/2 the header is finished and I still need to finish the other half plus the source file). Forward-declaring does wonders for documentation and ease of programming but it completely denies you from compiling your application.

Flag Post

Topic: Game Programming / Timer/tick() and Timer/_timerDispatch() - a3lex33 solve the error

timer_txt.text = minutes + “:” + seconds+"." + miliseconds;

This can’t be outside of a method. I mean it can, but I get the feeling it is not placed where you want it to be.

Does the IDE you are using provide a call stack? Just posting the code with the issue isn’t enough. We need to see the entire warning that the compiler gives.

Flag Post

Topic: Off-topic / Played XgenStudios games

Motherload was amazing, but its saving method and policy were garbage.

Flag Post

Topic: Off-topic / The fuckin odds

I havent used a locker since middle school.

Flag Post

Topic: Off-topic / What are you listening to?

Skywards by MarasK. Collab between Marasy and Kors K. Their entire album is amazing.

Flag Post

Topic: Off-topic / What was the last thing you copy/pasted?

Flag Post

Topic: Game Programming / Infinite scrolling map problem AS3

The reason it is not working is because you are only modifying the location of one segment. In order for there to be reliable, clean infinite scrolling you need 2 segments. Using C-syntax:

This code assumes 600 height viewport and the map is always scrolling downwards independent of the player input.

int ViewportHeight = 600;

void Init()
    Segment1.Height = ViewportHeight;
    Segment2.Height = ViewportHeight;

    Segment1.Position.y = -ViewportHeight;
    Segment2.Position.y = 0;

void Update(float DeltaTime)
    Segment1.Position.y += Distance * DeltaTime; // never tie anything to the framerate, especially movement.
    Segment2.Position.y += Distance * DeltaTime;

   if (Segment1.Position.Y > ViewportHeight)
       Segment1.Position.Y = -ViewportHeight;

   if (Segment2.Position.Y > ViewportHeight)
       Segment2.Position.Y = -ViewportHeight;
Flag Post

Topic: Game Programming / How to Prevent Global Namespace Pollution in C++

Originally posted by player_03:

If you’re willing to restrict T to a specific set of values, it’s apparently possible to move your template code into a source file.

Otherwise, all I can think of is making a namespace of your own, and populating it with references to string.h. The header would define a bunch of functions, and then the source file would import string.h and implement all the forwarding functions. This header would still be imported in MyOtherClass, but at least the functions would be in a custom namespace.

For context I am writing a game engine, so restricting T to specific values is mostly out of the question. It may work for the specific class in question (a Char utility class that is templated for TCHAR, char, and wchar_t which is then included by my string class which is included everywhere), but it is not a wide-spread solution.

Using a custom namespace is an interesting solution that I’ve been using elsewhere for certain helper methods that aren’t meant to be visible in the global namepsace, but it never really occurred to me to put an include in there. I’ll try that one out.

Originally posted by Nolander777:


As stated above I am writing a game engine so it is not possible to expect people to put a bunch of random defines in their classes, nor is it desired.

The include guards arent necessary, but are generally good practice.

All of my target compilers support pragma once, so include guards are not necessary.

Flag Post

Topic: Game Programming / Error #1009 - player_03 solve the error

With the code provided it is impossible to access a method of a null object assuming obt is the object in question. The if(obt == null) return; bit guarantees that (assuming single threaded). It is possible that the array object obstacles is null and the property/method in question is the square bracket operator.

obstacles[i] —> obstacles is null, attempting to access obstacles.operator[](int index)

Flag Post

Topic: Game Programming / How to Prevent Global Namespace Pollution in C++

Please do not respond if you do not have a fundamental understanding of C/C++ or don’t have a link to a relevant source. Thanks!

I’m trying to figure out a way to prevent namespace pollution in C++, particularly in template headers. In order for templates to work for any class most of the code dealing with the template type needs to be within the header file. This can cause namespace pollution issues in the following way:

#pragma once

#include <string.h>

#define FORCEINLINE __forceinline

template <typename T>
class Array
        //Do something with T here that requires something from string.h

Now, if I were to include the Array header in another file called MyOtherClass the string.h crap would unnecessarily clutter the global namespace in MyOtherClass even though I don’t need string.h. Normally the solution to this would be to put those includes in the .cpp file but often this is not possible for templated classes.

#pragma once

#include "Array.h"

class MyOtherClass
    Array<int> ArrayOfInts;
    FORCEINLINE MyOtherClass()
         //Crap from string.h included in Array.h is polluting the global namespace

Does anyone know what can be done to circumvent this issue?

Flag Post

Topic: Game Programming / Break the ice

I can’t begin to stress how important it is to keep your scope small. Your first two or three games should just be a single level. A very polished single level. Your first projects are meant as a way to solidify your development knowledge and to reveal questions that need to be asked. Motivation comes easier when an end is in sight.

Flag Post

Topic: Off-topic / You wake up and no one is there.

Do the same thing I do every day.

Once the power goes out I’d probably sleep myself to death.