Moderators

140

13761

Moderators

111

14284

Moderators

97

10734

Moderators

65

8263

## Popular Content

Showing content with the highest reputation since 06/20/17 in all areas

1. 12 points

2. 7 points

## Water

So, I ended up doing the "skirts" method I spoke of in the last post. And in conjunction with the default Urho3D water shader (with a few small tweaks, and more to come to eliminate artifacts on the corners of the water blocks) it actually looks pretty decent. The water animates a noise texture that ripples the ground beneath. It also uses a reflection texture (which I have set to black at the moment) if desired. I might tweak the water shader further, but for now I'm happy with it. I've also got all the small issues sorted out from the change to multi-level water. It wasn't a large change, but I was surprised at how many different parts of the code worked from the assumption that water was determined by elevation < 9. I thought I had contained it better than that, but I did get all the various spellcasting, pathfinding and object spawning oddities worked out.
3. 7 points

## Do I really need a server to prevent cheating and ensure state consistency in simple games?

You're misunderstanding the nature of cheating - you can only do a client rollback if that client accepts that it needs to rollback (which a cheater's client typically will not), or if you know that it's cheating (which a cheater's client typically will not broadcast). The client is in the hands of the enemy and it can be tampered with or modified to do whatever the user wants. Expecting a client to self-correct cheating is like expecting prisoners to lock themselves in their cells. Practically, a game developer has 2 choices to prevent cheating: A central server maintains the authoritative state, and prevents cheating because all game state changes must be accepted by the server by definition. This is a typical client-server game. All players maintain an essentially identical state, and prevent cheating by ensuring that they all agree on what the state is, and reject players who disagree with the majority. This is sometimes called 'deterministic lockstep' or some variation. Your game type will not scale to the second solution, so you need the first.
4. 7 points

## How good is Urho3D ?

I find Urho3D to be fantastic. I'm using it to make my game, a turn-based, hex-based RPG hack and slash: It's a very solid engine, lots of support on various platforms and quite capable.
5. 7 points

6. 7 points

## A correct way of writing this?

A derived class can never renege on features provided by the base class; doing so is an violation of OO's LSP rule, so this approach is invalid. OO would force you to use composition instead of inheritance here. Make your own class from scratch which contains a vector within the private implementation details.
7. 7 points

8. 7 points

## When To Use Pointers?

I saw this image days ago, I liked how didactic it is:
9. 6 points

10. 6 points

## C vs C++, Objected Oriented Programming vs Data Oriented Programming

In terms of getting into the traditional industry, you need to be comfortable with object-oriented programming in C++. There's no serious debate there. The major engines are object-oriented, most in-house engines are object-oriented. There's a whole continuum of just how much inheritance you might see, but on the whole you are not likely to run into C-style data-first engines. This does not mean that you have to make a binary choice. You will need to be comfortable with object oriented programming but a good knowledge of data-oriented programming can help you if you want to optimise very low-level things, or if you end up working for a company that favours that sort of approach. A lot of data-oriented design is typically based around the reductionist view that programs are essentially just processes that transform data, and therefore you should just structure the functionality around the data, both to better represent the process and to help the computer perform this process more quickly. This view holds very true for certain low-level operations that operate on batches of similar objects, such as rendering or physics, but is barely workable for many high-level operations, such as AI or game logic. An effective engine will therefore often feature a bit of both; heavily data-oriented code at the low level for maximum performance, and heavily object-oriented code at the high level for maximum expressiveness. There's no need to throw out object-orientation entirely just because it may not be best route to top performance for certain tasks. That was 18 years ago. Probably 20 years if you are counting when development started! Ignore this particular part of your research.
11. 6 points

## New Gameplay Video

