Search found 52 matches

by Divinas
Mon Feb 03, 2014 2:56 pm UTC
Forum: Coding
Topic: Bugs popping up only under optimization
Replies: 25
Views: 8561

Re: Bugs popping up only under optimization

As a game dev, I'm fairly well acquainted with such bugs. In my experience, most of those are not caused by undefined behavior, but because of bad synchronization between stuff. When running the code optimized, stuff happens faster. Things which have a fixed update time (for example, once every fram...
by Divinas
Fri Jun 21, 2013 12:53 pm UTC
Forum: Computer Science
Topic: print a string modified-what's wrong?
Replies: 14
Views: 6132

Re: print a string modified-what's wrong?

I'm not really sure what you want to do, but you're incrementing and then decrementing p1. I guess one of those operations should operate on p2, instead.
by Divinas
Fri Apr 12, 2013 12:44 pm UTC
Forum: Coding
Topic: Daft Punk - experiment in efficiency
Replies: 34
Views: 16853

Re: Daft Punk - experiment in efficiency

What troyp is mentioning is exactly what my idea was. However so far I'm unable to make it concise enough for it to be better than the other solutions. I'm experimenting with some macro magic, which might be fruitful and make it work.. maybe. I think we really should agree if we'll just print out th...
by Divinas
Thu Apr 11, 2013 12:40 pm UTC
Forum: Coding
Topic: Daft Punk - experiment in efficiency
Replies: 34
Views: 16853

Re: Daft Punk - experiment in efficiency

Ok, the char count with whitespaces stripped is 1444 for mine and 1058 for yours. Challenge accepted, I have a few ideas :)
by Divinas
Thu Apr 11, 2013 10:30 am UTC
Forum: Coding
Topic: Daft Punk - experiment in efficiency
Replies: 34
Views: 16853

Re: Daft Punk - experiment in efficiency

Here's my idea. It can be made shorter with some trivial changes. The output may not be exactly as yours, but the idea is pretty much the same, and can be easily made to match yours exactly (I didn't walk through the entire lyrics to make sure it works exactly as yours does). An online char counter ...
by Divinas
Wed Apr 03, 2013 6:53 am UTC
Forum: Coding
Topic: Am I back propagating correctly?
Replies: 13
Views: 8786

Re: Am I back propagating correctly?

Actually, that's not exactly true. Having too many layers and nodes makes your neural net more prone to overfitting. This however is most probably not the reason why you are getting the wrong results, in your particular case (disclaimer: I haven't looked at your code).
by Divinas
Fri Mar 29, 2013 11:07 am UTC
Forum: Coding
Topic: Static Source Code Analysis in C++
Replies: 3
Views: 8683

Re: Static Source Code Analysis in C++

I would recommend Coverity SAVE - it is quite expensive, however there is a free trial. We use it in my company on our current project and we have a codebase of several million lines of code. The results are pretty OK, actually.
by Divinas
Tue Feb 26, 2013 2:19 pm UTC
Forum: Coding
Topic: Dealing with complexity in excel spreadsheets
Replies: 5
Views: 3043

Re: Dealing with complexity in excel spreadsheets

I would like to repeat what Ben Oni said. If you have to create some manner of stability and fault-tolerance in excel per se, follow what he said: You really need to separate logic from data. Create a different sheet that holds all the logic, that is not 'user' readable. Write values from this sheet...
by Divinas
Mon Feb 04, 2013 12:15 pm UTC
Forum: Coding
Topic: Writing My Own Logic Gates in Python
Replies: 32
Views: 8996

Re: Writing My Own Logic Gates in Python

I'll put the disclaimer beforehand that I haven't actually coded in python more that to toy with it, so I'll answer more from a general purpose standpoint: If you want to go the OOP way, how you approach this is as follows: You identify what's in common between the logic gates and what's different b...
by Divinas
Fri May 04, 2012 2:25 pm UTC
Forum: Computer Science
Topic: Feature extraction using a 2D laserscan
Replies: 1
Views: 1504

Re: Feature extraction using a 2D laserscan

