Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Bluefirehawk

Member Since 19 Jul 2012
Offline Last Active Jul 22 2013 10:33 AM

#5057215 Improve on Java or preapre for C++?

Posted by Bluefirehawk on 27 April 2013 - 05:24 AM

C++ is usually used when performance is more important.

...
Not only that but both languages use a garbage collector to pick up and delete unused objects as well - which also uses process time.

When I read about why C++ is faster than higher language X, I always hear Garbage Collectors. I don't know why it is such a common misconception. While I do agree with you in general, I want to look a bit closer at the details:

 

Garbage Collectors do not make the program slower, quite the contrary. If you use a GC or not, you still have the same amount of memory to clean up. The biggest difference here is that C++ cleans it bit by bit, every time an object isn't referenced anymore, while a GC does it in one fellow swoop.

Garbage Collection has it's downsides, like you said when it kicks in, it tends to stop the whole program for a bit until it's finished, which isn't very nice. It also needs more memory. The Java GC can throw an OutOfMemoryException while a third of it's heap is technically free.

Where a GC is better however is throughput, a program tends to spend less time cleaning it's memory with a GC than with reference counting. It finds cyclic dependancies on it's own, throughput tends to scale with the amount of memory you give plus object allocation is faster than in C++. A modern garbage collector shines when you have a program that has many objects that become garbage quickly and a hand full of objects that stay alive during the whole runtime of the program.

 

So no, a Garbage Collector does not in general negatively impact performance. It all comes down to what task there is to do. And that's where I agree again wink.png . I wouldn't write a high performance math library in Java, nor would I implement a high performance streaming service in C++.

 

E: also with today's runtime optimization of JVM/CLR, you don't necessarily get a performance advantage when you just switch to C++. You can be quite a bit faster, but you have to know what can be optimized and how.




#5054938 What do you think of my encryption algorithm

Posted by Bluefirehawk on 19 April 2013 - 09:49 AM

Did i just find by accident the best encryption algoritm you can write?

No.

@Avaro or Vortez: also Block Cipher Chaining is also something very similar.