I'm on vacation in California, which means I kinda have some time to work on stuff, but it's split up by blocks of frantic activity. I'll tweak a few things, then head off to Knott's Berry Farm to burn in the sun while the kids ride on rides too small for me. Then I'll fiddle a few more things, then take the kids swimming. So while I'm getting some stuff done, it's all in a sort of disorganized tangle. I did decide to upload a new gameplay video. Once again, it's pretty poor quality. (Some day, I'll own a rig decent enough to make high-quality videos. But that day is not today.) It's about 10 minutes of random gameplay. I was kinda distracted while playing by a 5 year old who wanted my help building electronic circuits with a snap kit toy he recently got, so there are some pauses. Also, there is still stuttering in some spots, which won't be cured until I fully convert everything from Lua to C++. (That's an ongoing project, but I am getting quite a bit of progress done while here in Cali.) The stuttering is from the Lua garbage collector, which has been an ongoing problem with the Lua bindings to Urho3D. Throughout development of this game it has been at time worse and at times better. A recent change (unsure which one) made it worse again, enough that I'm finally going to just convert everything except UI stuff to C++ components.
12. 6 points

13. 6 points

## Stop hacking

One thing you can do is try to run as much of the game logic as you can on the server side. You can't really trust the data clients give to the server, since they can mess with that data, then pass it to the server. Examples might be telling the server where they are (even if they are not really at that location), or how much health they have left, etc.
14. 6 points

## drawing sprites