Do you have a map of the room? If you do, it should be really easy to identify the parts that are part of the room, and the ones that aren't. If not, some form of particle filters should be able to solve your problem, or some other supervised learning algorithm. By the way, that's a pretty ambitious...
by Divinas
Wed May 02, 2012 3:07 pm UTC
Forum: Coding
Topic: Getting into coding with a PhD in math
Replies: 20
Views: 9986

Re: Getting into coding with a PhD in math

If this floats your boat, game development, be it graphics, AI, or just gameplay favors math stronger than most day-to-day coding jobs. And, as far as my experience goes, it makes much more use of formal computer science than most other programming jobs that do business software. And it's fun :) On ...
by Divinas
Mon Apr 23, 2012 6:51 pm UTC
Forum: Computer Science
Topic: RTS Balancing - Proven to be NP hard (or even solvable)?
Replies: 49
Views: 16510

Re: RTS Balancing - Proven to be NP hard (or even solvable)?

I'd just like to provide some real world perspective on the issue. This is something me and some colleagues (kinda) did, for a minigame. It was really much much simpler that sc2 and what other people are talking about, but it IS an RTS game: every player had a fixed pool of N units, at any given mom...
by Divinas
Thu Apr 19, 2012 9:52 am UTC
Forum: Coding
Topic: Constants
Replies: 9
Views: 2461

Re: Constants

A very simple code example, to show you why it's better to have a constant: InteractionDistance GetInteractionDistance(Target* t) { float distance = DistanceToTarget(self, t); if (distance < 5.f) return Close; else if (distance < 12.f) return Medium; else return FarAway; } Why the hell 5? Why 12? Wo...
by Divinas
Thu Apr 19, 2012 7:53 am UTC
Forum: Coding
Topic: Writing a Game Engine
Replies: 21
Views: 11424

Re: Writing a Game Engine

Actually, what Sc4Freak is saying, and I'm completely agreeing with him when talking about the renderer(unless I misunderstood him), is to have no logic inside the renderable components. You have an entity, which gives you a world position. It has a visual component, as it is customary to call those...
by Divinas
Wed Apr 18, 2012 8:37 am UTC
Forum: Coding
Topic: Writing a Game Engine
Replies: 21
Views: 11424

Re: Writing a Game Engine

You know best, I'm still advocating to try to do something specific with your engine, instead of just abstract code that does nothing. Commercial engines have tens or even hundreds of thousands of man hours of work put in them, you're obviously not making something like that, but still, if you want ...
by Divinas
Tue Apr 17, 2012 10:27 pm UTC
Forum: Coding
Topic: Writing a Game Engine
Replies: 21
Views: 11424

Re: Writing a Game Engine

Oh, and I forgot one thing that I was going to say earlier: Making a game engine on its own is actually not such a good idea. Game engines exist for only one purpose: to make games work. Constructing a game engine in a vacuum just plain doesn't work. You end up with a giant mess of very abstract, g...
by Divinas
Tue Apr 17, 2012 3:33 pm UTC
Forum: Coding
Topic: Writing a Game Engine
Replies: 21
Views: 11424

Re: Writing a Game Engine

Well, separate render targets don't mean that your renderer shouldn't be a singleton somewhere. You most probably already render to multiple render targets either way.

p.s. Small correction, i thought that the upper post was by the OP.
by Divinas
Tue Apr 17, 2012 12:08 pm UTC
Forum: Coding
Topic: Writing a Game Engine
Replies: 21
Views: 11424

Re: Writing a Game Engine

It should definitely be entity/component based. But... make sure you know what exactly that means. Most stuff that is renderable on the screen should be an entity - be it a particle system, ordinary mesh, some procedural generated thing. But your UI is most probably not one of those. Your renderer i...
by Divinas
Tue Apr 10, 2012 11:20 am UTC
Forum: Coding
Topic: Writing a Game Engine
Replies: 21
Views: 11424

Re: Writing a Game Engine

Some non-coding general advice: Make some kind of schedule: which features you want when. Do things incrementally: as in, get something working that renders something on screen as fast as possible, and start extending it. Have a specific game in mind when you design your engine. Most modern engines ...
by Divinas
Thu Apr 05, 2012 9:19 am UTC
Forum: Coding
Topic: Smart Pointers
Replies: 26
Views: 6101

Re: Smart Pointers

