[QUOTE=SEKCobra;29340553]Textfiles cant be corrupted like binaryfiles :[[/QUOTE]
...Yes they can?
[QUOTE=SEKCobra;29340553]Textfiles cant be corrupted like binaryfiles :[[/QUOTE]
All files are "binaryfiles"
[QUOTE=xAustechx;29340203]Do you think these lights make a good touch?
They're spaced out like this across the whole level.
[media]http://i53.tinypic.com/2s128o6.png[/media]
Agree if yes, disagree if no.
I'm trying to nit pick some things, so I need to know if I'm doing the right choices. :v:[/QUOTE]
The lights seam to small and too hard, consider a softer, larger light.
More progress! I was stuck with Lua instantly running through the script, thereby giving the player no chance to respond. Completely stuck, I went to the Lua IRC channel and someone pointed me to Lua coroutines. After some work, voila:
[img]http://img855.imageshack.us/img855/6681/development14a.png[/img]
[img]http://img855.imageshack.us/img855/8269/development14b.png[/img]
The Lua script behind this:
[img_thumb]http://img859.imageshack.us/img859/350/development14c.png[/img_thumb]
Why is the first reply 0? Lua's indices start on 1, you know.
[QUOTE=KillerJaguar;29341705]Mass Effect 2 References[/QUOTE]
Speaking of Harbinger, here's a neat "singleton" python class. (This is taken directly from my build system. It's been there since version 0.2.)
[code]
# I'm Command Shephard, and this is my favorite module in bit
class Harbinger(object):
__shared_state = { }
def __init__(self): self.__dict__ = self.__shared_state
[/code]
It's use is actually quite simple. Whenever you subclass from Harbinger, you can instantiate the class as many times as you like from anywhere, and you don't lose the data contained within (unless you re-initialize it. But it's as simple as not placing a data member in __init__). So, this class is used as the parent for the Workspace class. The workspace contains all the projects, settings, file database locations, etc. Now, this would be a huge pain in the ass to constantly pass to each project. So instead of having a global variable that is constantly imported, I just import the module, then instantiate the Workspace when I need it, and then access whatever I need.
Also, I tend to do this whenever I instantiate it.
[code]
def func():
workspace = Workspace() # Assuming Direct Control
[/code]
:v:
[QUOTE=simie;29338621]Does the objective c part of clang work with this?[/QUOTE]
Little of Column A, Little of Column B. Objective-C is effectively syntactic sugar over C, with calls made into the ObjC runtime. Clang has a neat little commandline argument called "-rewrite-objc". So given the following ObjC file:
[cpp]
#import <objc/objc-runtime.h> // Note the include
#import <stdio.h>
@interface Hello { }
+ (void)initialize;
+ (void)sayHello;
@end
@implementation Hello
+ (void)initialize { }
+ (void)sayHello { printf("Hello, World!\n"); }
@end
int main() {
[Hello sayHello];
return 0;
}
[/cpp]
It produces the following C++ file
[cpp]
struct objc_selector; struct objc_class;
struct __rw_objc_super { struct objc_object *object; struct objc_object *superClass; };
#ifndef _REWRITER_typedef_Protocol
typedef struct objc_object Protocol;
#define _REWRITER_typedef_Protocol
#endif
#define __OBJC_RW_DLLIMPORT extern
__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSend(struct objc_object *, struct objc_selector *, ...);
__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSendSuper(struct objc_super *, struct objc_selector *, ...);
__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSend_stret(struct objc_object *, struct objc_selector *, ...);
__OBJC_RW_DLLIMPORT struct objc_object *objc_msgSendSuper_stret(struct objc_super *, struct objc_selector *, ...);
__OBJC_RW_DLLIMPORT double objc_msgSend_fpret(struct objc_object *, struct objc_selector *, ...);
__OBJC_RW_DLLIMPORT struct objc_object *objc_getClass(const char *);
__OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass(struct objc_class *);
__OBJC_RW_DLLIMPORT struct objc_object *objc_getMetaClass(const char *);
__OBJC_RW_DLLIMPORT void objc_exception_throw(struct objc_object *);
__OBJC_RW_DLLIMPORT void objc_exception_try_enter(void *);
__OBJC_RW_DLLIMPORT void objc_exception_try_exit(void *);
__OBJC_RW_DLLIMPORT struct objc_object *objc_exception_extract(void *);
__OBJC_RW_DLLIMPORT int objc_exception_match(struct objc_class *, struct objc_object *);
__OBJC_RW_DLLIMPORT void objc_sync_enter(struct objc_object *);
__OBJC_RW_DLLIMPORT void objc_sync_exit(struct objc_object *);
__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);
#ifndef __FASTENUMERATIONSTATE
struct __objcFastEnumerationState {
unsigned long state;
void **itemsPtr;
unsigned long *mutationsPtr;
unsigned long extra[5];
};
__OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *);
#define __FASTENUMERATIONSTATE
#endif
#ifndef __NSCONSTANTSTRINGIMPL
struct __NSConstantStringImpl {
int *isa;
int flags;
char *str;
long length;
};
#ifdef CF_EXPORT_CONSTANT_STRING
extern "C" __declspec(dllexport) int __CFConstantStringClassReference[];
#else
__OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[];
#endif
#define __NSCONSTANTSTRINGIMPL
#endif
#ifndef BLOCK_IMPL
#define BLOCK_IMPL
struct __block_impl {
void *isa;
int Flags;
int Reserved;
void *FuncPtr;
};
// Runtime copy/destroy helper functions (from Block_private.h)
#ifdef __OBJC_EXPORT_BLOCKS
extern "C" __declspec(dllexport) void _Block_object_assign(void *, const void *, const int);
extern "C" __declspec(dllexport) void _Block_object_dispose(const void *, const int);
extern "C" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];
extern "C" __declspec(dllexport) void *_NSConcreteStackBlock[32];
#else
__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);
__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);
__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];
__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];
#endif
#endif
#define __block
#define __weak
#define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER)
#include <objc/objc-runtime.h>
#include <stdio.h>
#ifndef _REWRITER_typedef_Hello
#define _REWRITER_typedef_Hello
typedef struct objc_object Hello;
#endif
// + (void)initialize;
// + (void)sayHello;
/* @end */
// @implementation Hello
static void _C_Hello_initialize(Class self, SEL _cmd) { }
static void _C_Hello_sayHello(Class self, SEL _cmd) { printf("Hello, World!\n"); }
// @end
int main() {
((void (*)(id, SEL))(void *)objc_msgSend)(objc_getClass("Hello"), sel_registerName("sayHello"));
return 0;
}
struct _objc_method {
SEL _cmd;
char *method_types;
void *_imp;
};
static struct {
struct _objc_method_list *next_method;
int method_count;
struct _objc_method method_list[2];
} _OBJC_CLASS_METHODS_Hello __attribute__ ((used, section ("__OBJC, __cls_meth")))= {
0, 2
,{{(SEL)"initialize", "v16@0:8", (void *)_C_Hello_initialize}
,{(SEL)"sayHello", "v16@0:8", (void *)_C_Hello_sayHello}
}
};
struct _objc_class {
struct _objc_class *isa;
const char *super_class_name;
char *name;
long version;
long info;
long instance_size;
struct _objc_ivar_list *ivars;
struct _objc_method_list *methods;
struct objc_cache *cache;
struct _objc_protocol_list *protocols;
const char *ivar_layout;
struct _objc_class_ext *ext;
};
static struct _objc_class _OBJC_METACLASS_Hello __attribute__ ((used, section ("__OBJC, __meta_class")))= {
(struct _objc_class *)"Hello", 0, "Hello", 0,2, sizeof(struct _objc_class), 0
, (struct _objc_method_list *)&_OBJC_CLASS_METHODS_Hello
,0,0,0,0
};
static struct _objc_class _OBJC_CLASS_Hello __attribute__ ((used, section ("__OBJC, __class")))= {
&_OBJC_METACLASS_Hello, 0, "Hello", 0,1,0,0,0,0,0,0,0
};
struct _objc_symtab {
long sel_ref_cnt;
SEL *refs;
short cls_def_cnt;
short cat_def_cnt;
void *defs[1];
};
static struct _objc_symtab _OBJC_SYMBOLS __attribute__((used, section ("__OBJC, __symbols")))= {
0, 0, 1, 0
,&_OBJC_CLASS_Hello
};
struct _objc_module {
long version;
long size;
const char *name;
struct _objc_symtab *symtab;
};
static struct _objc_module _OBJC_MODULES __attribute__ ((used, section ("__OBJC, __module_info")))= {
7, sizeof(struct _objc_module), "", &_OBJC_SYMBOLS
};
[/cpp]
Ugly as hell right? (This is also what gcc and clang do when they compile ObjC, except they convert it to C, not C++). It doesn't solve the issue of needing an ObjC runtime (nor does it truly take clang blocks into account). It apparently isn't too hard to implement, though there are a million optimizations a simple implementation could do. Etoile and GNUStep each have an ObjC runtime, as does gcc. All you truly need, IIRC, is an <objc/Object.h> file, and the runtime to be linked.
This still doesn't solve the issue of not getting Cocoa, Foundation, or the other countless types that make ObjC worth using in any capacity.
However, Apple provides the ObjC runtime HERE: [url]http://opensource.apple.com/tarballs/objc4/[/url]
This is not guaranteed to build on non-darwin OS's, but there is code in there for them. (How else could they port iTunes and Safari to windows? :v:)
[editline]21st April 2011[/editline]
Damn, now I'm tempted to try to get the runtime working on windows :P
[QUOTE=thelinx;29341795]Why is the first reply 0? Lua's indices start on 1, you know.[/QUOTE]
The value itself is in C. It just returns that.
Planning on releasing an alpha version of my game some time today.
Just as soon as a get this damn town value to 500
[media]http://i53.tinypic.com/a0xj4y.png[/media]
And I'll try stop posting about my game until then, I've been spamming it all day today.
Are you using XNA?
[QUOTE=likesoursugar;29342421]Are you using XNA?[/QUOTE]
Austech is using SFML.Net
[QUOTE=Richy19;29342452]Austech is using SFML.Net[/QUOTE]
Good.
[QUOTE=xAustechx;29342355]Planning on releasing an alpha version of my game some time today.
Just as soon as a get this damn town value to 500
[media]http://i53.tinypic.com/a0xj4y.png[/media]
And I'll try stop posting about my game until then, I've been spamming it all day today.[/QUOTE]
Meh, content is content... Beggars can't be choosers and what not. Sorry, I'm wasted.
[QUOTE=likesoursugar;29342476]Good.[/QUOTE]
Why whats wrong with XNA?
Or is it just your on Linux/Non-Windows?
This time I DID mean to make a fractal generator. :smug:
[img]http://img820.imageshack.us/img820/3019/fractal2a.png[/img]
[QUOTE=Smashmaster;29342540]This time I DID mean to make a fractal generator. :smug:
[img_thumb]http://img820.imageshack.us/img820/3019/fractal2a.png[/img_thumb][/QUOTE]
When you do this kind of thing, to draw it do you edit the pixels of the image like with perlin noise?
[QUOTE=xAustechx;29342355]Planning on releasing an alpha version of my game some time today.
Just as soon as a get this damn town value to 500
[media]http://i53.tinypic.com/a0xj4y.png[/media]
And I'll try stop posting about my game until then, I've been spamming it all day today.[/QUOTE]
If you were to add a lighting system, I'd use a subtle gradient system that doesn't multiply:
[media]http://i.imgur.com/6ut2m.png[/media]
I made this thinking it would be simple but in hindsight it looks quite expensive for the type of game you are creating V:v:V
[QUOTE=Richy19;29342592]When you do this kind of thing, to draw it do you edit the pixels of the image like with perlin noise?[/QUOTE]
I do my calculations straight into a texture buffer because I wanted to get it to run in real-time.
[QUOTE=Kwaq;29342625]If you were to add a lighting system, I'd use a subtle gradient system that doesn't multiply:
[media]http://i.imgur.com/6ut2m.png[/media]
I made this thinking it would be simple but in hindsight it looks quite expensive for the type of game you are creating V:v:V[/QUOTE]
That is the coolest thing I have ever seen in my game, it's a shame it doesn't exist in the game though.
I'll see if I could do something like that in the near future though, because that just looks awesome.
[QUOTE=Kwaq;29342625]If you were to add a lighting system, I'd use a subtle gradient system that doesn't multiply:
[media]http://i.imgur.com/6ut2m.png[/media]
I made this thinking it would be simple but in hindsight it looks quite expensive for the type of game you are creating V:v:V[/QUOTE]
He can use post processing shaders and have it run fast
Mine looks like
[img]http://img835.imageshack.us/img835/5994/untitlebd.png[/img]
But you can make it less sharp
I can give pseudo code but the actual code is in XNA so wouldnt be much help
At the expense of resolution and quality, my Mandelbrot renderer runs at (kind of) real time.
[url]http://img545.imageshack.us/img545/5070/fractal3.png[/url]
EDIT: It's basically time for me to learn how to write shaders for OpenGL because this method is slow as hell.
EDIT2: Fixed a problem and now it's much faster, and looks better.
[img]http://img263.imageshack.us/img263/295/fractal4.png[/img]
[img_thumb]http://f.anyhub.net/2A11[/img_thumb]
I'm stress testing my culling algorithm. Does anyone know were I could find a working sphere vs cone intersection algorithm?
Content roll!
[QUOTE=polkm;29343645][img_thumb]http://f.anyhub.net/2A11[/img_thumb]
I'm stress testing my culling algorithm. Does anyone know were I could find a working sphere vs cone intersection algorithm?
Content roll![/QUOTE]
This uncompressed BMP is stress testing my bandwidth... No offense.
Otherwise that looks pretty cool.
[QUOTE=polkm;29343645][img_thumb]http://f.anyhub.net/2A11[/img_thumb]
I'm stress testing my culling algorithm. Does anyone know were I could find a working sphere vs cone intersection algorithm?
Content roll![/QUOTE]
[img]http://img30.imageshack.us/img30/5209/artifacts.png[/img]
I see a lot of artifacts which don't seem right
[editline]22nd April 2011[/editline]
I suppose they could just be some weird holes or something but I don't know if they're supposed to be there
[QUOTE=ThePuska;29343821][img_thumb]http://img30.imageshack.us/img30/5209/artifacts.png[/img_thumb]
I see a lot of artifacts which don't seem right
[editline]22nd April 2011[/editline]
I suppose they could just be some weird holes or something but I don't know if they're supposed to be there[/QUOTE]
That is at the end of a chunk, I'm not checking if in the adjacent chunk if the space is empty, so I just don't ender the side. I will fix it later :D
also sorry about the image ill make it into a thumb.
[QUOTE=NovembrDobby;29303560]well, that's that. At least I only had to wait a couple of weeks:
:eng99:[/QUOTE]Email fucking gaben, bro.
[QUOTE=Loli;29339936]Stranger shit has happened...
Like Rotation not being accepted on Steam. What the fuck is this shit?[/QUOTE]
I think it's called "Rotion"
[QUOTE=Richy19;29340941]Just give us a demo already :v:[/QUOTE]
I'm planning to make a video soon, the problem with releasing a demo is that there's nothing to do since I've only got 4 levels so far...
[QUOTE=Jawalt;29344673]Email fucking gaben, bro.[/QUOTE]
Just seems like nagging, and what's to say he'll read it
I think I sorted out all the features for my plugin.
I now just need to work on the MPxNode to make on-the-fly fracturing.
[media]http://www.youtube.com/watch?v=Xq_tbXFM3q4[/media]
[QUOTE=NovembrDobby;29344994]Just seems like nagging, and what's to say he'll read it[/QUOTE]
He says he reads every email, he just doesn't reply to all of them.
[QUOTE=NovembrDobby;29344994]Just seems like nagging, and what's to say he'll read it[/QUOTE]
Gaben reads all his emails.
[editline]21st April 2011[/editline]
:ninja:
Sorry, you need to Log In to post a reply to this thread.