If you are really that interested, I can ask my Cryptology professor (I hope that's the word in english and not some strange religion) how breakable your algorithm is, but I would guess that it is pretty bad even compared to RSA. (Today, nobody would be using RSA encryption, there are just too many problems with it. But it is widely used, so until somebody comes up with the death strike for RSA. That happens as soon as the quantum computers can factorize bigger numbers).

Let's examine quickly where your cryptographic power lies: You generate a hash from your password. No power is hidden here, it is the same as if you would use a random 32 bit value.
Then you create a pseudo random number with the Mersenne Twister. After that you make an XOR operation with the pseudo random number. So your whole power lies in the strenght of Mersenne Twister. I don't now much about it, but it isn't used in cryptography because the next pseudo number can easily be guessed when you have some.
Plus as the link suggests, when you reuse a password, you are pretty much done, which isn't a very useful cipher in the modern age.

There is a reason why you tend to have a bachelor in mathematics before you specialize in Cryptography. While it can happen that you find the next super cipher, the chances that you do are very slim.

There are a LOT of ciphers out there that can fit your need, RSA, modern DES algos, even modified Vignere Ciphers may be more secure. For a Programmer, there is absolutely NO reason to not use a standard cipher. They have been very well researched and are VERY secure ("the hidden world" may know how to break it, but that is always a chance for people like us).




#5047566 Rediscover CPU: a very niche educational game

Posted by Bluefirehawk on 28 March 2013 - 03:15 AM

I think you are going into the direction of gamification. Just a disclaimer, this isn't an easy field, furthermore this idea seems to be fairly new in game design and it seems to be one professional game designers struggle with.

 

I once used a Virtual CPU program that could run x86 like assembler and had some virtual devices to play with (like a Traffic Light and a heater and thermostat). Mind you it was the work of a bachelor thesis of two experienced programmers.

 

Why do you want to use C++? If this project is about bringing CPU architecture closer to the people, then the GUI is hugely important. From my experience higher level languages give you more bang for your time invested especially anything GUI related.

 

For me it seems like you follow two different goals, your personal goal is to learn assembler and lower level programming, while your project goal is to build a platform for teaching this. From my experience having different personal and project goals is a bad composition for hobby projects.




#5034700 flexibility versus progression, how to reconcile?

Posted by Bluefirehawk on 20 February 2013 - 02:53 PM

You've hit something important here:

There are many choices and there is no "best" solution, there may not even be a satisfying one, or it may be even the wrong problem to solve. All you can get here is an opinion of a user.

The reason why there is no clear good choice is, you are not sure where to go with the game, what effects these decisions have, or even both. Don't be ashamed for that, I am not too sure what effects your current solutions have either, that's why probably neither of us is a professional game developer.

You can get a clearer and maybe better solution if you analyse those two things, but I am not sure it is the right problem to solve.

 

A MOBA game's core aestetic is competition, the core reason why somebody plays such a game. On the other hand, most good mobile games I know of are more towards casual gaming. Which they kind of need to be with the limited human input and in general shorter play sittings than a Console/PC game.

So bringing a hardcore competitive game to casual gaming is where I think you are struggling at. If it is too casual, it may be not the experience you envisioned. If it is too much like a moba game, it's not suitable for a mobile game.

 

I guess you are envisioning a LoL on mobiles with a different setting. This is probably impossible with the current mobile devices and it's playerbase.

Maybe a good way to start this is to think of how you can bring competition in casual gaming, something a player will probably only play 10 minutes in one sitting.




#5023439 Project: Alter Ego - An introduction.

Posted by Bluefirehawk on 20 January 2013 - 03:43 AM

...
When stationary, the system will in theory perform coinciding footwork by matching the upper bodies movement in a predictive anatomically correct fashion...
I have a trouble understanding this line, could you clarify it a bit more?

All in all, you very carefully defined combat mechanics. There is much more to a game than it's features. I would say Minecraft doesn't have a single feature, yet it is an awesome game.

The most important question, why a gamer plays your game? We play Portal for a different reason we play Amnesia, so what is yours?
Your title suggests that you'd like to offer the gamer an alternate reality, where he can be something he isn't. That's very good, in my opinion that's where fable fell flat, you could do anything you'd like for shits and giggles, but it never managed to feel like an alternate me.

In that case, are you sure that this combat system enforces this aspect? Why do you think that?


#5023189 All Kinds of Advice Welcome: "WAKE - Evolution through Extinction"

Posted by Bluefirehawk on 19 January 2013 - 10:07 AM

Crap, my response was sent to internet nirvana... here it is again:

This isn't really a criticism, it's more an observation: your draft reads similar to a holliwood blockbuster with a nice happy ending plus room for a second part. It isn't a bad thing, quite the contrary, it works very well if you want a casual game, a game you play when you come home from work and just want to "shut down" for an hour or so.

But you seem to want a game with emphasis on storytelling, if so you need a story that is engaging to the player. That makes the player explore some concept, feeling or question. You need a topic for your narrative and your game.
You have bits and pieces of one lying around in your story. A theme about the duality of technology, that it serves both as the saviour and doom of humanity. You also introduced time travelling, you could use it and enforce your topic by introducing unforseen consequences to the travel to the past. Otherwise it seems a bit out of place to me.

My real criticism is about your last sentence. How you tell the story is as important as the story itself. The later iterations of Call of Duty had nothing interesting to tell, but they tell it interestingly. You possibly already know this, just that you put a lot of thought in that too.

You have an obvious hero that sometimes goes throught some phases of "the hero's journey", maybe this video can help you designing your story:
http://www.youtube.com/watch?v=SWKKRbw-e4U

In a nutshell, what kind of game do you want to have? How good your story is may also depend on what you have in mind.


#5017441 Thoughts on Splitting Up the RTS...

Posted by Bluefirehawk on 04 January 2013 - 09:18 AM

My question would be, why do you want to split it up? What makes the experience different and better suited for the game you have in mind?

I didn't see anything about the setting, the theme of the game.  LorenzoGatti touched upon this:

 

To me, a "single settlement" supporting a "squad" suggests a very specific setting and premise: skirmishes between little city-states (presumably isolated, self-sufficient colonies) which can field a militia of a handful of people with limited-budget equipment

 

If you had to describe your game in one to three sentences, what would it be?

In my opinion, this basically defines in what direction you want to go with your game and if specific mechanics are useful for that or not. (Let's be honest, if we could, we would implement a million page long list of mechanics, most of which the gamer will probably never notice, but we sadly don't have the time.)

 

It also helped me to think about, why the player should play my game. Competition? Creative creations (spore)? Adventure and exploration...

Then it is easier to discuss specific mechanics and if it is the right direction




#5016339 Playing with a theme for a game

Posted by Bluefirehawk on 01 January 2013 - 05:09 AM

Hi guys

 

I have run into a "good" problem while working on a game, I missed thinking about a theme. And now that I have an idea for it, I kinda don't know what I can do with it now.

 

Maybe I should write about the game idea first: The game is a co-op game in a post apocalyptic world, you and your friends are a group of rookie soldiers with the orders to flush out the enemy of a certain territory. How you are going to do that is completely up to you.

 

Now with the theme I'd like to play around with: "You are expendable".

I want them to feel less and less valuable, nobody cares if you die as the game progresses.

After the first tutorial, before the gamers are sent into the world the first time, they get the typical captain's pep talk ("We are counting on you, soldiers"). After that, nobody from their faction will talk to them with a human voice.

You don't see any npc soldiers fighting at your side, if you want any supplies, you have to pay for them. And they are sent to you via artillary strike. In the middle of the game, you find more and more groups of dead soldiers that probably had the same orders.

I want to give them the mood that, in this world, everybody wants to kill them, they have nothing but each other.

 

So my main problem is, how can I use that feeling for the ending? The only thing I can imagine is to put in a plot twist, their commanders are actually the bad guys and they are going rogue. But what else can I do with it?

 

Or do you have any other suggestions?




#5014655 What kind of optimization makes C++ faster than C#?

Posted by Bluefirehawk on 27 December 2012 - 03:50 AM

I think most game engines being written in C++ is simply because C and C++ are extremely portable languages. If there were another language that was equally as portable you might see more engines written in that. It doesn't hurt that one of C++'s goals is also to be performance king.
I am not sure what you mean by "extremely portable". Yes, in theory they are, but thanks to non standard extensions (although very useful, #pragma once for example), and different architectures, I would say they are most definitely not portable. You have to think about portability in your program design, something most java and C# developers don't even have to think about. C's target isn't to be portable, it is a system language, as I recall, Ritchie and Tompsons target was to have a language offering enough high-level support to not get lost in your code, while having the power to dance with single bits.

Back to topic:
I wrote a program comparing java and C++, the later iterations of java have a good runtime optimisation. Both programs syntactically did the same (as a java programmer would write a C++ program), multiplying BIG matrices. There was no big performance gap between java and C++. But when I rewrote the C++ algorithm to simply use pointer arithmetics, C++ ran several times faster than it's counterpart.

The lesson for me was: Yes, C++ is faster when you know how and you have the right problem to solve. But Java has become fast enough, the performance gap for your everyday business application is negligible.

E: You can even write cool indie game engines with C# and Java. Yes it is not as powerful as a C++ engine, but you don't try to make a better looking, more efficient engine than Source,Unreal and friends, right?


#5010900 Naval game factions map (post ww2)

Posted by Bluefirehawk on 15 December 2012 - 04:20 AM

Yeah... looks good?

There isn't much to comment on and i don't think it is very relevant to the gameplay. It's useful for the story though.


#5009474 Game Component Architecture

Posted by Bluefirehawk on 11 December 2012 - 11:58 AM

First, think about what you'd like to achieve with your game. Do you want to know more about programming, game design, patterns etc? Then proceed.

But if you'd want to MAKE a game, C++ and SDL are not the best choices, you are first building your own engine, you spend a LOT of time coding stuff that has nothing to do with your game logic.


Assuming the first, and assuming you know you have 3 years + experience in programming, I suggest you go and buy a book called Game Engine Architecture by Jason Gregory. In there, you find all the different subsystems a modern day game engine has. Yes you won't make the next source engine, but your game engine has to tackle similar kinds of problems, just your solution will be far simpler.
You should also buy a book on Design Patterns, you'll need them more than you'd like.
Because your problem to me seems like you don't really understand what problems the composite pattern should solve, or what it actually is, what you are describing seems more like inheritance to me. Also I think you don't know yet what the code around the game logic actually should do. This is very common with beginners in game writing(I had the same problems just some months ago).

If you have less than 3 years of experience in programming and you don't have that much experience in C++, don't, just don't use C++. Use C#, Java, or anything else. Buy some general programming books, I enjoyed "Pro C# and the .net framework".

E: So, you should tell some more, what do you want to accomplish and why do you think you should use the composite pattern?


#5005693 Is C++ too complex?

Posted by Bluefirehawk on 30 November 2012 - 08:14 AM

The code I am presenting is not doing something usefull at all to be honest but imagine a difficult calculation going on over a grid in which if a certain condition is met you need to break out of both loops and continue the rest of the algorithm with the results already calucalted?

I would say wrong semantic. Since you loop as long as a condition is met, you should need a while loop. Breaking out of a for loop is a strong indicator for that.

It is a bit nitpicky, but from a theoretical computer science stand point, for loop with a break statement is wrong. A for loop is intended to repeat the internal statement for a known amount. Therefore a for loop can be expanded by repeating the line of code by x amount of time.

A while loop is very different, each while loop has a variance and invariance which you can use to proof your loop aborts, and with the invariance you can proof that your loop calculates what it should.
</detail>

I am sure there is a freak case where a goto statement makes more sense and is more readable than any other solution, But I have yet to see a good example for it.
You can live a happy and productive life writing clean code without ever using a goto statement.


#5005644 Is C++ too complex?

Posted by Bluefirehawk on 30 November 2012 - 03:42 AM

The language itself is to me very beautiful. But it is complex and the programmer requires more knowledge on how the computer system works, compared to a Java/.Net/Perl programmer.
ome stuff doesn't make much sense anymore in the modern C++11 standard, like having structs and classes, which essentially are the same today. I guess they are still around for backwards compatibility.

I think the nasty bit of C++ isn't the language, it is everything around it. Most toolchains for C++ are old, very old, and seem to be deliberately complicated. I spent so much time crawling through the internet, getting my cross platform build script to make a platform dependent build script to build my project. Yet, my project is still not glued to unit tests.
Comparing it to the java, you have far easier toolchains, designed for modern standards of development. And you almost get platform indipendence for free.


#5000154 Game Design Crysis!

Posted by Bluefirehawk on 12 November 2012 - 02:23 AM

I think you can agree that it's hard to make a game with the constraint of having very light art assets which is why I was mentioning models and whatnot.

No I don't. Sometimes it is the flavor of the game. Comparing Minecraft and Darksiders, I think it is more important to have a distinctive, rememberable style than one that looks nice.

Anyways what I wanted to tell you is, you are too focused on your engine and everything aroud it.


#5000147 Game Design Crysis!

Posted by Bluefirehawk on 12 November 2012 - 01:37 AM

I have coded the engine and stuff but now what kind of game should I code?

Don't, just don't do that. Don't make engines, make games. There are limitations on how flexible and game indipendent an engine can be, that's what the professionals say. You have a hard time not doing a fps with the unreal engine. There are always game related assumptions that sink down to the engine. If you do an engine yourself, you'll see that you can vastly simplify subparts compared to professional engines.

I have no trouble coming up with ideas assuming I had some money but I do not... So could some of your game design brains point me in the right direction?!
(also if you help me design a game I would credit you and give you a portion of any money made which will more than likely be none)

I am a bit confused in what you'd like from us. If you have ideas, then write about them. The "game design brains" may help you simplifying your idea and give some feedback.

Yeah by allot of funding I mean they would require things like models and animations and art lol.

Yes?! And what do you expect to get for your gameengine? Top notch quality artwork, models and textures? You are a hobbyist. I know you don't like that thought (neither do I), your game probably won't look as good as you have it in your head. You don't have the professional artists that realize your dream.

You already talk about models as if it is a IEEE normed construct that you need to aquire. You don't know what you are doing, because you don't know what game you want to make, you have no target.

It worries me a bit that you wrote about the engine and then a bit about what the engine consumes. A game is more than engine and models, it should be fun, have mechanics, be challenging...




PARTNERS