Well, If you use owning pointers everywhere, you run into different bugs - A owns B, B owns A, and you've got in the very best a memory leak, at the worst case some other resource acquired through RAII being stuck and non-released. One should know the smart pointers, use whatever is appropriate.
by Divinas
Thu Apr 05, 2012 8:48 am UTC
Forum: Coding
Topic: Smart Pointers
Replies: 26
Views: 6101

Re: Smart Pointers

I disagree. In a single threaded application ,what Sc4Freak is saying is reasonable. But in a multithreaded one, that is not required to be so. If we have a structure A owns B, B keeps a raw ptr to A, if you use the raw pointer while A is being destroyed , the pointer is invalid. If you used a smart...
by Divinas
Wed Apr 04, 2012 12:21 pm UTC
Forum: Coding
Topic: Smart Pointers
Replies: 26
Views: 6101

Re: Smart Pointers

Agreed. Use smart pointers as much as possible. BUT, be sure to understand the semantics of the smart pointers that you are using, what kind of problems they have, and how you can avoid getting into those pitfalls (most notably, cyclic references)
by Divinas
Wed Apr 04, 2012 10:11 am UTC
Forum: Coding
Topic: PHP Email
Replies: 7
Views: 2775

Re: PHP Email

Javascript validation never should be used for security: it can be turned off by a malicious user, or one could post the forged data directly to your php script. You should only use it as a convenience(because it is fast) for your regular users.
by Divinas
Tue Apr 03, 2012 12:01 pm UTC
Forum: Coding
Topic: On the Implementation of Entity-Component Systems
Replies: 32
Views: 21087

Re: On the Implementation of Entity-Component Systems

Yes, they do, but all that I know of have a little (or in some cases, a lot) of logic inside the components themselves. I don't think I've seen an engine, where components lack update procedures where they hold some logic. Having all logic updates in a manager that only polls and pushes state to the...
by Divinas
Fri Mar 30, 2012 1:47 pm UTC
Forum: Coding
Topic: On the Implementation of Entity-Component Systems
Replies: 32
Views: 21087

Re: On the Implementation of Entity-Component Systems

To be honest, I tend to disagree with the POD components idea. Although it sounds good on paper, I know of basically zero commercial engines that go that way for all components. For some, this is a great idea, and works marvelous. For some, it becomes a huge burden to support, and you start creating...
by Divinas
Fri Mar 09, 2012 8:22 am UTC
Forum: Coding
Topic: On the Implementation of Entity-Component Systems
Replies: 32
Views: 21087

Re: On the Implementation of Entity-Component Systems

Well, I didn't mean necessarily the code base of how they work - more like how they have organized their pipeline. How their components work, what components are there, how do they interact with each other - just running the editor and doing some really simple things with the data exposed things can...
by Divinas
Fri Mar 09, 2012 7:31 am UTC
Forum: Coding
Topic: On the Implementation of Entity-Component Systems
Replies: 32
Views: 21087

Re: On the Implementation of Entity-Component Systems

I would advise you to have a look at the free available engines out there - as of recently, quite a few adopted a 'free for educational purposes' policy - the Unreal Engine, CryEngine, If you have access to the Sony Games Development network - Phyre. Unity is also noteworthy. If you want to roll you...
by Divinas
Fri Mar 09, 2012 7:16 am UTC
Forum: Coding
Topic: On the Implementation of Entity-Component Systems
Replies: 32
Views: 21087

Re: On the Implementation of Entity-Component Systems

Although I agree on the general idea that Sc3Freak is advocating, and agree that the examples he gave are really good point, fact of the matter is that doing everything in this manner is rather counter productive. It really is a great idea for graphics and physics - that's why I said you should poll...
by Divinas
Thu Mar 08, 2012 9:35 am UTC
Forum: Coding
Topic: On the Implementation of Entity-Component Systems
Replies: 32
Views: 21087

Re: On the Implementation of Entity-Component Systems

It really depends on what you're trying to accomplish. A lot of the 'modern' engines go with the approach, that an entity is something located somewhere in the world, having coordinates and some basic generic info (for example, update frequency - some objects need to be updated much less often than ...
by Divinas
Thu Mar 08, 2012 8:49 am UTC
Forum: Coding
Topic: On the Implementation of Entity-Component Systems
Replies: 32
Views: 21087

