|
1021
|
Developer / Technical / Re: C++ is frequently reviled both by those who never use it and by those who use it
|
on: October 18, 2009, 07:00:53 AM
|
|
D: Pretty sure you can't. You can build up expression trees with operator overloading, but no implicit casts (and only one extra explicit cast per class, which is nigh on useless). Best you'd get is (M*v1+v2).get And then be necessary even for simple cases like (v1+v2).get
Lisp: Macros are powerful enough, but I don't think they mix with overloading, which would require use of CLOS, right? Best you'd get is: (optimize-vector-expression (+ (* M v1) v2)) or (vec+ (vec* M v1) v2) And in either case, how are we going to deal with not knowing the types in advance. I'm not sure you can actually do it using type-annotation/inference in Lisp.
Template Haskell: Not seen this before. As far as I can tell, you'd need to quote and splice, or use quasi quotation [$optimizeVectorExpression| M * v1 + v1|] Also, it wouldn't interact 100% with Haskell's type inference.
MetaOCaml: I know even less about this. Not going to comment.
In other words, none of these can make it as transparent to the end user. But I appreciate your point, as this is just one of many high level concepts you might want to do, and I'm in general these languages beat C++ for metaprogramming.
|
|
|
|
|
1022
|
Developer / Technical / Re: What is this 3D perspective called and how do you achieve it?
|
on: October 18, 2009, 04:08:19 AM
|
|
Modelling the world as a cylinder seems just as plausible to me. That way you can just place models on the world, you don't need worry worry about applying a consistent vertex displacement to everything in your game. It's no problem that the cylinder has more than 360 degrees, it's probably just formed from segments stitched together as any large piece of scenery is.
|
|
|
|
|
1023
|
Developer / Technical / Re: C++ is frequently reviled both by those who never use it and by those who use it
|
on: October 18, 2009, 01:08:30 AM
|
xgalaxy: Where's the code from? But either you're missing the point, or you are not passing on the point to any readers. Sure, operator +, * etc are complicated but at most your are going to define 10 or so of those. Then when actually using your library, you can write stuff like Vector4 v3 = m*v1 + v2;
And not only will it correctly do vector maths, it'll build an expression tree, determine the best way to evaluate it (there are lots of matrix optimizations), and then inline all the code to do it as if it were a single function that you'd written ahead of time. AFAIK, no other language can do that. Some languages may have operator overloading, but they don't have the template power to do that, nor implicit casting that makes the whole process opaque to the user.
|
|
|
|
|
1024
|
Developer / Technical / Re: LETS MAKE AN AI THAT WRITES CODE!!
|
on: October 18, 2009, 12:57:15 AM
|
|
Learn lisp, then come back to us. One of lisps main idioms is that you use code to generate code. There's a reason it (was?) so popular amongst AI researchers.
Genetical algorithms come to mind for me: I believe you can put constraints on genes so that they only produce well formed programs, etc.
|
|
|
|
|
1025
|
Developer / Technical / Re: C++ is frequently reviled both by those who never use it and by those who use it
|
on: October 17, 2009, 09:02:05 AM
|
|
As does everyone, I've got a love/hate relationship with the language. When using it, I hate it for being hard to debug errors and easy to make them; when not using it, I wish I had it for its power and performance. Basically, C++ makes some of the hard bits easy, and visa versa, compared with other languages. So it's nice for a change, if nothing else.
I'm gleefully looking forward to C++0x.
(disclosure: my day job is C++).
|
|
|
|
|
1026
|
Community / Jams & Events / Re: TIGJam: UK²
|
on: October 17, 2009, 07:29:57 AM
|
I've sent off your e-mail, tailored to colleges in London offering Game Design courses. I hope that they'll have more negotiable prices than other sorts of venues. It's probably best to list where, so we don't collide. Emailed: - Qantm
- London College of Communcation
- West Thames College
- City of Westminster College
Here's my template, in spoiler-vision: Dear Sirs,
I am one of the organisers of the upcoming TIGJam UK2, an independent game developers' convention.
TIGJam is an initiative of The Independent Gaming Source, TIGSource for short. We are a prominent web-based community of artists, animators, game designers and programmers - please refer to homepage, http://tigsource.com/ for more information. This would be the fourth installation of TIGJams following last year's Phoenix (US) and London, and this year's Berlin (DE) events.
We are currently looking for a place to host the event. As a college offering [course in game design], I thought it would be worthwhile asking if you have spare rooms available for hire in your campus. Hosting the event would naturally promote your course, both to attendees and to our wider community internationally.
We are looking for a function room or hall available for hire for the period 4 - 7 December, 2009. The room will ideally be able to accommodate 40 - 50 people and their laptops (seating and tables). Wi-Fi internet access would be an important plus, however we can arrange for it should it not be available at the premises.
I would be grateful if you could send me a quote to this e-mail address. If you require further information, please contact me on [Phone Number].
Thank you for your help in advance.
Best regards, [Name]
For the record, I am not doing this because of Corpus' annoyed rant. We all have busy lives you know! All I saw in your post was how it was easy to do, as long as someone else does it. Constructive advice at its best, particuarly as I had said was willing to do stuff, but wasn't sure what to do. Of György Straub's letter, I would correct the start/end to: Dear Sirs, Yours faithfully,And UK spelling: organiserIf you can, provide a UK phone number. I remember from when I had to read these things that I got suspicious of foreign requests, as there was a certain amount of fake ones, and they were harder to verify. Also, you write the 4-7th, but are we actually looking to book for that long? I got the impression that the previous one only ran outside of work hours? It might be worthwhile enquiring after other dates if they are booked for that particular weekend.
|
|
|
|
|
1027
|
Community / Jams & Events / Re: TIGJam: UK²
|
on: October 06, 2009, 02:14:34 PM
|
|
What happened to it?
After thinking it over, I think are best bets are: 1) A friendly company. You know someone who know someone? Great, time to drop them a line. Consider asking your employer (I'm pretty confident mine will say no, and take over 2 months to do so). 2) Hotels. If enough of you visiting london were intending to pay for hotel rooms, we can probably talk them into a conference room in exchange for a mass booking. How many of you were going to do that? 10 or so seems plausible for a room for 30. 3) Universities. If london ones are like others, they are quite used to renting out rooms as a way to grub cash. Particularly some offer "game design" courses, might they be interested?
|
|
|
|
|
1028
|
Developer / Technical / Re: Flash or Flash Develop?
|
on: October 03, 2009, 03:44:46 AM
|
it's whatever people want to use, I don't see why they should use flashdevelop over the other. it's up to what each person is accustomed to. If someone had more than 200 lines of code and was using Flash IDE (check bateleur's post)
The same way you should use AS3, instead of AS2. Or should use browsers other than IE. It's not that the alternative doesn't have a few things going for it, but in general the decision is clear enough that it's not worth mincing words over. In the past, people were accustomed to the worse choices, but they looked beyond it for what would be the best tool once you got over the small re-learning curves.
|
|
|
|
|
1029
|
Developer / Technical / Re: Flash or Flash Develop?
|
on: October 01, 2009, 02:06:18 PM
|
|
Yeah, stop treating it like it's either or. If you have more than 200 lines, you should use FlashDevelop (or basically anything other than Flash) for the code. If you are using vector/animated assests, you should use Flash to manage those (like you have a choice).
And make a distinction between editor and compiler. Using FlashDevelop doesn't prevent you using Flash instead of Flex as your compiler. It in fact works quite well. Similarly using Flash doesn't stop you using Flex to compile (you can Embed() .swf assets).
Peronally, I write code in FlashDevelop, compile in Flex, and hop over to Flash for debugging (and occasionally level design).
|
|
|
|
|
1030
|
Community / Jams & Events / Re: TIGJam: UK²
|
on: September 28, 2009, 08:32:03 AM
|
|
No one has volunteered, I think. I don't mind doing some scouting, or other man-on-the-ground activities, as I live in London, but I'm a walking organizational disaster, so I'm not going to volunteer to plan the thing. I also don't have much of an idea where to look.
You need to decide: How many people are we going to accomodate for. What we might reasonably expect to pay (if anything?). Internet Access? Desks, etc. Where to look? I don't know, do you ask indie games-friendly businesses? Or craigslist? Hotels?
|
|
|
|
|
1031
|
Developer / Technical / Re: Events!
|
on: September 23, 2009, 02:00:09 PM
|
|
Then mark the bullet, but don't do anything with the mark until the next update, when it gets destroyed. Using events means thinking asynchronously - don't say "the multiple bodies the bullet hit", as if the bullet were really moving continuously that would only ever be one - you mean to say all the bodies hit between one update and another, assuming the bullet is not stopped in any way.
|
|
|
|
|
1032
|
Developer / Technical / Re: Events!
|
on: September 23, 2009, 01:14:08 PM
|
|
Still not getting it... Saying a collision is synchronous with the latest update is a bit of an empty statement. That's not really a special time is it. If you mean that events need to be guaranteed to happen between one update and the next, then yes, but this is a property you can build into your event system. Flash has it for free, for example, as or course do events which are implemented synchronously.
And what do you mean hitting multiple objects? Are you saying with events you cannot prevent it from hitting multiple? You'd just mark the bullet as dead after it hits the first object, and ignore all other collisions.
|
|
|
|
|
1033
|
Developer / Technical / Re: Events!
|
on: September 22, 2009, 11:05:56 AM
|
Bullet collides with an enemy: No, do not use an event. There are aspects of this interaction which need to be handled immediately.
I would use an event for this. Which makes me think perhaps some particular aspects that are hard to do this way, which I've missed. Did you have any in mind? My logic would be that bullets colliding with enemies is "naturally asynchronous", in the sense there's nothing that it is synchronized with.
|
|
|
|
|
1035
|
Developer / Technical / Re: Problem with diagonal walking in isometric engine
|
on: September 20, 2009, 02:41:17 AM
|
|
It doesn't open a can of worms. If you are doing the "animate in one place, and move linearly at the same time", then you are just repeating the walk cycle over and over, you don't need worry that while walking through a square he starts on a particular foot, or indeed any particular part of the walk cycle. You just need be concerned he starts and ends on one.
Suppose your walk cycle is tile long, and contains two strides, and has auxiliary animations to come to a stop from either the 1 tile mark, or the 0.5 tile mark. Thanks to bilateral symmetry, this is usually little extra work.
Then you could do the following. Determine the total length of the path to be walked (not just between two tiles). Round that to the nearest 0.5, and scale the animation (so there's a bit of slide). Then use the appropriate end animation, depending on how you rounded. I.e. walking to an adjacent tile is 1, rounds to 1. No scaling necessary, so he behaves as before. Walking to a diagonal tile is 1.41, rounds to 1.5. You need to down his stride by 10% (either by moving him fractionally slower (causing sliding), or animating him fractionally faster, probably both). Walking as a knight moves (1 adj. 1 diag) is 2.41, rounds to 2.5. This is scaling of 4% - smaller because we've spread out the error over the entire journey.
|
|
|
|
|
1036
|
Community / Jams & Events / Re: TIGJam: UK²
|
on: September 10, 2009, 12:30:02 PM
|
You'll be more than a tourist this time I hope?  Yeah, I'll unwrap the coding guns  . In my defense, I had to go to a funeral the following day, I didn't exactly feel like game making last time. If you're a Londoner do look for locations. 8D
I'm happy to keep a look out, but as I said, without getting an estimate of numbers I cannot really do anything. Someone sufficiently authoritative want to commit to one?
|
|
|
|
|
1037
|
Developer / Technical / Re: .dll files
|
on: September 08, 2009, 12:49:14 PM
|
|
extern C also turns off C++ calling conventions, which aren't portable between compilers. The name mangling is just the first of several insurmountable obstacles, before you think of hacking in your own mangler (don't you pretend you weren't).
You see a fair number of things which use dll as a modular system (emulators seem to love this technique). It's not really too grotesque. Just make sure one of the functions you always export is a metadata function so you can tell what the damn thing is.
|
|
|
|
|
1038
|
Developer / Technical / Re: Integrating Engine and Tools
|
on: September 08, 2009, 12:41:59 PM
|
|
I agree. Property lists and dynamic typing make all these problems go away. Though for a certain class of games, an in-game level editor actually understands all the properties can work must better. I was just trying to offer a solution within the constraints given.
|
|
|
|
|
1039
|
Community / Jams & Events / Re: TIGJam: UK²
|
on: September 06, 2009, 12:47:20 PM
|
|
I'm in. I'm a Londoner fwiw, so my preference is clear. It sounds like there's going to be a much larger turnout than last year. Getting a numbers estimate is going to be a pre-requisite to booking anywhere.
|
|
|
|
|
1040
|
Developer / Technical / Re: Integrating Engine and Tools
|
on: September 06, 2009, 12:27:51 PM
|
The base object wouldn't need to know anything about what the various values are used for- it would just need to know that a specific object has a given list of key/type/value information.
Exactly. Separation of serialization and logic. Some more thoughts: If you are using C++, and insist on using real C++ class members for all properties, and don't overlap editor and game objects, you can add "annotations" to class members for de/serialization, using some template magic. E.g. class A { int b; float c; } class_<A> A_("A"); property(A_,"b", &B::b); property(A_,"c", &B::c); See Boost::Python for how succinct this can get. Because you don't need repeat type annotations, it's more convenient than a special file, or method. Having made game objects, and made their contents available for introspection, you do not need to any further work for editor objects. Except for where the properties also affect the editor, you DO NOT need to duplicate the functionality of game objects. You just need a single editor object that which can read and write based on that property information. The aim of the game is to avoid repeating yourself at all. Unfortunately, you must list still everything twice (once in the class definition, and once to declare it as a property) in C++, but that still sounds better than the 5 copies you appear to be doing (LevelReader, EditorObject::Write, GameObject::Write, GameObject class defintion, EditorObject class definition). It's just a thought, though, I certainly haven't tried it. Edit: There's a few C++ serialization solutions out there. Unless you are doing something special, it sounds like it's best to let someone else do the hard work for you.
|
|
|
|
|