|
541
|
Player / General / Re: Things that Suck
|
on: July 31, 2012, 04:21:33 AM
|
So you didn't create a unique swap partition? Is that even possible?
No I didn't, I chose the partition with all my data on it  I've become a linux expert the last 3 days with all the stuff I had to do though 
|
|
|
|
|
542
|
Player / General / Re: Things that Suck
|
on: July 29, 2012, 03:11:33 PM
|
|
To revert the swap back to a regular partition it has to be formated if I understand correctly. And then all the data will truely be gone. Edit: Maybe it wasn't clear, but I selected the data partition as the swap drive for ubuntu.
|
|
|
|
|
543
|
Player / General / Re: Things that Suck
|
on: July 29, 2012, 12:19:43 PM
|
I have erased my entire data partition, which contained EVERYTHING except windows, when I installed ubuntu last night. I thought the swap partition worked like the windows pagefile, where it's just a single file that's preserved for memory. But the entire partition was wiped  I have been working to get the data back the entire day, made a .dd image that refused to open. And the other partition recovery software that I use hangs halfway. I can actually see all the data, but can't get it. Ubuntu is pretty great though.
|
|
|
|
|
544
|
Community / DevLogs / Re: Welcome to Bunny Land
|
on: July 27, 2012, 01:14:11 PM
|
I am also creating a "runner" game, and I find this a very interesting approach. Looking forward to see how this turns out 
|
|
|
|
|
546
|
Developer / Technical / Re: Things I don't understand: Entity Systems, Data-Oriented Design, and the like
|
on: July 22, 2012, 10:23:30 AM
|
Okay, I'm starting to understand. Let me try a more complex example and attempt to rework it with entity/DOD stuff. I'll use the actual game I'm currently working on, a baking sim game. Every day, the player must select some goods for the bakers to bake, and the bakers will go off and make them on their own. The flow of action goes something like this:
1) Player selects a bunch of goods from a list so they can be baked. 2) A representation of each good picked in step one is created. If the player had a good selected multiple times, that good will need to be created multiple times. 3) The bakers bake the goods, changing the taste and presentation values of each item. 4.) Some goods can be split into smaller items. A batch of 12 cookies can be sold either as the dozen together in a box, or you can split it up so each cookie is sold individually. If the player chooses to split an item, those goods will need to be copied so each individual part of the batch can be sold separately. 5.) Customers then buy the goods based on the good's popularity and presentation, and for the purposes of the game immediately eat them. They then decide whether or not they like what they just ate, and their like or dislike affects the popularity of that type of good. (If someone likes your chocolate chip cookie, they'll tell their friends how good it was, and they'll be more likely to buy a chocoloate chip cookie from you.)
Here's how I had the code to make it happen using OOP: 1) Make a baked_goods class with a bunch of different variables attached, like price, popularity, and so on. Then have a bunch of baked_goods objects with each variable adjusted as needed. 2) When the player selects the goods, I use the objects I coded in step 1 as templates and copy them into new objects. (This actually takes a decent amount of time for every object to be created, and it's kinda awkward to have the game slowdown for something like this. This is what got me interested in DOD to start with.) 3) Once all goods are created, have the bakers go through and do their thing. Each good in the list is altered one by one, until all of them have been completed. Each good has a series of steps that needs to be done, like prep, mixing, and baking, so the bakers do each step in turn. 4) Goods that need to be split into 'smaller' items, like the individual cookies, are split now using the same basic copying code I mentioned above. 5) Customers go through one by one and buy the first thing they like, and then eat it. Then they judge kinda at random if they like the good or not. Then based on how they liked it, I give either a bonus or a penalty to the popularity of the kind of good they just ate by changing the popularity variable in the template object, so that all future objects take the change with them.
Here's what I think I need to change to make it more DOD-friendly: 1) Remove the baked_goods class and have the objects exist as template lists on their own to be called as necessary. 2) Create a set of components to be used by each good, like a popularityComponent that can implement adjusting popularity for each good. 3) When adding the good to the list of things to be baked, simply append the template list to the containing list. (Does my use of words like 'list' and 'append' give away what language I'm currently coding in?) 4) Have each baker complete a good, then when all goods are completed adjust their taste and presentation scores all at once. 5) Have each good get purchased and eaten, then have all goods have their popularity adjusted at once.
Am I on the right track?
I think you are trying to run before you can walk. Work on something incredibly simple for an entity system first. Just a controllable walking character. I haven't read the whole thread yet, but this isn't what data oriented design is. Okay, so there is memory organization involved in this topic, but DOD has more to do with designing your code and structures for efficient memory access, to reduce cache misses, etc.
I believe the topic here is in regards to data-driven object creation. In other words it's the opposite of hard coding objects - instead you define them by way of external data.
I hope this isn't considered derailing the thread - just thought it was important to straighten that out.
You are absolutely right, I got the 2 mixed up.
|
|
|
|
|
547
|
Developer / Technical / Re: I Need To Know How This Is Done
|
on: July 20, 2012, 06:05:49 PM
|
|
I actually don't think it is using any sort of 3D coordinate system. Judged from the video, every object with "height" is done in tiles. The player's bounding box is simply covered from his feet to half his height, creating the illusion of height. Walls are solid, where the top (the area where the player can walk) is walkable. There is no need for fancy 3D coordinate stuff for the segment shown in the video.
|
|
|
|
|
548
|
Developer / Technical / Re: Things I don't understand: Entity Systems, Data-Oriented Design, and the like
|
on: July 19, 2012, 11:14:12 AM
|
So I include the components along with the data? So for the goblin I wouldn't only include an integer for its current HP, but I'd also include a bit of code where it calculates the damage, which is called when the player damages it? Or am I getting confused about what counts as a component?
As for the array thing, that's what I had considered doing for data-oriented stuff, but it seemed really awkward and way too easy to cause the wrong bit of data to change.
The damage calculation isn't data, that's implementation. You pass health to the health component, and damage to the weapon component (or whatever the enemy uses to inflict damage). Here is basic example, please ignore any spelling mistakes as I wrote this up really quickly. You can also see what I used to communicate between components, they send messages to eachother. class HealthComponent : Component { public int health; public HealthComponent(int maxHealth) { health = maxHealth; addMessageListener(Message.DAMAGE, receiveDamage); }
private void receiveDamage(Message m) { int final_damage = calculateDamageReduction(m.damage); this.health -= final_damage; }
private int calculateDamageReduction(int damage) { if (this.entity.hasComponent<ArmorComponent>()) { damage -= entity.getComponent<ArmorComponent>().armor; }
return damage; } }
class WeaponComponent : Component { public int damage = 0;
public WeaponComponent(int damage) { this.damage = damage; }
public void use(Entity target) { target.sendMessage(new Message(Message.DAMAGE, this.damage)); } }
|
|
|
|
|
549
|
Developer / Technical / Re: Things I don't understand: Entity Systems, Data-Oriented Design, and the like
|
on: July 19, 2012, 07:43:09 AM
|
I have written my own entity-component system, and alot of these questions seem to resolve themselves when you get your hands dirty on them. You can think about them for hours, but sometimes it's just better to have a go at them. 1) How do I actually create unique 'things' without classes and objects? From what I can understand, the way to do entity systems is to just have a bunch of components on their own, that get called for each entity that needs them at a given time. But I'm not sure how I'm supposed to have multiples of the same type of entity. Say I make an RPG where the player has to fight a group of six goblins at once. With OOP I could make a monster class, then add a goblin object, then duplicate that object five times. For DOD/Entity stuff the only solution I can think of is to have a list called goblin with all the information I need for a goblin in it, and copy that. But that seems really unwieldy and I'm not sure what it does differently than an object. What makes a goblin a goblin? Right, the components, and more importanty, the parameters you pass into these components. 2 Entities with a graphicscomponent can look completely different if you pass a different sprite/model into the graphicscomponent. Component system and data-oriented design go hand in hand. Each component is completely the same for each entity, it's the data that you pass into the component what makes them different. So to copy the goblin object, you need to make a template of all it's component and the data that you are going to pass into it. Using an external data source (Lua, xml) for these templates is really handy, since you can make new entities without recompiling. 2) How do I make sure I actually manipulate the data of a given object? Using the goblin example again, say the player attacks and damages Goblin 4. What's the right way to make sure that my code actually changes Goblin 4's HP and not another goblin's? In general, I'm not sure how to code entity systems in a way that guarantees that I can change each bit of data in an unique way.
An entity is basically a bag of a components. Entities don't share components with other entities, they both have their own set, it's what defines them. So when you damage goblin 4, you look up it's health component and subtract the damage. The other goblins won't be affected, since they all have their own instance of a health component.
|
|
|
|
|
552
|
Developer / Technical / Re: Google PlayN
|
on: July 03, 2012, 05:48:51 PM
|
I now have had some time to work with this and I have to say that it's pretty great. The cross platform implementation is pretty good, everything looks and functions exactly the same on each platform. But it's also pretty easy to write platform specific implementations. I have a free ios and android license for unity, but I think I prefer this when writing 2d games 
|
|
|
|
|
553
|
Player / General / Re: Sleep?
|
on: July 03, 2012, 05:30:12 PM
|
Just think about porn if you can't fall asleep. Or read a book.
Preferably both.
Think about porn? How boring. You can create the sickest sexual fantasies inside your mind. That's where it's at! also install f.lux if you want to use your computer late at night, so the blue light from it doesn't interrupt the onset of sleep.
That's a pretty cool piece of software, thanks.
|
|
|
|
|
554
|
Player / General / Re: Sleep?
|
on: July 03, 2012, 10:31:09 AM
|
Maybe don't go to bed until you're really sleepy?
I really hate going to bed, since I know that I will end up laying awake for hours. So I'm usually pretty tired when I finally do get myself to go. It's worse when I NEED to sleep, to be active the following day. I'm constantly thinking "I have to sleep I have to sleep I have to sleep". I sometimes get really angry over not being able to sleep, and that only makes things worse. Alot of people say I'm a pussy or whatever and that I should deal with it. I can absolutely deal with having only a couple hours of sleep. But laying awake for hours when all you (and your body) want to do is sleep literally drives you insane.
|
|
|
|
|
555
|
Player / General / Re: Sleep?
|
on: July 03, 2012, 06:33:57 AM
|
I have had trouble sleeping my entire life, it sucks bigtime. During "work" (internship) I usually go to bed at 00:30, but takes till about 03:00 to get to sleep if I'm lucky. I have to wake up at 07:30, so that's 4,5 hours of sleep. I feel sleepy the entire day, really annoying. But I have just graduated now, which means that I'm living the easy life  Go to bed at about 04:00, sleep at 6:00 and wake up at 13:00 - 14:00 So that's atleast 7 hours of sleep, I feel alot better 
|
|
|
|
|
556
|
Developer / Technical / Re: Where to start for mobile games?
|
on: June 27, 2012, 04:29:30 PM
|
|
I would take a look at the PlayN framework from google(formerly ForPlay). The setup process was a bit painful, but I can now export to html5, android, ios and desktop(java) with the same codebase. Furthermore, you can access all the platform specific functionality. It's a pretty high level framework, which I personally like.
An other option is HaXe with NME.
|
|
|
|
|
557
|
Player / General / Re: This retro pixel-art hegemony has to stop!
|
on: June 27, 2012, 04:05:30 PM
|
|
I'm not really mad that people like pixel art, it's just an art style. I actually find it very nostalgic myself. The thing that pisses me off is how he is so obviously ripping characters without any imagination whatsoever. He's in the position where he could make a wonderfull game with his own characters. Yet he chooses to simply grab existing stuff and mix it up enough not to get sued.
|
|
|
|
|
558
|
Developer / Technical / Re: Mixing FlashDevelop AS3 with Flash CS5.5
|
on: June 25, 2012, 06:17:25 AM
|
|
Like people said, publish an SWC. From the top of my head; - Go to file -> publish and select SWC. - Then click publish and there should be a SWC file in your project's folder. - Then either browse there in flashdevelop, or add it if your flashdevelop folder differs from your Flash CS 5 project. - Then rightmouse the SWC file in flashdvelop, "and select add to library".
|
|
|
|
|
559
|
Player / Games / Re: Super Smash Bros. U
|
on: June 24, 2012, 04:28:31 PM
|
Boy did I hate Brawl with a wii-mote. It was like race-car driving without a car.
I`m really curious how the tablet controller is to hold.
Please don't tell me you never played it with a gamecube controller?!  Smash brothers is probably my favourite multiplayer game of all time. I liked brawl, but it didn't last as long as melee. Don't know if that's because I got older or if there is a different reason. I did like the "physics" better, the jumping and hit impact felt like an improvement from melee.
|
|
|
|
|
560
|
Developer / Technical / Re: Refactoring
|
on: June 21, 2012, 03:33:24 PM
|
|
I absolutely hate refactoring. When I'm done with it, I only remember all the flaws and even though my code is cleaner than it used to be, I feel like it is a mess. I would rather rewrite everything, but that's not an option most of the time.
|
|
|
|
|