Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Killjoy

Pages: [1] 2 3 ... 8
1
Hello Hermes.

No there is not win condition in. I tried to design/balance the game so that you loose no matter what (Loosing is fun philosophy). I sadly did not have time to implement all the random events I had in mind, so the game can go on for quite and become quite boring after a while.

Anyway thanks for playing, I will note that miners dying from starvation would be a good feature ;). No but I have had similar opinions raised before, about closure.

2
Hey 10ebbor10, sorry to hear it runs slow.

I don't really know what to do about it. What are your specs?

3
Creative Projects / I made a LD48 game: Coalmine Manager (Web game)
« on: May 03, 2014, 06:19:16 am »
So yeah, I've attended LD48 two times, last weekend I did too. Usually I don't find much point in cross promoting the games I make, but this time the end result seemed like the type of game B12 would like. So I thought I would do some shameless advertising and post it here.

Would be cool if anyone would like to take it for a spin.

The game

It is essentially a manager game, with some light gameplay. In the game, you manage a coalmine. Each day you see your little workers 'work', you can issue some light commands, and at the end of the game you take some strategic decisions that affect your game later.

The goal is to get as far as possible, I tried to balance it so that you loose in the end. You loose when you do not have any more money.

Anyway, here is a link:

http://www.ludumdare.com/compo/ludum-dare-29/?action=preview&uid=22055

4
Creative Projects / Re: Quick Way To Calculate Integer Arithmetic?
« on: March 15, 2014, 09:59:16 am »
Well. You can optimize additions as follows:
Perform additions by doing parallel additions of words. If you have two large binary number, split them into equal chunks that fit the largest register in your CPU. You might want to concatenate the smaller number to fit the larger.

Then, simply perform normal addition on these chunks. Then, simply go through each that overflowed, and add 1 to each 'next' chunk.

Multiplication, I really encourage you to implement binary long multiplication. It is actually quite a simple algorithm. Simply go though each bit in the first term, and if the bit is set shift the second term by the position, and add it to the result.

Once you have that down, you can implement Toom–Cook multiplication, which works by splitting the number, and essentially trading some multiplications for additional additions. Don't use the wiki source for this, it is way to general, and is bad at explaining what is actually happening.

If you don't care about all the bit twiddling, go an use the standard GNU BigNum library . It is written by people who actually know what they are doing, over the course of two decades, and is probably better than anything you can ever hope to write.

5
Creative Projects / Re: An Artsy Question About Perspective And Math
« on: February 25, 2014, 02:15:16 am »
Quote
No, I haven't taken linear algebra... though I think at this point I really may want to.
Linear algebra is a VERY big subject, you need to learn about linear equation, linear algebra arithmetic and linear transforms specifically. It should be enough to understand the article. I am assuming you know a little bit about classical analytically geometry (High school geometry).

Quote
So if I gather what they're saying in the OpenGL link correctly, they're assuming a certain point behind the screen is the viewing point, and then they're using the similar triangles rule to figure out where a given coordinate point should appear on the screen?
It is because the z coordinate is flipped between the eye coordinates and the NDC.

6
If you want attention to your project, don't start out expecting to get any attention at all. Attention is a accumulative thing, that builds on its own if you just keep doing what you do, and do it good.

That said, this discussion has almost nothing on actual game design at all. Just a short introduction, and a overview of a majority problem present in some distributed systems. Perhaps you should write some more topics before calling it a resource for designing games.

Even better stop writing the resource, just make a game instead while documenting design, steps and thoughts. People love reading about actual progress.

7
Creative Projects / Re: Free GameMaker Studio License Keys until Dec 3rd
« on: November 28, 2013, 05:39:32 am »
Back in the early 2000s when I first started programming I used Game Maker. Man I regret that decision, a lot of bad habits and misunderstandings that had to be corrected because of it.

If all you want to do is make games, then by all means this is actually a pretty nifty tool.

If you are a beginner that plan to learn some programming on the side I would tell you to stay the hell away from this.

GML, the programming language of game maker, is the peak of insane language design. It is purely imperative, with a fucked up typing/scoping system which leads to some pretty bad programming habits if you learn it as a first language.

Go with Unity and pick one of the holy three Python/JS/CS.

8
General Discussion / Re: if self.isCoder(): post() #Programming Thread
« on: September 28, 2013, 01:40:51 pm »
That's not really the problem...it's that I have no idea how to turn my .py files into .exes from Notepad++, really, so I can debug and goof around with them. I installed the plugin NppExec, and I don't really understand it.
If you turn your python into a executable you will have the same problem. Windows simply kills the console whenever the program has exited.

Honestly the way that windows assigns a console window to applications is weird and pretty dumb. On more reasonable OSes(.*inx systems), standard output is ignored unless the user specifies where the output should go, for an example the shell(Console).
On windows the OS will for whatever reason give the program a console window if it detects standard output (I am a little fuzzy on the details, but I think this is how it works). Since your program exits after executing one instruction, the print command. The OS simply kills the console window again as no more output will be coming from the program, confusing the heck out of most novice programmers.

