I'm trying to get used to programming with the HGE engine.
Working on a befunge 93 interpreter in löve:
[img]http://img169.imageshack.us/img169/4459/bef01.png[/img]
File loading and saving:
[img]http://img820.imageshack.us/img820/812/bef02.png[/img]
Obligatory:
[img]http://img524.imageshack.us/img524/6008/bef03.png[/img]
Hunt the wumpus! :D
[img]http://img52.imageshack.us/img52/395/bef04.png[/img]
about 8 hours' work so far. Everything seems to work, but the interpreter seems incompatible with some programs due to ambiguities in the befunge specification - for instance, the behaviour of _ with an empty stack. It also crashes when you try to load a nonexistent file, but I can't see any way around that, seeing as love.filesystem.exist() seems only to check in the game's save directory :/
If anyone's interested, I can upload it. Befunge is probably my favourite language to play around with :)
Video is processed.
[media]http://youtube.com/watch?v=Z4tfBLz5uUM[/media]
[QUOTE=Dj-J3;25449768]Got a beta version of TextCraft that i want anyone who's interested in testing to test and report any bugs they encounter :buddy:
Can be downloaded at
- [url=http://filesmelt.com/dl/TextCraft.rar]Filesmelt[/url]
(Forgot to edit the shortcut, so just make your own shortcut with "devmode" as a parameter, or edit the current one to fit your current directory)
[release]
Some things you should know that i know before reporting any bugs:
- I know maximum stack property isn't working yet.
- ChanceToFind isn't working yet either, it's yet to be implented properly.
- You can add "RemoveOnCraft" property to your items manually, then either true or false. Will make the item dissapear(or not) when it's used in a crafting recipe. (I forgot to edit this into autocreation and devmode before uploading :sigh:)
- You can type "cancel" when creating new stuff in devmode to cancel creating an item/craftable. (Just haven't made this obvious yet)[/release][/QUOTE]
This. Is. Awesome.
Later on in development you should add modding support. So we can add our own functions and such.
[editline]17th October 2010[/editline]
Also there should be a function that we can call (like reloaditems) so we can reload items.txt.
And you should encrypt the save file so we can't cheat. :buddy:
Why is it that people with scout avatars feel the need to repost every fucking thing always
[QUOTE=Dj-J3;25460056]Reposting because of new page.[/QUOTE]
You should add support for needing a certain item in your inventory before you can find an item.
For example: needing a pick in your inventory before you can find iron.
[QUOTE=ThePuska;25468254]Why is it that people with scout avatars feel the need to repost every fucking thing always[/QUOTE]
:smug:
Did it because i wanted to be sure i'd get as much feedback as possible.
[editline]17th October 2010[/editline]
[QUOTE=MakeR;25468665]You should add support for needing a certain item in your inventory before you can find an item.
For example: needing a pick in your inventory before you can find iron.[/QUOTE]
Sounds good, i'll add it to my todo list.
[QUOTE=ThePuska;25468254]Why is it that people with scout avatars feel the need to repost every fucking thing always[/QUOTE]
why do people even have scout avatars?
[QUOTE=i300;25468143]This. Is. Awesome.
Later on in development you should add modding support. So we can add our own functions and such.
[editline]17th October 2010[/editline]
Also there should be a function that we can call (like reloaditems) so we can reload items.txt.
And you should encrypt the save file so we can't cheat. :buddy:[/QUOTE]
I thought about encrypting the save files, but i don't think it's worth the effort. If people want to cheat, they surely will find a way to do it sooner or later. It doesn't affect anyone but themselves anyways.
I'm gonna add a reloaditems command, or possibly update the items on every necessary command.
[QUOTE=iPope;25459984][img_thumb]http://dl.dropbox.com/u/11377079/platformer.png[/img_thumb]
I thought try to code some little platformer as a coding exercise and I'm glad I did. Even though I haven't touched pygame or game programming in like 3 months now I managed to solve one of the major problems I have always had - collision. I either couldn't get something that worked or I got something god awful slow. I took the god awful slow thing that worked, looked through it and I had been doing terrible things like looping through the whole array or objects, rather than stopping when just one collision had been found. So in conclusion, I feel pretty awesome for getting this working.[/QUOTE]
I beg you, please share the collision code, I'm still clueless after all these months of trying to get platform physics to work! Otherwise I'll get desperate and use a physics engine, which is totally not needed :crying:
[QUOTE=geel9;25467706]Video is processed.
[URL="http://www.facepunch.com/"]View YouTUBE video[/URL]
[URL]http://youtube.com/watch?v=Z4tfBLz5uUM[/URL]
[/QUOTE]
I sense a new fad...
[editline]17th October 2010[/editline]
[IMG]http://gyazo.com/78aa5dac80f3300fa8f5b3aa26899a65.png[/IMG]
Random text adventure/roguelike. Will have a decent GUI at some point. Thinking of turning it into a little MUD...
Edit: by random I mean random rooms NPCs etc. Not yet implemented, though.
[QUOTE=efeX;25468892]why do people even have scout avatars?[/QUOTE]
Why do people even have green avatars?
[QUOTE=Dj-J3;25469242]Why do people even have green avatars?[/QUOTE]
Hey, hey. We all know that efeX's avatar is awesome. True programmers art.
[QUOTE=Dj-J3;25468969]I thought about encrypting the save files, but i don't think it's worth the effort. If people want to cheat, they surely will find a way to do it sooner or later. It doesn't affect anyone but themselves anyways.
I'm gonna add a reloaditems command, or possibly update the items on every necessary command.[/QUOTE]
Meh, I guess you are right about that.
Also you should add a confirmation before you find.
Example:
[code]
Found stone! Do you want to mine it (Y/N)
Y
Mining stone... 4 sec remaining.
[/code]
But if you say no...
[code]
N
>
[/code]
And make it so the crafting structure is more like...
[code]
C{
ItemA=Stone
AmountA=3
ItemB=Wood
AmountB=1
NewItem=Pick
AmountN=1
}
[/code]
But I am sure you have already thought of something like this already.
[QUOTE=BlkDucky;25469165]I sense a new fad...
[editline]17th October 2010[/editline]
[img_thumb]http://gyazo.com/78aa5dac80f3300fa8f5b3aa26899a65.png[/img_thumb]
Random text adventure/roguelike. Will have a decent GUI at some point. Thinking of turning it into a little MUD...
Edit: by random I mean random rooms NPCs etc. Not yet implemented, though.[/QUOTE]
Take the text based element out and this could be awesome.
[QUOTE=iPope;25459984][img_thumb]http://dl.dropbox.com/u/11377079/platformer.png[/img_thumb]
I thought try to code some little platformer as a coding exercise and I'm glad I did. Even though I haven't touched pygame or game programming in like 3 months now I managed to solve one of the major problems I have always had - collision. I either couldn't get something that worked or I got something god awful slow. I took the god awful slow thing that worked, looked through it and I had been doing terrible things like looping through the whole array or objects, rather than stopping when just one collision had been found. So in conclusion, I feel pretty awesome for getting this working.[/QUOTE]
You could also split the map into a grid and check for collision on objects that are inside and adjacent to the grid tile you're currently inside to not loop through the ENTIRE list of objects you have in the map.
[QUOTE=Dlaor-guy;25469136]I beg you, please share the collision code, I'm still clueless after all these months of trying to get platform physics to work! Otherwise I'll get desperate and use a physics engine, which is totally not needed :crying:[/QUOTE]
I'd also love to see the code for this.
[QUOTE=BlkDucky;25469280]Hey, hey. We all know that efeX's avatar is awesome. True programmers art.[/QUOTE]
I was joking. :v:
[editline]17th October 2010[/editline]
[QUOTE=i300;25469345]Meh, I guess you are right about that.
Also you should add a confirmation before you find.
Example:
[code]
Found stone! Do you want to mine it (Y/N)
Y
Mining stone... 4 sec remaining.
[/code]
But if you say no...
[code]
N
>
[/code]
And make it so the crafting structure is more like...
[code]
C{
ItemA=Stone
AmountA=3
ItemB=Wood
AmountB=1
NewItem=Pick
AmountN=1
}
[/code]
But I am sure you have already thought of something like this already.[/QUOTE]
Thank you!
I didn't think about that crafting structure of yours. You just made another person very happy and saved him a couple of hours. :v:
Also, that idea of yours, i'll add it, it sounds good!
[QUOTE=iPope;25459984][img_thumb]http://dl.dropbox.com/u/11377079/platformer.png[/img_thumb]
I thought try to code some little platformerworking.[/QUOTE]
What a sweet little guy :3
-snip wrong subforum-
[editline]e[/editline]
oh god pageking
Writing an argument parser for my language's compiler implementation (I'm switching between my build system and compiler when I solve one problem for each).
It's being modeled around the Argparse module from python. It's not as elegant nor feature-full though.
So far its use is one of
[cpp]
#include <argparse/parser.hpp>
#include <argparse/argument.hpp>
#include <argparse/value.hpp>
#include <fstream>
#include <string>
#include <map>
int main(int argc, char* argv[])
{
argparse::parser parser('-', ':'); // These are the default leader and value delimiter characters.
parser.add_argument('o', "output").description("File to output").set_default("a.out");
parser.add_argument('f', "file").description("File to read from").set_default("test.ben");
parser.add_positional("directory").description("directory to run from").set_default(current_directory);
argparse::group group = parser.add_group("Resources", "Additional Resources");
group.add_file_arg("resource").description("additional resource files");
std::map<std::string, argparse::value> args = parser.parse_args(argc, argv);
std::ofstream output(static_cast<std::string>(args["output"]));
std::ifstream input(static_cast<std::string>(args["file"]));
return 0;
}
[/cpp]
And from the commandline, we would call it with
[code]
$ argparse -o:file.out -f:input.ben @resource:xfile.res ~/.bin
[/code]
You can also change the leader and value delimiter characters to / and = (so you can mix and match)
It's a bit .NET/Microsoftish in it's use, but it's much easier to parse than the -short, --long style. As long as I don't have to use Boost.ProgramOptions or templates, I'm happy.
You can cast the "argparse::value" type to one of std::vector<std::string>, std::string, bool, int64_t. As soon as it's finished I'll throw it up on github or bitbucket. Not sure which yet, but you'll be able to fork to your hearts content.
Whoop, just finished the first assignment of the "robot vision" course from my uni :P
Promising results, can't wait for the next assignment, hopefully it'll utilize these :D
[img_thumb]http://cubeupload.com/files/7bb76dkalib.jpg[/img_thumb]
[QUOTE=pikzen;25470034]-snip wrong subforum-
[editline]e[/editline]
oh god pageking[/QUOTE]
Wrong... subforum? How did this happen...?
Unless you thought you were in web development WAYWO...?
[QUOTE=BlkDucky;25472157]Wrong... subforum? How did this happen...?
Unless you thought you were in web development WAYWO...?[/QUOTE]
too much tabs + tired.
I thought I was in GD.
[editline]17th October 2010[/editline]
By the way, I just tried something: This outputs the text letter by letter. The problem is I'm using Thread.Sleep() to make it work, and that's not a good thing, considering if I use in an SFML program it'll fuck up everything. Should I use Timers, make a separate thread for it or even use black magic ?
[cpp]
static void Main(string[] args)
{
string text = "I don't know why I'm doing this. Hell, I don't even know if using System.Threading.Thread.Sleep() is a good idea.\n" +
"Oh well, fuck this shit. I'll do it how I like it. This doesn't have any particular interest, but well, that's nice.";
string text2 = "Does this work, by the way ? I guess it could make some kind of narration system or whatever";
string[] textarray = new string[2];
textarray[0] = text;
textarray[1] = text2;
NarrationTextConsole(textarray, 40);
Console.ReadLine();
}
static void NarrationTextConsole(string[] textarray, int sleeptime)
{
for (int j = 0; j < textarray.Length; j++)
{
for (int i = 0; i < textarray[j].Length; i++)
{
Console.Write(textarray[j][i]);
System.Threading.Thread.Sleep(sleeptime);
}
}
}
[/cpp]
Can anybody direct me to a good tutorial that shows how to dynamically load DirectX 9's index buffer in C++? I don't want to manually enter indices for every polygon I want to draw.
[QUOTE=pikzen;25472207]too much tabs + tired.
I thought I was in GD.
[editline]17th October 2010[/editline]
By the way, I just tried something: This outputs the text letter by letter. The problem is I'm using Thread.Sleep() to make it work, and that's not a good thing, considering if I use in an SFML program it'll fuck up everything. Should I use Timers, make a separate thread for it or even use black magic ?
[/QUOTE]
If you use SFML I assume it'll have some sort of main loop, you could increment an int every iteration until it reaches 10 or something, then reset it to 0 and print the next letter.
[b]edit:[/b] cool, a new reply box
I'm looking into implementing Voronoi tesselation in C#. Anybody has any simpler way than Fortune's algorithm? That shit is confusing.
[QUOTE=pikzen;25472207]
By the way, I just tried something: This outputs the text letter by letter. The problem is I'm using Thread.Sleep() to make it work, and that's not a good thing, considering if I use in an SFML program it'll fuck up everything. Should I use Timers, make a separate thread for it or even use black magic ?
[/QUOTE]
I just ported this to C++ and got weird characters on the screen :P it was pretty cool
[cpp]
#include <SFML/System.hpp>
#include <iostream>
#include <string>
using namespace std;
void NarrationTextConsole(string textarray[2], int sleeptime)
{
for (int f = 0; f < 1; f++)
{
for (int j = 0; j < textarray[f].length(); j++)
{
for (int i = 0; i < textarray[j].length(); i++)
{
cout << textarray[j][i];
//sf::Sleep(sleeptime);
}
}
}
}
int main()
{
string text = "I don't know why I'm doing this. Hell, I don't even know if using System.Threading.Thread.Sleep() is a good idea.";
string text2 = "Does this work, by the way ? I guess it could make some kind of narration system or whatever";
string textarray [2];
textarray[0] = text;
textarray[1] = text2;
NarrationTextConsole(textarray, 40);
int i = 0;
cin >> i;
return 0;
}
[/cpp]
btw if you un-comment sf::sleep you get a simple text editor somehow :S
[editline]18th October 2010[/editline]
[QUOTE=NovembrDobby;25474648]If you use SFML I assume it'll have some sort of main loop, you could increment an int every iteration until it reaches 10 or something, then reset it to 0 and print the next letter.
[b]edit:[/b] cool, a new reply box[/QUOTE]
its C#
[QUOTE=Borsty;25471756]Whoop, just finished the first assignment of the "robot vision" course from my uni :P
Promising results, can't wait for the next assignment, hopefully it'll utilize these :D
[img_thumb]http://cubeupload.com/files/7bb76dkalib.jpg[/img_thumb][/QUOTE]
holy damn is that delphi down there?
So it has been a long time since I posted about Zombie Outrage 2. But a quite a lot has been going on
[b]Engine Update[/b]
The engine had to be updated. For it was lacking in some areas.
[b]Features:[/b]
[list]
Time Step allowing entities to move at any pace. (half time, bullet time, double speed, whatever you set the variable)[/list]
[list]Better and Easier Clean up[/list]
[list]Draw, Input, and Step functions instead of one Step function for entities[/list]
[list]Draw, Input, Step, and Do All function for the world class[/list]
Particles
=====================================================
[b]Zombie Outrage 2: "Going Grey and Survival Fixes"[/b]
Colors of Zombie Outrage 2 didn't seem to clash well together. So I'm doing a grey look. I also fixed problems with the old survival mode when it came to lighting and escaping the enemies.
There's now borders blocking you from escaping the play area, forcing to to fight the horde.
There's also a spinning dynamic light in the center that shines, helping you see in the dark.
You can check it out for yourself here: [url]http://www.youtube.com/watch?v=RqnFU_vxJvE[/url]
[i]This update actually happened way back, it's sort of old news, but I never made an announcement...[/i]
===============================================================================
[b]A remade Game, lost freemode[/b]
I actually remade Zombie Outrage 2 from scratch when I went for the grey theme. But I didn't re-make free mode. I jumped straight to Survival. I'll try to get in in before the alpha release, but no promises.
===============================================================================
[b]ZO2: Multi Survival[/b]
With the newly gained experience of networking, I'm taking Zombie Outrage 2 online with friends. There's not too much to show, but here's some sneak peeks:
[img]http://i54.tinypic.com/14mqsgh.jpg[/img]
[img]http://i56.tinypic.com/ipp46p.jpg[/img]
[img]http://i55.tinypic.com/4smuzn.jpg[/img]
Sorry, you need to Log In to post a reply to this thread.