Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 12 Oct 2004
Online Last Active Today, 04:36 AM

#5268702 Random Circles in a Circle

Posted by on 01 January 2016 - 06:56 AM

It's not clear to me what you're trying to do, could you elaborate on what problem you're trying to solve?

#5267034 Creating own 2D game engine from scratch - howto

Posted by on 19 December 2015 - 09:53 AM

If you really want to make a 2d game engine from scratch you should check out handmadehero.org. Sorry can't link on mobile.

#5267018 What about 3d development can be simplified to make it more practical?

Posted by on 19 December 2015 - 05:19 AM

Other things you can do is making your game less content heavy through smart reuse (simple colors and the likes) or by designing you game around it, e.g. by making it a multiplayer game.

#5266883 C++ Webpage inside a program

Posted by on 18 December 2015 - 06:07 AM

Awesomium comes to mind.

#5266632 Your development workflow

Posted by on 16 December 2015 - 04:51 AM

for(;;) { LurkeGameDev(); GoWithTheFlow(); }

For my personal game projects I work on different aspects whenever I have time and feel like it. I could be drawing concept art one day and the next day do some programming. Programming wise I have a good prioritization in my head of things that need to be done, but I don't have a strict process.

#5264854 Why didn't somebody tell me?

Posted by on 04 December 2015 - 05:30 AM

Shift clicking on an open program in your taskbar opens a new instance of that program, this works for file explorer, visual studio, firefox etc..

#5264689 handling data/state in a board game - composition/coupling

Posted by on 02 December 2015 - 08:36 PM

To me this looks like a case of trying to model your objects based on reality, which translates poorly to objects used in programming. Take your board class for example, in real life the board holds all the cards, squares, bank, money pot etc. While this makes sense in real life, it causes these weird relations in programming that are ineffective. Buying a deed, or any other action now requires you have knowledge of the board and bank classes, which is unnecessary and causes these tight couplings.


A very simple alternative I'd start out with:

struct GameData
    containers<Squares> board;
    container<Player> players;
    container<Deed> availableDeeds;
    int activePlayer;

void buyDeed(Player& player, container<Deed>& deeds, ID deedID)
    Deed* deed = deeds.find(deedID);
    if(deed && player.money >= deed->cost)
        player.money -= deed->cost;

Buying a deed now only has a notion of a player and available deeds, which is really all it needs. The board and bank classes no longer exist in this example, which doesn't mean you won't need them at all, but for now they're not necessary so I'd avoid designing them before you have a use case. My advice would be to focus on how your data will flow through your program; what data do I need and what do I spit out. Mike Action puts it this way: the transformation of data is the only purpose of any program. So instead of modelling the data first, write procedures that need that data and then decide upon a model that best fits that need.


As for your second question on where buyDeeds should go, there's no harm in having free functions if you feel like it doesn't belong to some class. If you have a group of functions that are related you can always put them in their own namespace.

#5264421 handling data/state in a board game - composition/coupling

Posted by on 01 December 2015 - 10:19 AM

(I am not sure what terminology to use in C++ for composition... ie. if A has a member B, how to describe their relationship? All the suitable words like parent, child, root, base, sub-object, they all seem to be used to imply inheritance, haha. I'll say B is a sub-object and A is the root object).

B is a component of A and A has a component B. A is composed out of B, C, etc.

#5263979 How Can Games Natively Port-Forward?

Posted by on 28 November 2015 - 12:19 PM

AFAIK there's no guaranteed way without an external matchmaking server, but most games on Steam use the same default port number so that you only have to forward once.

#5263619 Networking,make the hole game myselfe?

Posted by on 25 November 2015 - 01:57 PM

A single person can almost make any game given enough experience and time. With that said, don't expect your dream to be done anytime soon, it's going to take a lot of time and dedication to get there. Questions like whether you'll need a server or not are all pointless at this point in time, you need to be focusing on getting the experience to create games first. The beginner's forum is an excellent place to start.

#5263387 Article on Lockstep Multiplayer

Posted by on 24 November 2015 - 05:02 AM

Thanks for sharing! I've had my fair share of desync bugs and one thing I can attest to is logging everything and having ways to replay those logs. Otherwise it's so freaking hard to debug, especially if you allow for state rewinding and fast forwarding.

#5260287 How does this "pop_front()" implementation work?

Posted by on 03 November 2015 - 05:29 AM

The move assignment in C++ is basically like the copy assignment, the key difference being that the moved object is left in an "will not be used again" state. So when back is 'moved' to front, front has become the back object. The back object is still there, but it'll no longer be the owner of any allocated memory. So yeah the front element is overwritten with the back element, and the back element is popped. This is very efficient because you don't have to move a bunch of objects in memory now.


There is however one caveat, and I'm thinking this is the part you are struggling with: the order of elements in the vector was changed in the process. So while this is an efficient way of getting rid of the first, or any other element for that matter, it doesn't preserve order. So this is actually not a pop_front, but a swap and pop function.

#5258589 Looking for feedback on menu system design

Posted by on 22 October 2015 - 05:10 PM

Looking good, I like the animation and the background scenery. I think the glow around the text is a bit too big and that the yellow coloring on hover doesn't really fit. Maybe a sort of fiery effect instead? Also the sound on click sounds a bit muffled, maybe a combustion sound would fit well here. Hope that helps you in some way :).

#5258029 Why didn't somebody tell me?

Posted by on 19 October 2015 - 08:47 PM

I fail to see the problem with that. blink.png

That's the exact reaction you'd have once you stumble upon the typedef example posted above, the one plus one example was just to show that it's unintuitive.

#5250178 Entities interaction

Posted by on 01 September 2015 - 04:25 PM

For movement in my game, I allow for some rewind by the server, but actions only happen when they arrive at the server and when the server says it's okay. This prevents the scenario you described in your OP. It gets a little bit tricky with actions that affect movement, but that's manageable.

Wouldn't this create collision detection issues potentially? The player will shoot at the place where he sees the monster (up to 100ms back in time) and then will get the action executed when the monster is probably at a different location.

Yes, but you have to give in somewhere, everything is a trade-off. You need to design your game around these trade-offs. Is shooting in your ARPG really that precise? How often will that scenario present itself / do monsters move about erratically?