What it looks like you're trying to do is draw the first sprite, and then "wait" (is this why you were asking about Sleep()?) and then draw the second. This won't work. The "wait" call you are attempting to make here will just halt everything for the duration of the call, giving the program the appearance of freezing for a second or however long you are waiting. The correct way to handle this kind of thing is, unfortunately, more complicated. What you can do is keep track of how much time has elapsed between the last time you called drawScene() and this current call to drawScene(). There are various ways to do this, using various platform-specific or platform-agnostic timing APIs that can give you the "current time" in some fashion. std::chrono::high_resolution_clock is probably a reasonable place for you to look at (specifically, the now() function). void drawScene() { auto timeStampNow = std::chrono::high_resolution_clock::now(); auto elapsed = timeStampNow - timeStampPrevious; // ... timeStampPrevious = timeStampNow; } Here, you get the current time, subtract it from the previous time (which you are storing elsewhere, in a member variable perhaps) and compute the elapsed time since the last call. At the end of the function, you set the "previous time" to the current time, so it's correctly set up for the next time drawScene() is called. Once you have this elapsed time, you can use it to "count down" until the next time you are supposed to do something. If you have another member variable that is, say, "timeUntilSecondSprite" initially set to some value corresponding to how many seconds until the next sprite show up, you might do timeUntilSecondSprite -= elapsed; if (timeUntilSecondSprite <= 0.0f) { // Counter has run out, draw the sprite now. } You can implement as many time-based effects as you want with this approach, optionally resetting the counters when they hit zero if you want them to occur (for example) every N seconds.
15. 6 points

## Grid-based game: Serialising position

If the scripts performing movement are purely cosmetic, then their state doesn't need to be saved to disk. If I'm playing a chess game and the rook is moving from A1 to A8 and I quit while it's animating somewhere between A4 and A5, I expect to reload and either see it at A1 where it's still my turn, or A8 where it's the opponent's turn. (I'd prefer the latter.) The underlying game state is one or the other - the animation state, where the piece is moving from the old position to the new, is purely visual and doesn't need to be saved anywhere. If you do have long-running actions that need to persist - e.g. it's an RTS game and you commanded a unit to walk across the map - then usually the command is attached to the unit that is executing it, and that would be saved out along with all other in-game state (which would reflect the visual position, as that is a valid game state, unlike in the chess example). The main thing here is to have a clear idea of what is actual game state that absolutely has to persist across sessions, and what is just a visual representation that can be recreated from the game state and which doesn't need saving at all.
16. 6 points

17. 5 points

## Just published my first game. Any advice?

You can definitely improve the background image and main menu. When I clicked your link I initially thought it was a popup ad and instinctively added it to my adblock blacklist before I realised it was the game. Other than that, I would be interested in playing this game with the player speed slowed way down, such that you actually can make decisions for both snakes within 2-3 frames of time. As it stands now, the strategy is to make the top one a bit longer, then put it on autopilot and focus all of your attention on the other one, etc. My idea would be Slow down snek speed so you can focus on both Remove wrap around feature so you have to focus on both (add borders)
18. 5 points

## Storing hashes as game states

Hashes, Databases, Sockets, States... These are all *completely unrelated things*. I'm worried that you're misusing terminology. Can you clarify your question by describing what you think those terms mean so that we don't misunderstand what you're trying to ask? Hashes are a lossy conversion of data. You can't get the original data back. So, no, you should not use them to store game states. You can use them to quickly FIND game states, but you should not use a hash for the state itself.
19. 5 points

## Multi-level Water

So, I'm trying to figure out how to do water. Right now, I am doing water the "brain dead" way; any tile below a certain height is water, and water is created as a simple hexagonal plane with a partially transparent blue material applied. It works okay, but the ultimate end goal is to have water play a more involved role in the landscape. I'd like to have rivers, waterfalls, etc... and that means that I need to rethink how I do it. I'm trying to come up with ideas for the geometry of water. Here is a shot of how the current water system might look if I use it unmodified for multi-level water: Clearly, I need some sort of geometry to tie the pieces together. My first thought is to create a sort of "skirt" piece that is attached to the side of a water hex if that water hex has neighbors whose water height is lower than its own. Might end up looking something like this: The issue with that, of course, is that I have to oversize the skirts to avoid Z-fighting with the underlying ground hex, and that means that skirt pieces overlap with adjacent skirt pieces on different hexes and with the water hex of the lower water levels. In combination with the alpha-blending, this creates bands or regions of darker color where two pieces of water blend together. I could use waterfall particle systems to help obscure this overlap, I think. Alternatively, I could use a solid material instead of a partially transparent one: I dont like the look of it, though. Large areas of flat water look terrible. Granted, there will need to be improvements to the actual water material to make it look better regardless of how I handle the geometry, but for now I'm sorta stuck on how best to do this. I do have some ideas as to how I could perform the geometry stitching of the skirts to minimize overlap, but it'll take the creation of special pieces, and some special-case code. Not too difficult, I suppose, but still seems kinda messy.
20. 5 points

## Problem with enum and binary or operator

All variables are just bits in memory, so using it as whatever is totally valid, because they're just stupid bits. That's a weak argument. An enumeration has by definition a restricted range of values, the compiler checks for this and makes sure you don't write buggy code by going outside of this range, which is what you were trying to do. Since you are working with flags, it makes no sense to use an enumeration type. What you want is an unsigned type and some constants. I'd simply do the following: enum { fpl_InitFlag_None = 0, fpl_InitFlag_Window = 1 << 0, fpl_InitFlag_VideoOpenGL = 1 << 1, }; typedef unsigned int fpl_InitFlag; It's clear from the naming that these are flags and there's also a hint to the user that he should use the constants starting with fpl_InitFlag_.
21. 5 points

## C vs C++, Objected Oriented Programming vs Data Oriented Programming

Ooh good timing for this thread - Albrecht just posted some new slides! The original 2009 talk (still relevant!): http://harmful.cat-v.org/software/OO_programming/_pdf/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf And the 2017 version: https://docs.google.com/presentation/d/1ST3mZgxmxqlpCFkdDhtgw116MQdCr2Fax2yjd8Az6zM/edit#slide=id.g2398a4e2af_0_118 https://docs.google.com/presentation/d/1305-i5JZ98cLqXgVwzTyB1NQUjjBJ0_0diwU2diS_TI/edit#slide=id.p tl;dr:
22. 5 points

23. 5 points

## Which approach would be best for checking if an inventory is full in Python?

Since the items are referred to by their tag, then it would be easier to use an associative array, such as dict or collections.OrderedDict. Then, checking if the inventory is full is only a matter of checking the number of tags it has: items = dict() def is_full(self): return len(self.items) >= 8 You are correct in that it is misleading to add an item and not actually have an item added. This is why it is important to signal if an action succeeded and (optionally) provide other ways to determine if an action will succeed. For example: class Inventory: max_inventory_size = 8 def __init__(self): self.items = dict() @property def full(self): return len(self.items) >= self.max_inventory_size def can_accept(self, item): return item.tag in self.items or not self.full def try_add_item(self, item): if not self.can_accept(item): return False self.add_item(item) return True def add_item(self, item): target = self.items.get(item.tag, None) if target is not None: target.quantity += item.quantity else: assert not self.full, "Inventory full" self.items[item.tag] = item # and then: (1) # expect this action to succeed, otherwise crash hard inv.add_item(item) # or: (2) # lazily attempt action, not caring if it fails if inv.try_add_item(item): world.remove(item) # or: (3) # don’t attempt action, but do check if it is possible for shop_entry in shop_menu: if not inv.can_accept(shop_entry.item): shop_entry.enabled = False
24. 5 points

## Grown out of playing games

I've long grown out of playing games. Coding games and tools is a different thing all together, I remain fully interested and stuck with coding mobile games and wouldn't choose a different hobby/career (well apart from the fact that I long to improve my coding skills, and my maths and physics knowledge) But playing games, these days (unlike over a decade ago) genuinely bores me to death. I guess I always feel I am coding for the younger generation, similar to enjoying making toys for kids but not enjoying playing with the toys yourself I'm coding mobile games at the moment and I look at and play some few just for gameplay analysis and checking current standards and features but not because I enjoy playing them I know this certainly makes me an odd-ball here, but just wondering how far an odd-ball I am. Is there a few... maybe just one more person like me here OR just me? (if the latter then I have to make sadder clown face )
25. 5 points

26. 5 points

## Black Desert Online/ Skyrim style Character Creation

In my experience, these kinds of systems are done by a shitload of art creation, plus some simple morph target tech. Artists also paint which vertices belong to which 'group', so that different parts can be blended differently.
27. 5 points

## Why do we split shaders into passes?

The Gaussian blur is separable, meaning it can be done in one direction, then the other and have the same result as if you did a kernel with all surrounding points included. In other words, for a 3x3 blur, you can do an X pass with 3 taps (the middle sample and one on either side) and a Y pass with 3 taps (the middle sample and one above and below) for a total of 6 taps. If you did it in one pass, you would need to sample all nine points, i.e. the center point, the left and right, the above and below, and all four corners - those are values you get for "free" when you break it up into two passes. For a small blur width like the above example, it might be faster to use one pass, but for larger kernels, you can see that the number of samples in the single pass start to add up. For a 7x7 kernel, you would need 49 taps total for a single pass, but only 14 if you break it into separate passes.
28. 5 points

## Your Indie Game Will Flop and You Will Lose Money

Long-time GameDev.net member and indie developer @cliffski32 of Positech Games has posted in his latest blog a very direct message to aspiring indie developers: you will flop and lose money. While not the message most aspiring developers want to hear, @cliffski32 discusses the challenges for an indie from a financial perspective with all the costs and revenue losses that developers incur when you factor in staff, legal, and investors. Using data from player unknown: battlegrounds as an example of the high end and assessing the mean game in 348 pages of "Top Sellers" of Indie games on Steam, @cliffski32 makes the point that game development is a tough business. Read the full blog post at http://positech.co.uk/cliffsblog/2017/06/23/your-indie-game-will-flop-and-you-will-lose-money/.
29. 5 points

## Horizon:zero Dawn Cloud System

Hello again, I'm going to be presenting a 40 Minute Talk at SIGGRAPH 2017 as part of the Advances course again. I am going to cover the noise generation and weather system as well as our authoring approach and some other updates. If it is allowed, I will share the Houdini tool that I made to generate our noise with the public. This way you can also experiment with other configurations. Hope you can make it or review the slides when the come out. Andrew PS this is awesome!!!
30. 5 points

## New Software and Server for GameDev.net

I am stunned. How are the heck are people saying that the upgrade has been good? - Old articles are broken. The value of gamedev.net tumbles. So now I need to set up an activity list? I'd rather the older option where the forum topics are bumped up upon a post. The live feed was what I'd consider a majorly interesting part of the site. Over the past several updates gamedev.net has been getting more and more bloated. Design has also taken a turn for the worse. For example, when I'm reading a forum post I don't have a need to see Game Job's or Ads at the right side of the post. It makes information harder and harder to read and to find. Color contrast looks really bad imo, light grays and whites.
31. 5 points

32. 4 points

## Getting a job as an AI programmer for games

The main thing I'd suggest keeping in mind is that you might be artificially limiting your options by trying to find an entry-level job which also is a dedicated AI role. Entry level is hard enough to break into as it is, and AI is a specialization that typically involves some baseline experience in making games. Your best bet (IMO) is to get a good title or two shipped first as a gameplay programmer, and pick up the AI as you go. Once you have the basics of shipping code under your belt, you can start looking into the specialization. You should ideally be conversant in all of the following: Decision making systems (scripting, utility-theory, behavior trees and similar architectures, planning, state-search, machine learning [ugh], and so on) Path planning algorithms and data structures Perception modeling (sight, sound, etc.) Animation techniques at least at a high level (know what a blend tree does, how to play animations, etc.) I'm sure there are more things. Pick up a good game AI text and you should at least be comfortable talking about every subject in there. Hopefully that explains why entry level and AI specialization is a hard combo :-)
33. 4 points

## Lighting Series

Hi, community. I am writing a series of articles about Lighting related with real-time computer graphics. The purpose is to get information from a lot of great resources like computer graphics books, blogs, and forums, and try to explain them as easy and clear as I can. I am going to update the list periodically. Lighting Series The first post in the list is the following Lighting Series Part 1 - Light and Radiometry Update (2017.07.05) Lighting Series Part 2 - Radiant Energy and Radiant Power Update (2017.07.16) Lighting Series Part 3 - Radiance All suggestions for improvements, corrections, and new topics, are very welcome because in this way I am going to learn a lot and, and why not, maybe this helps anybody with the same doubts than me. Hope you find this useful!
34. 4 points

## What is expected from a scripting language?

Inheritance is hardly important as a linguistic construct. The Epoch language for example has no notion of inheritance, and deliberately so. If you can do composition and polymorphism, you can eliminate inheritance as a feature entirely. I don't know the specifics of your language implementation, obviously, but I'd venture to guess that getting those two things working is either already done or easy to do.
35. 4 points

## Doors, Dungeons, MakeHuman, Bug Fixing

It's been a little bit of an art push lately. First of all, I started work on a dungeon tile set. Up there is my first stab at it. I created a couple different wall variations, a door and a hex-pattern tile ground texture (used in conjunction with existing sand and gravel textures). Don't have anything in the way of doodads or decorations yet. Doors are still kinda tricky. I had a conversation with riuthamus about it. The gist of doors in this game is that a door needs to work with any configuration of walls around it, so trying to do artwork for a traditional-looking door and choosing alternates to match up with the surrounding walls was getting to be too difficult. I had already implemented doors some time ago that utilize portcullis-like behavior: when you open the door, it slides into the ground. Closing it brings it back up again. The door in the above shot works the same. The issue lies in creating a graphic that looks door-like, even though it doesn't look like a traditional door. I'm not sure there's a perfect solution for it. But at least when you hover over a door, a popup appears with the label 'Door'. Hopefully that's enough of a clue for people to figure it out. I've also started experimenting with MakeHuman. The ogre in this shot is a result of that experiment: It was a quick effort. I just used some of the clothes provided with MakeHuman (hence the jeans and button-up shirt, articles of clothing that would be quite difficult to obtain in the Goblinson Crusoe universe) and ran some of the various sliders for the mesh deformation all the way to 11 to try to get an ogre-ish form. The experiment worked pretty well, I think, certainly well enough to warrant further experimentation. As a bonus, MH will export a skeleton rig to fit the mesh, though I still have to rig it with IK and animate. As it turns out, I'm still terrible at animating. Who knew? I spent some more time doing miscellaneous cleanup. Fixed a bug that caused creatures to die multiple times if they died in a round with multiple dots on them. (They would die once for each dot because I wasn't checking for isdead in between dot applications.) Formalized the construction of summoning spells, so that a flashy spell effect is played when things are summoned. Added some flashy effects for things dying. Moved and rearranged some data tables again. You know, crazy shit like that.
36. 4 points

## What should I expect as a one-person hobbyist game developer?

Yes, it's realistic. If your plan is to just make games right now, you should use Unity or Unreal or any other existing technology. These will help you achieve your goal of making games and will simplify things so that you can just focus on your game logic. Of course you can always start from scratch if you want to know how things behind it work, but it's not recommended for a beginner as it can be frustrating and can burn you out.
37. 4 points

38. 4 points

39. 4 points

## I gave a talk on VR Design secrets

I gave this talk yesterday evening at a VR meetup in Bellevue, Washington. It starts at about 3:00 min and runs for about 50 minutes. I've also included my powerpoint slide deck in case anyone is interested in downloading it and following along. Virtual_Reality_Design_Secrets.pptx
40. 4 points

## What is an expression?

'What' qualifies as an expression vs a statement actually varies across different languages. In some languages the distinction is that expressions evaluate to a value while statements do not. In some languages expressions are just a certain type of statement which happen to return values. In some languages everything is an expression because everything has some kind of a value. For what it's worth you can go a long, long way without ever needing to know the difference between statements and expressions. This is not something most programmers need to think about day-to-day. It's more a concern for compiler authors and language designers and not really something programmers are required to know in order to actually 'use' the language. You mentioned C# though so the rest of my answer is more towards the C# way of thinking... An expression is one or more 'operands' strung together with 'operators'. Operands include things like literal values, variables and function calls and operators are things like +, -, /, *, &&, ||, etc. An expression can consequently be evaluated to a value. E.g. 1 + x * y - func(10) Meanwhile a statement is like an "action" or "instruction" to the computer. E.g. "Declare a variable", "Call this function", "compare this value", "loop over an array", etc. Statements include things like declaring a variable, control-flow statements (if/for/do/while/return/continue/break/etc), declarations of types and methods, etc. Statements as a whole are very often constructed out of expressions. Such as when you declare a variable and initialize it with the value of some expression all one one line: int x = 10 + 2;
41. 4 points

42. 4 points

## Stop hacking

It is absolutely true that exploits will always exist in some form. What is also true, and moderately less depressing, is that you can invest a bounded amount of effort to make the vast majority of exploits not worth it. In other words, you can ignore some exploits that just aren't a big deal, in exchange for defending against the ones that are a big deal. This is important from a cost/benefit perspective. If you get hung up on blocking every possible exploit, you'll exhaust your resources (and yourself) sooner or later. But if you let some things slide so you can focus on the important hacks, you can spare yourself a lot of work and preserve some sanity.
43. 4 points

44. 4 points

## A correct way of writing this?

Extending a standard library container class is almost always the wrong approach. There are very few things in the standard library designed for extension, and those are clearly indicated. It is possible to extend some of them, but it usually comes with unexpected ramifications. Your desire to mix smart pointers and raw pointers, as well as trying to describe what can be copied all reek of a common problem. Controlling the lifetime of objects is a critical aspect of software, especially true in games. What you describe sounds like a symptom of not understanding what code owns the lifetime. What is the REAL problem you are trying to solve here? You came up with a solution of trying to do complex things with a vector, but what problem drove you to that solution?
45. 4 points

## Why are licensed game engines being used more frequently?

Game developers use licensed engines for the same reason I use a web browser made by someone else. It's faster and easier if someone else has already done the work. In theory I could code up a functional web browser and it might even work better for me in some ways but why waste that time?
46. 4 points

## UE4 Blueprint & C++ Cheat Sheets

Reddit user Wafflyn made useful Blueprint and C++ cheatsheets for anyone using UE4. From the post: UE4 Blueprint Cheat Sheet: http://uecasts.com/resources/unreal-engine-blueprint-cheat-sheet UE4 C++ Cheat Sheet: http://uecasts.com/resources/unreal-engine-c-plus-plus-cheat-sheet
47. 4 points

## Database Structure for MMO's

It's totally normal, if you consider a character as being an entity with a well-defined set of skills. If you believe that skills are separate entities unto themselves, and they come and go (rather than the character just raising/lowering/enabling/disabling them) then, yes, you need a separate table to join characters to skills. I would recommend that you do NOT go for flexibility right now, because making just your first game is going to be hard work enough -- you're not going to have lots of time to try many different things, at least not to the point where you will put them into the database. That being said, if you really believe this is an area of quick iteration, then just slam 'em all into a single JSON blob and call it good! Separately, I would advise NOT to use an ORM. Ever. For any application. Objects in RAM behave differently from rows in a database, and the impedance mis-match that happens when you try to join them, ends up killing projects. And, what's most insidious, is that this kind of death only happens towards the end of the project, where scale makes itself known. Projects that manage to pull out of this, typically re-code their ORM integration in raw SQL, and exactly how painful that is, depends on how heavily they relied on the ORM "magic" before then. http://blogs.tedneward.com/post/the-vietnam-of-computer-science/ https://blog.codinghorror.com/object-relational-mapping-is-the-vietnam-of-computer-science/ http://seldo.com/weblog/2011/08/11/orm_is_an_antipattern Programming with relations in memory is actually, in general, a better model than programming in "rich" objects, anyway -- this is the learning from the "data oriented design" movement that's basically taking over high-performance gamedev in the last 15 years or so.
48. 4 points

## Yet another SDL question (or maybe it's not)

Your constructor is wrong, and you are using uninitialized data. When you draw, you're copying the uninitialized values from the member into the rect, and then you attempt to draw. x = x will assign the value of argument x to itself -- it will do nothing. To refer to the member's x value, you need to write "this->x". This is because when you just write "x", there's no way for the compiler to guess which "x" you want to refer to. Because of this, it will always pick the values passed into the function. Thus, you need to write "this->x = x;" -- and similar for the other lines. In case you're wondering, all class and struct instances have a "this" pointer, which is what we're using to solve this problem. Another solution would be to rename the argument values to something else. Either will work, but it's important to understand why the current code is broken.
49. 4 points

## Using Exceptions

Ellipses catch is very useful when you want to do some cleanup and rethrow.
50. 4 points

## A composer looking for projects (horror, rpg ect.)

Hello! My name is Mika Pilke and I've been a hobbyist musician and music writer for about 20 years. For now I haven't been too active looking for projects that need sounds or music, but I'd like to change that. I've also been active gamer for 25 years, and it has been sort of a dream of creating them too. And since I like creating different atmospheres, it would seem quite logical move to offer my skills for someone who is developing them. Though of course I'm willing to do music for a lot more than for games only, if needed. I do have to mention that I'm not a rock-hard pro, but I am very serious with my stuff. Two years ago there was one project for what I did 30 songs/ambiences, but game never actually was finished. Does not really matter though, since it was a fun journey and did give some important experience nevertheless. I'm not sure of the total amount of songs I've done, but it is far over 100. As an artist I am quite versatile. I do have tendencies of creating a bit darker atmospheres, but really, feel free to ask anything or offer any kinds of projects! I might have something up in my sleeve. For now I have been mixing and mastering my work alone, but for commercial projects I do have some contacts I can use to master and enhance my creations to top quality (two ambient songs listed below are mastered a bit too quiet, since I lacked some tools for mastering back in the past). Right now I do have a full time job, so if you need 20 song in two weeks, I probably won't be able to do them all for you. But if you give me a month or (rather) few months, it definitely shouldn't be a problem. :) Anyway, here's some of my recent work. Everything you hear or see is my work (photos, 3D-modeling, animation, shooting, music, mixing, singing, editing ect.). Everything except artwork in the video of the song Hellbreaker in which Jaime Jasso has been creator of all the visual art. Dreamland Synthesis - Awaiting This song was made to serve as menu music or such (horror ect.). Dreamland Synthesis - Morbid Tomorrow Darkish ambient. Dreamland Synthesis - Nebula Core This one would maybe be suitable for some dark scifi-styled horror game. Dreamland Synthesis - Hellbreaker I think when I wrote this song I was imagining some sort of moment being chased. Dreamland Synthesis - In Peace With this one, my goal was to do a song that would fit to a RPG or JRPG. Village music? Dead Cold Ground - Towards Eternity This was my project at the beginning of this year. It kind of got out of the hand, and took almost a month to finish. :) Working alone takes it's toll.

1. 1
2. 2
3. 3
frob
29
4. 4
5. 5
• ### Member Statistics

• Total Members
235594
• Most Online
4004