Re: On the Implementation of Entity-Component Systems

Having the components completely unaware of each other is possible - through some kind of events system, but that usually creates (much) more problems than it solves. So while you should strive for as much independence as possible, don't try to do some stupid stuff just so that you can keep them ind...
by Divinas
Thu Sep 22, 2011 9:13 am UTC
Forum: Coding
Topic: Clever Code Puzzle
Replies: 17
Views: 2913

Re: Clever Code Puzzle

If for some reason you really want that to work reliably, put i and a in a struct as members, and you'll get the behavior you're looking for.
ps. Don't do that, really.
by Divinas
Mon Sep 19, 2011 8:12 am UTC
Forum: Coding
Topic: gcc from Visual Studio
Replies: 9
Views: 4051

Re: gcc from Visual Studio

There are a few ways for you to do this, the easiest being this: Do a makefile project, with a custom build step. Use a tool for converting a visual studio solution to a makefile - there are a few of those, one is this http://www.codeproject.com/KB/cross-platform/sln2mak.aspx Then, use make to build...
by Divinas
Mon Oct 04, 2010 8:50 am UTC
Forum: Mathematics
Topic: I join the blagosphere
Replies: 28
Views: 2925

Re: I join the blagosphere

It is insanely awesome. Keep up the good work, I sincerely hope you won't give up.
by Divinas
Thu Sep 30, 2010 5:47 pm UTC
Forum: Computer Science
Topic: voice output
Replies: 8
Views: 2093

Re: voice output

Have you seen this? It's not perfect, but it's WAY better than ms Sam :D
http://www2.research.att.com/~ttsweb/tts/demo.php
by Divinas
Tue Sep 28, 2010 9:34 am UTC
Forum: Mathematics
Topic: Trigonometry question
Replies: 9
Views: 1261

Re: Trigonometry question

There's also a really easy way to remember them: write down a table, with 0, 30, 45, 60, 90 degrees, underneath it 0, 1, 2, 3, 4 for sine and 4, 3 2 1 0 for cosine; Take the sqaure root of every number, and divide by 2. Voila. It goes like this: 0 30 45 60 90 sin 0 \frac{1}{2} \frac{\sqrt{2}}{2} \fr...
by Divinas
Fri Sep 24, 2010 3:11 pm UTC
Forum: Computer Science
Topic: Programming / IT / CS Certifications.
Replies: 9
Views: 4341

Re: Programming / IT / CS Certifications.

I am unsure where you are from, so I'm quite sure your mileage may vary, but certifications and job experience isn't the only thing that employers look for. A lot of companies look for past projects, no matter if they were for profit or for fun. I would recommend building a portfolio of personal pro...
by Divinas
Mon Aug 02, 2010 7:26 pm UTC
Forum: General
Topic: How do we know you have a face unless you post it?
Replies: 20910
Views: 3072518

Re: Postify your facerity

@TaintedDeity
Why would that stop me from being a fireman? :)
And, thanks :)
by Divinas
Mon Aug 02, 2010 7:01 pm UTC
Forum: General
Topic: How do we know you have a face unless you post it?
Replies: 20910
Views: 3072518

Re: Postify your facerity

I usually read more, and post little, but all the cool kids are doing it, so here are some of mine. Also, why is everyone in the thread so hot and awesome? Really guys, you rock, it would be kinda creepy I think to address people personally, as I don't really know you, but you're all awesome! Rock b...
by Divinas
Tue Jun 29, 2010 12:18 pm UTC
Forum: Coding
Topic: Regex in java
Replies: 3
Views: 663

Re: Regex in java

\ is an escape symbol, you need to double escape it so it is interpreted as part of a string.
by Divinas
Tue Jun 29, 2010 8:15 am UTC
Forum: Coding
Topic: Using regex's in a natural language interface
Replies: 16
Views: 2460

Re: Using regex's in a natural language interface

I don't think you need separate return/borrow interfaces, unless there are some specific requirements. If your user interaction goes like this: ClientID -> BookId [, BookId...], and if one client can borrow only one copy of the same book, than the operation is implied by the client. If he already ha...

Go to advanced search