If you want the console window to stay alive after executing your python script:
Open up a console window, this is probably the cmd application. Navigate to the directory where the python script is located using the 'cd' command. Then execute the script using the python command.
Example:
A python script called main.py is located in c://python/project

Code: [Select]
cd python/project
python main.py
Now that the program is launched from a shell, the output should be directed the cmd terminal instead and stay alive after the script terminates.


Please note that I have not used a windows PC for the past year or so, so I am a little fuzzy on the details.

9
Creative Projects / Re: A more effective internet forum
« on: September 25, 2013, 02:05:36 pm »
What you are proposing is arranging the discussion into a directed graph. Instead of a tree, much like what the reddit discussion model.

It is actually not that difficult to set up something like this.

However, presenting it in a way that facilitates these digraph discussion features is much harder.

You could show the parent threads appended on top. But I don't really see any reason not just to use quoting, unless you want to preserve context, which is not an issue on modern boards anyway since you can simple link the post where the quote comes from.

This does however give me an idea. Why not make sort of a discussion graph or web. You can't start a new discussion topic per se, but you can always derive discussions from other discussions. Meaning any topic discussion thread could be traversed back to the origin. The origin would be sort of a hello world, opting to discuss this type of fora or something.

What would be even more valuable would be if any new topic had to actually discuss the parent topics in some way or form. I doubt however that it is really possible to moderate and enforce such rules, even if a dataset with this rule would be extremely valuable.

Farming this graph would make for some very interesting data.

I don't mind setting up a little web service like this if anyone is interested. If anything it gives me something to do today.

10
Are Python dicts hashmaps or binary-searched?

Hashmaps.
Collisions are resolved using pseudo random probing.
A resize happens whenever the dict is 2/3 full.

Lookup and insertion have an amortized O(1) runtime complexity.

11
Does the constant updating the dicts have any performance impact?
Yes, but it is negligible compared to alternatives. Dict and set operations in python are VERY fast.

They have a considerable memory overhead, since memory does not grow linearly. But unless you are going manage like a million entities, it is reasonable. But if you do like 100k entities it should be fine.

12
If you go for the psedo relational approach a outlined in the previous post using python dicts you can simply add a relation called ALIVE that can be used to keep track of this kind of stuff with.
Removing entities from this relation will mark them as dead. I will give you one more example advocating the approach.


Code: [Select]
#Stuff you want to relate entities to, like age or gender
ALIVE = defaultdict(set)
AGE = defaultdict(set)
GENDER = defaultdict(set)
DYNASTY = defaultdict(set)
CITY = defaultdict(set)
MARRIED = defaultdict(set)
# ... and so on
# Make sure a solid interface between the entity and the outside world exists, so these relations are changed accordingly
# Use python properties
class Entity(object):
    ...
    @property
    def age():
         return self._age

    @property.setter
    def age(x):
         AGE[self._age].remove(self)
         self._age = x
         AGE[x].add(self) #Make sure to update entity relation
   
    #Etc..

# Complex search example, why sets are awesome.
# Find all MALE entities that are ALIVE between ages 20-70 that are not MARRIED
entities = (ALIVE[True] & GENDER[MALE]) & {AGE[i] for i in range(20, 71)} & MARRIED[False]


13
Creative Projects / Re: Game programmers and designers enroll here.
« on: September 08, 2013, 03:11:52 am »
Okay, I since nobody else have done it yet, I will do the talent hunter bullshit test.

Hemmingjay, are you going to pay whatever team you assemble? Can people expect to get a salary?

Since you are getting some "substantial financial backing" if you can assemble a team, I am assuming you are going to spend these money ensuring the talented people you recruit can actually pay their bills and so on. 



14
Dicts would work fine for this, just create a defaultdict for each attribute .....


Thanks for this piece of info :) it'll help me when I'm doing a similar thing in my project!

P.s killjoy - do you think you'll be returning to work on the merchants quest again? I really enjoyed seeing the progression :)

I really want to get back into game programming, posting and documenting progress is very fun and extremely rewarding.

For some time I have contemplated reviving MQ, but as something totally different. But it is on hold for now, I've gotten into way to much freelance work, so my hobby project time is now work time too.

15
I don't know if dictionaries would work for my purposes. I'll need to eventually sort on a bunch of attributes, like "all female characters between ages 20 and 30, who are not of Dynasty X, and who are not married."

Dicts would work fine for this, just create a defaultdict for each attribute you want to be able to select by:
Code: [Select]
from collections import defaultdict
select_by_age = defaultdict(set)
select_by_dynasty = defaultdict(set)
...
#Creating, or updating any entity
select_by_age[self.age].add(self)
select_by_dynasty[self.dysnasty].add(self)
#and so on
....

#When you need to find all entities by age / dynasty
all_in_agerange = {select_by_age[i] for i in range(20, 31)} #The hidden set comprehension syntax
of_specific_dynasty = select_by_dynasty[dynasty]
... select by a bunch of more attributes
entities_you_want_to_find = all_in_agerange & of_specific_dynasty #etc etc

# Sets implement set intersection using the set intersection operator '&'.
# Since they work by hashing, it is very fast

Pages: [1] 2 3 ... 8