It might even be worth embedding lua into your C program so you can keep writing the lexer and parser in Lua and then drop back to C for the performance intensive bits (like the VM)
[QUOTE=swift and shift;34218383]yeah, but 'void' itself is nothing. You can't dereference void* because then you'd have nothing[/QUOTE]
void isn't nothing per se. At least in i386 architecture (and descendants), a void return type just means the EAX register (usually the register in which values are returned) can have whatever value when a procedure returns (and it a broader sense, it means a function can just return without providing a result).
By extension, void* can be regarded as a pointer to whatever. However, the point is moot because in C/C++ void and void* are distinct concepts which unfortunately use the same reserved word.
Semi-related rant: does anyone else find the difference between the C and C++ usage of static annoying?
[QUOTE=Jawalt;34218774]Writing my lexer and parser in Lua first, then porting to C. The interpreter itself will be written in C from the beginning.
It's so much easier to plan out flow and manipulate strings in a scripting language. And I am able to 'think' much easier in Lua, so writing it in Lua and then rewriting it in C with the same flow is a lot easier than just starting with C.[/QUOTE]
Why not use LuaJIT?
Most string operations and functions are Fast Functions, meaning they are JIT-compiled to the C equivalent (roughly).
[QUOTE=Deco Da Man;34219052]Why not use LuaJIT?
Most string operations and functions are Fast Functions, meaning they are JIT-compiled to the C equivalent (roughly).[/QUOTE]
Well, I'm writing the lexer and parser in Lua, and since LuaJIT is drop in, if the extra speed is necessary I can use that. But I don't see lexing and parsing being a bottleneck in a language devoid of most syntax.
[QUOTE=Jawalt;34219166]Well, I'm writing the lexer and parser in Lua, and since LuaJIT is drop in, if the extra speed is necessary I can use that. But I don't see lexing and parsing being a bottleneck in a language devoid of most syntax.[/QUOTE]
Parsing can still take time.
[editline]15th January 2012[/editline]
Especially since parsing is entirely CPU-bound once you've got the source code in memory
[editline]15th January 2012[/editline]
For example, Twostroke's parser takes just over a minute to parse a megabyte of input data
Whoever wrote LambdaMOO should feel proud
Base DB thing is basicly 1 room, and basic things
The database is a 2.2MB file
Everything is in [b]plaintext[/b] :suicide:
[editline]15th January 2012[/editline]
Oh god what the [b]fuck[/b]
When its saving the database, it [b]decompiles[/b] all MOOscript code and saves it
I'm thinking of getting an Android phone as a phone/development platform. What should I get? I really have no idea what my choices are, and I trust you guys to have a good opinion
My Galaxy Nexus arrived last week and made this after a couple of afternoons mucking about with Unity.
[IMG]http://i.imgur.com/hiKWV.png[/IMG]
Small coin-dropper game you see in arcades sometimes. The middle square of pegs rotates, and you can only have 5 on screen at once. Not much to do in it, but it was mainly to get used to it, and stress test the phone.
Currently going through all the tutorials on the android developer guide too.
I think I got this whole Git/Hg branch stuff now:
The Git branches are essentially bookmarked head revisions in Hg:
Git apparently deletes unnamed head revisions, while Hg uses them with bookmarks for short-term branches.
Branches in Hg can't be deleted, only hidden, and the names can't be reused (for new branches or bookmarks. It should be possible to reuse the branch, but that will most likely mess up the revision graph).
Pushing Hg branches to Git turns them into commit comments on the branch that matches the current Hg bookmark.
At least it's possible to repair this by fixing the bookmarks and pushing with --force.
Hg bookmarks can contain spaces, wich Git branches apparently cannot.
[URL="https://github.com/octocat/Spoon-Knife/blob/master/forkit.gif"]Somehow, this is both cute and disturbing[/URL]:
[IMG]https://github.com/octocat/Spoon-Knife/blob/master/forkit.gif?raw=true[/IMG]
Hot forking action
[editline]15th January 2012[/editline]
I've been messing around with ComputerCraft, it's basically a minecraft mod that adds terminals which run lua.
I've already got my piles of extension libraries loading, now I just need to figure out where require is looking so I can load binaries
[QUOTE=Nighley;34214901]btw my horrible win 7 mobile phone game got accepted with my first try *shocked*
[url]http://www.windowsphone.com/de-CH/apps/d9cdf783-da69-49a0-9238-46d19509aeb2[/url]
for free, thus you waste nothing else than a few seconds of installing, testing, hating and removing it (in this order) ;p[/QUOTE]
Works fine on my Lumia 800. It would be better with some sounds, and it might be cool if you could somehow make use of the accelerometer.
[IMG]http://i.imgur.com/9LR6J.png[/IMG]
Open GL time!
Goody, I have unrestricted (I think) access to java with little to no work thanks to ComputerCraft.
If you go into the config file you can enable access to luajava, and then do whatever from there
That was fun. One of my friends got his Steam account stolen, and it's now being used for spreading malware.
[code]10:35 - pLASTiiC*: Hey, just coded my own CSS wallhack, can you help me test it
10:35 - pLASTiiC*: ?
10:35 - pLASTiiC*: no one else wants to test it...
10:37 - pollyzoid: hmm
10:37 - pollyzoid: in a bit, sure
10:37 - pollyzoid: I'll test my own as well
10:37 - pLASTiiC*: But i want you to test mine to...
10:37 - pLASTiiC*: so i know for sure it works
10:37 - pollyzoid: oh, on my computer?
10:38 - pLASTiiC*: yeah, but you can test yours after
10:38 - pLASTiiC*: but i want to test mine first
10:41 - pLASTiiC*: so what do you say?
10:41 - pollyzoid: sure, I'll just play couple more rounds
10:41 - pollyzoid: few mins
10:42 - pLASTiiC*: Allright
10:42 - pLASTiiC*: take your time, just wanna know that we are going to test it
10:42 - pLASTiiC*: becuse everybody just says ''I dont want to get my ass banned''
10:43 - pollyzoid: as long as it's not a VAC server :V
10:43 - pollyzoid: I only trust my own hack
10:43 - pLASTiiC*: allright
10:43 - pLASTiiC*: we can test it on a non VAC
10:49 - pollyzoid: alright, send it over?
10:50 - pLASTiiC*: can you just wait a sec
10:51 - pLASTiiC*: got something to do first
10:51 - pLASTiiC*: ok?
10:51 - pollyzoid: k
10:51 - pLASTiiC*: thnx
10:58 - pLASTiiC*: uploading now...
10:59 - pLASTiiC*: you there?
10:59 - pollyzoid: yeah
11:00 - pLASTiiC*: allright
11:00 - pLASTiiC*: so should i help you over TV or can you do it your self?
11:00 - pollyzoid: I can probably do it myself
11:01 - pLASTiiC*: -snap-
11:01 - pLASTiiC*: allright
11:01 - pLASTiiC*: first you wanna download that
11:01 - pLASTiiC*: then put it on your desktop
11:01 - pLASTiiC*: first run CSS
11:01 - pLASTiiC*: then load the aimbot
11:01 - pLASTiiC*: and it should come up in the console
11:01 - pLASTiiC*: saying that it was loaded
11:06 - pollyzoid: ahaha fuck you
11:06 - pLASTiiC*: ?
11:06 - pLASTiiC*: what?
11:07 - pollyzoid: string s = new ResourceManager("ericsson", Assembly.GetExecutingAssembly()).GetString(name);
return MbPnicXLQcALRkR(Encoding.Default.GetBytes(s), "SayHardCoreTrooll");
11:07 - pollyzoid: the fuck is this
11:08 - pLASTiiC*: Wait what?
11:09 - pLASTiiC*: Dude what is the problem?
pLASTiiC* is now Offline.
pLASTiiC* is now Online.
11:26 - pLASTiiC*: Hey, yestorday i created my own CSS aimbot. undetected! Would you like to test it with me`?
11:26 - pollyzoid: hijacking accounts isn't nice, you know
11:26 - pLASTiiC*: what?
11:26 - pLASTiiC*: i dont hack?
11:26 - pollyzoid: and spreading password stealers
11:26 - pollyzoid: bummybumbum indeed
11:27 - pollyzoid: you should know that hacks are never .exe files
11:27 - pollyzoid: also, you already talked to me
11:27 - pLASTiiC*: Yes there is .exe
11:28 - pollyzoid: thanks for the .exe though, it's fun reading it
11:28 - pLASTiiC*: Allright
11:28 - pLASTiiC*: Wanna help spread it?
11:28 - pollyzoid: no, fuck you
11:28 - pLASTiiC*: FUCK YOU
11:28 - pollyzoid: <3
11:28 - pLASTiiC*: wats you mail?
11:29 - pollyzoid: let's see
11:29 - pollyzoid: [email]rabbishpolly@gmail.com[/email] is one
11:29 - pLASTiiC*: That one you use to steam
11:29 - pollyzoid: it's that one
11:29 - pLASTiiC*: fuck you
11:30 - pollyzoid: daww
[/code]
The programming content:
I downloaded and disassembled the whole thing. The initial .exe was a .NET assembly containing two encrypted strings as resources. First it decrypted and loaded the first one as an assembly, then called one of the functions with the decrypted second one as the parameter. The first assembly was used to running arbitrary MSIL and/or PE data, the second one loaded yet another encrypted resource, which in turn wrote another encrypted resource as a .exe in temp folder. That one loaded YET another resource, which wrote the first loader's path into startup registry. The whole thing was apparently used for injecting into applications and stealing passwords, and continuously launching itself. Two of the assemblies triggered MSE: Worm:Win32/Ainslot.J and VirTool:MSIL/Injector.gen!A.
The fun part? It was all Visual Basic .NET.
[QUOTE=Guru-guru;34221050][IMG]http://i.imgur.com/9LR6J.png[/IMG]
Open GL time![/QUOTE]
Cool, but the annotation in your video ain't working.
[QUOTE=Guru-guru;34221050][IMG]http://i.imgur.com/9LR6J.png[/IMG]
Open GL time![/QUOTE]
That is.. well... awesome.
It's fun when errors look awesome.
[img]http://i.imgur.com/DJa2F.png[/img]
I've been quite caught up with other things taking away my programming time, but I have managed to fully rewrite the old code, and replace it with neater, newer code which also contains a lovely AssetManager and other things nobody but me could care about. The game also now uses spritesheets for Tile/BGTile textures.
So, new forest biomes, new vines, new trees, new cavity generation logic, new lighting, new AssetManager, new tallgrass, new spritesheet support, neater code, better performance, faster worldgen and simple GUI elements.
Here's an image of the new forest worldgen (without water or lava) with lighting on and off (thanks Paint.NET), suggestions are welcome!
[img]http://img85.imageshack.us/img85/2658/sotalightingcompa.png[/img]
Now time to get to work on other biomes.
Oh, and for those who don't know, the game is called "Seeds of the Ancients". It's going to be a multiplayer game where you fight against enemies in randomly generated terrain, in which the Tiles are affected by simple powder physics (play the powder game if you want to know what I'm talking about).
[QUOTE=Guru-guru;34221050][IMG]http://i.imgur.com/9LR6J.png[/IMG]
Open GL time![/QUOTE]
I wouldn't mind playing a game which has exactly this artstyle. (Just needs more anti-aliasing)
[img]http://i.imgur.com/BMB4s.gif[/img]
Working on the castle repeats. It puts the blocks into the middle of the map, so if I turn it off, it resumes to the original map (those pipes). The problem is that the physic objects don't get moved for the repeat properly yet, so I'll have to look into that.
[editline].[/editline]
Fixed, yay.
[img]http://i.imgur.com/0JiQz.png[/img]
Working on raytracing. Thought this was kinda cool:
[thumb]http://i40.tinypic.com/9k2zdj.png[/thumb]
Runs smoothly, though for some reason it goes to hell in the negative octants. Here's the WebGL link.
[url]http://glsl.heroku.com/e#1187.11[/url]
Feel like making some sort of roguelike, I got this.
[url]http://pastebin.com/ehf0VfUq[/url]
How bad is the code? :v:
[img]http://puu.sh/dtI6[/img]
Uh, time to fix it all and use CLASSES!
[QUOTE=C:\;34223180]Feel like making some sort of roguelike, I got this.
[url]http://pastebin.com/ehf0VfUq[/url]
How bad is the code? :v:[/QUOTE]
Just my 2 cents:
- Map data from file would be better than hardcoded
- Create Rectangles within the draw loop is computational expensive, I see that you included
the camera position there, but you could just create a translation matrix and use the spritebatch.begin(...) overload with the matrix parameter.
- maybe tilsize constant as it shouldn't be changed anyway during runtime.
- cam movement should be time dependant, thus create a camspeed and multiply it by the elapsedtime
Thanks.
oh and you may have noticed that your diagonal speed is faster than horizontal/vertical you should make sure that you don't modify the camera position multiple times when pressing two buttons
either create multiple conditions (as left+up, right+up etc.) or a more nicer approach create a bitmask like
up = 1,
left = 2,
down = 4,
right = 8
sum up the pressed buttons
and a switch statement
1 = up
2 = left
3 = upleft
4 = down
5 = no movement
6 = downleft
etc. you get the picture
Rendering shadows by projecting lines from the light-source through the model's vertices onto the shadow plane.
[t]http://i.imgur.com/PCsFF.png[/t]
[t]http://i.imgur.com/84bhR.png[/t]
Acctually made a landscape with "voxels" fully rendered on the GPU:
[IMG]http://i42.tinypic.com/2u6kbqf.png[/IMG]
(Credited mostly to Matte, who posted a little further up)
Next up: Loading data from RAM to the graphics card
[QUOTE=sondre99v;34224512]Acctually made a landscape with "voxels" fully rendered on the GPU:
[IMG]http://i42.tinypic.com/2u6kbqf.png[/IMG]
(Credited mostly to Matte, who posted a little further up)
Next up: Loading data from RAM to the graphics card[/QUOTE]
There are a fair amount of artifacts, though. Still working out the kinks. But it is pretty cool nonetheless.
The landscape isn't just traced, it's also generated every frame :v:
[QUOTE=origamiguy;34224212]Rendering shadows by projecting lines from the light-source through the model's vertices onto the shadow plane.
[t]http://i.imgur.com/PCsFF.png[/t]
[t]http://i.imgur.com/84bhR.png[/t][/QUOTE]
Aren't those just stencil shadows?
[QUOTE=Parad0x0217;34224813]Aren't those just stencil shadows?[/QUOTE]
Yeah, it is. Only he's rendering the shadow outline manually.
Sorry, you need to Log In to post a reply to this thread.