[media]http://www.youtube.com/watch?v=Ij6zaDrHqc0[/media]
TF2 RPG in Sourcemod!
What we (Mecha the Slag, me and a few others) have so far:
-NPC Actor files (base files that describe the appearance and sound of an actor)
-NPC Character files (Files that lay out the position, name, the actor the character uses, and the lines the character can say (interactions))
-Party side variables (Variables that can be accessed party-side)
-Very basic enemies (A medic that runs around and dies on hit)
-Variable conditionals.
An example of variable conditions
[code]
//Create a variable with the name "testVar" and the value 20.
sm_createVar testVar 20
//Test the variable using a conditional
sm_conditional "IFVARIABLE:testVar >= 20"
//Output:
true
[/code]
Obviously, the players won't have access to the variables through such commands. They will actually be found mainly in the Character files, as conditionals for what line to display.
-Maps (Just basic information about what map they're on, the name (E.G. "The Goldrush Plains") etc)
-A camera system (We can control the camera of the player, used when talking to NPCs)
We have a public SVN Repository (read only). Check it out [url=http://www.assembla.com/code/tf2-adventure/subversion/nodes]Here[/url]
I'm at a crossroads, can't work out what the best course of action would be for my heatmap stuff.
Currently, what I have is, get the server to do log on; logaddress_add etc which essentially sends each event to my server in UDP packets. I have an application that listens for these, picks them up and handles them, inserting the appropriate stuff into the database. This is good because although it might be possible to abuse it, I can easily have a whitelist and dismiss any packets from people I don't know/lines that are fake. One of the problems with this is there's not all information I can get and people might not want to point their logs at me.
One other alternative (and one I would like to do) is have sourcemod handle it. It can do SQL queries and could insert into the database directly. I would be able to get a lot more specific data. The downside is, I don't know how I'm going to protect the database information. It would work if I had a user that only had insert only rights and made the plugin use that... but if someone got that information couldn't they easily spam the database? I don't believe sourcemod plugins are [i]easily[/i] able to be decompiled but I don't know. It's also part of the licence of sourcemod plugins to provide the source too but I could easily remove the login details...
hlep
[QUOTE=Jimbomcb;28866584]I'm at a crossroads, can't work out what the best course of action would be for my heatmap stuff.
Currently, what I have is, get the server to do log on; logaddress_add etc which essentially sends each event to my server in UDP packets. I have an application that listens for these, picks them up and handles them, inserting the appropriate stuff into the database. This is good because although it might be possible to abuse it, I can easily have a whitelist and dismiss any packets from people I don't know/lines that are fake. One of the problems with this is there's not all information I can get and people might not want to point their logs at me.
One other alternative (and one I would like to do) is have sourcemod handle it. It can do SQL queries and could insert into the database directly. I would be able to get a lot more specific data. The downside is, I don't know how I'm going to protect the database information. It would work if I had a user that only had insert only rights and made the plugin use that... but if someone got that information couldn't they easily spam the database? I don't believe sourcemod plugins are [i]easily[/i] able to be decompiled but I don't know. It's also part of the licence of sourcemod plugins to provide the source too but I could easily remove the login details...
hlep[/QUOTE]
Sourcemod plugins can't be decompiled.
[editline]29th March 2011[/editline]
Scratch that: It can't decompile code, but it can decompile strings and method names and whatnot.
i know
[media]http://i.imgur.com/u2wlC.png[/media]
[QUOTE=BlkDucky;28865333]Somewhere in the Creationism Corner, I guess.[/QUOTE]
To clarify: I meant this assuming C:\ was correct. Which he's not, since AgentBoomstick was working on assets for a game he is presumably programming.
[QUOTE=C:\;28865628]You posted MUSIC and there is a MUSIC section.[/QUOTE]
And, no. That would be the wrong section.
[img]http://gyazo.com/3a59b67aa185b2b1f1b229d3e02c3f53.png[/img]
> Musician's Gig Room
ah finally. That's pretty neat.
[editline]29th March 2011[/editline]
@heatmaps
@Jimbomcb: Couldn't you do a mixture of the two? Have a whitelist of IPs from which your database will accept queries, and then have sourcemod or what ever installed on the server so that way even if people did get the info, only the queries coming from the whitelisted IPs would be accepted? I don't know if SQL can do this, but I would be surprised if it couldn't.
using the code I have for this heatmap stuff, I have another idea brewing. It's pretty pointless but should be fun, it would basically be a live map of a payload map. I can convert ingame positions to the map so it shouldn't be hard to grab the X/Y of the cart and plot it on a map and watch it roll through the map. Should be easy to do it with players too.. I'm thinking little class icons running about the map, should be interesting.
[editline]29th March 2011[/editline]
[QUOTE=NeoDement;28866754]ah finally. That's pretty neat.
[editline]29th March 2011[/editline]
@heatmaps[/QUOTE]
what's even better is the fact that it renders quickly and I have the teams, weapons etc information in the database, so it shouldn't be hard to pick a few checkboxes and for example generate a heatmap of red snipers or blue sentry guns etc
[editline]29th March 2011[/editline]
[QUOTE=bobthe2lol;28866761]@Jimbomcb: Couldn't you do a mixture of the two? Have a whitelist of IPs from which your database will accept queries, and then have sourcemod or what ever installed on the server so that way even if people did get the info, only the queries coming from the whitelisted IPs would be accepted? I don't know if SQL can do this, but I would be surprised if it couldn't.[/QUOTE]
That's probably the best idea. I'm not very knowledgeable with mysql but I remember seeing the ability to set a max number of queries per time... i suppose if i can essentially only allow certain hosts which I know is possible and maybe limit the queries too then that's the best choice! thanks
That'd be pretty cool, you could quickly glance at something like that to see exactly why your teams strategy sucks heh
[QUOTE=Moustach3;28866422][media]http://www.youtube.com/watch?v=Ij6zaDrHqc0[/media]
TF2 RPG in Sourcemod!
What we (Mecha the Slag, me and a few others) have so far:
-NPC Actor files (base files that describe the appearance and sound of an actor)
-NPC Character files (Files that lay out the position, name, the actor the character uses, and the lines the character can say (interactions))
-Party side variables (Variables that can be accessed party-side)
-Very basic enemies (A medic that runs around and dies on hit)
-Variable conditionals.
An example of variable conditions
[code]
//Create a variable with the name "testVar" and the value 20.
sm_createVar testVar 20
//Test the variable using a conditional
sm_conditional "IFVARIABLE:testVar >= 20"
//Output:
true
[/code]
Obviously, the players won't have access to the variables through such commands. They will actually be found mainly in the Character files, as conditionals for what line to display.
-Maps (Just basic information about what map they're on, the name (E.G. "The Goldrush Plains") etc)
-A camera system (We can control the camera of the player, used when talking to NPCs)
We have a public SVN Repository (read only). Check it out [url=http://www.assembla.com/code/tf2-adventure/subversion/nodes]Here[/url][/QUOTE]
Reposting for page peasant
I've never understood why people repost stuff for new pages. It's not like we skip over them if it was near the bottom of a page.
Well it may be not be a huge issue with a slower moving thread like this, but something that's posted at the end of page gets less views simply because it's on the latest page (the page people are scrolling around) for less time than if it had been posted at the beginning of the page.
Maybe you read each post methodically, but I think in general, posts can be skimmed over or missed, and if the page turns over, they lost their chance.
Trying to learn C++, it's pretty simple so far, I'm really happy with the tutorial I found. A comment said I shouldn't be using "using namespace ___" and that I should be using "___::function", is this better practice?
ex:
[code]
#include"stdafx.h"
#include <iostream>
int main()
{
std::cout << "Hello world!" ;
std::cin.get();
return 0;
}
[/code]
instead of
[code]
#include"stdafx.h"
#include <iostream>
using namespace std
int main()
{
cout << "Hello world!" ;
cin.get();
return 0;
}
[/code]
[QUOTE=high;28866093]Did you miss the thread title? "What are you working on?"
He is working on music and art for his game and wants to share it. What makes that so wrong for this thread?
Don't bring yourself down like that. Also the music sounds great.[/QUOTE]
-Sorry I am retard-
[QUOTE=Biotoxsin;28867365]Trying to learn C++, it's pretty simple so far, I'm really happy with the tutorial I found. A comment said I shouldn't be using "using namespace ___" and that I should be using "___::function", is this better practice?[/QUOTE]
Yes, unless you're using something like AsmJit and you have "AsmJit::" everywhere.
[QUOTE=BlkDucky;28866740]To clarify: I meant this assuming C:\ was correct. Which he's not, since AgentBoomstick was working on assets for a game he is presumably programming.
And, no. That would be the wrong section.
[img_thumb]http://gyazo.com/3a59b67aa185b2b1f1b229d3e02c3f53.png[/img_thumb]
> Musician's Gig Room[/QUOTE]
Nevermind I'm fucking retarded sorry guys, I am used to there being a music section sorry.
[QUOTE=C:\;28867471]The music sounds great, yes. But this is the [b]PROGRAMMING[/b] section, Music isn't programming, is it?[/QUOTE]
If your main aim is to decrease the amount of off-topic posts then why don't you just fucking drop it instead of pointing out every time (assuming you are deloc..) when someone posts something a little bit off topic. This just leads to 10+ more shit posts (this post included) about whether or not it should have been posted in this thread - surely defeating your original goal.
[QUOTE=r4nk_;28867569]If your main aim is to decrease the amount of off-topic posts then why don't you just fucking drop it instead of pointing out every time (assuming you are deloc..) when someone posts something a little bit off topic. This just leads to 10+ more shit posts (this post included) about whether or not it should have been posted in this thread - surely defeating your original goal.[/QUOTE]
Not really my goal, but whatever floats your boat!
I'm working on a webserver, and so far I have html sending, file downloading, 404 errors, and images working properly. :buddy:
[url]http://dehodson.no-ip.org/[/url] (It's not my server that's slow, it's my connection :smith:)
Next up: GET, POST, and dynamic pages!
Ugh, I've been having shitty bad today with my RPG game. I might have to work on some of the system/engine stuff again, it's not a stable as I expected it to be.
Though I'm amazed it held out, it did what I intended it to do, now I'm trying to do other stuff it wasn't made for, which requires a change of course. : P
[QUOTE=Dehodson;28867636]I'm working on a webserver, and so far I have html sending, file downloading, 404 errors, and images working properly. :buddy:
[url]http://dehodson.no-ip.org/[/url] (It's not my server that's slow, it's my connection :smith:)
Next up: GET, POST, and dynamic pages![/QUOTE]
nope.avi
oh you
[QUOTE=Biotoxsin;28867365]Trying to learn C++, it's pretty simple so far, I'm really happy with the tutorial I found. A comment said I shouldn't be using "using namespace ___" and that I should be using "___::function", is this better practice?
ex:
[code]
#include"stdafx.h"
#include <iostream>
int main()
{
std::cout << "Hello world!" ;
std::cin.get();
return 0;
}
[/code]
instead of
[code]
#include"stdafx.h"
#include <iostream>
using namespace std
int main()
{
cout << "Hello world!" ;
cin.get();
return 0;
}
[/code][/QUOTE]
It's good practice to keep out the using namespace for the standard libraries. Rather, use it when you explore other libraries with heavy namespace useage like boost or when you make your own namespaces to save you from using so much text in your code.
For example if you have a namespace like [B]EntityEngine[/B], you do [B]using namespace EntityEngine;[/B] so that you don't have to do [B]EntityEngine::[/B] ... everywhere to access it's stuff.
[QUOTE=Tamschi;28856464]I really should stop posting after midnight, everything I write starts to degrade into nonsense when I'm tired. I graduated two days ago and still haven't caught up on sleep.
On the topic of Java vs. C#:
It's really difficult to find good comparisons.
[url=http://www.javacamp.org/javavscsharp/]This code comparison[/url] seems to be less biased than usual overall, though the unsafe keyword becomes
(It's a bit outdated, so there's no LINQ or lambda syntax, I think.)
I used Java at school and for work and I usually use C# for my own projects. Personally, I prefer C# because of certain syntax features like properties and implicit enumerators and because it let's me do everything I want without too much hassle.
The most tedious part of learning a new language are usually the libraries. I can read and write basic Java, C++ and C# about the same speed, but once I have to use a library I'm much faster in C# because I've memorized the most important CLR classes by now.
Another point are the compile and startup times, wich are usually lower in C#.[/QUOTE]
I know I'm late, but 'less biased'? [b]Are you kidding?[/b]
Here's his Java:
[code]
import java.awt.event.ActionListener;
public class Form1 extends java.awt.Frame implements ActionListener {
java.awt.Button button1 = new Button();
public void actionPerformed(ActionEvent ae) {
System.out.println("button1 was clicked!");
}
button1.addActionListener(this);
...
}
[/code]
And here's his C#:
[csharp]
public delegate void EventHandler(object sender, System.EventArgs e);
public class Button
{
private EventHandler handler;
public event EventHandler Click {
add { handler += value; }
remove { handler -= value; }
}
}
public class Form1
{
public Form1() {
// Add Button1_Click as an event handler for Button1's Click event
Button1.Click += new EventHandler(Button1_Click);
}
Button Button1 = new Button();
void Button1_Click(object sender, EventArgs e) {
Console.WriteLine("Button1 was clicked!");
}
public void Disconnect() {
Button1.Click -= new EventHandler(Button1_Click);
}
}
[/csharp]
:wtc:
[url]http://www.javacamp.org/javavscsharp/eventhandler.html[/url]
2 days from release, we're really far behind, but we're also finding some funny little gems in our code... when we first started we had a hardcoded level. I don't even know how I didn't trip on the parenthesis here, as I remember it compiled the first time. meh...
[csharp]for (int i = 0; i < tileset.length; i++)
{
for (int j = 0; j < tileset[0].length; j++)
{
tileset[i][j] = new Tile(Tile.TILE_SIZE_F, j, i, tileset[0].length - 1, tileset.length - 1);
tileset[i][j].enableTilesetMode(tilesetworld, 0, 0);
if (i == 0 || j == 0 || i == tileset.length - 1 || j == tileset[0].length - 1 || (i < 4 && (j < 4 || j > 8)) || (i == 10 && j != 6) || (i > 10 && (j < 4 || j > 8)))
{
tileset[i][j].setAsWall();
}
else if (i == 4 || i == 5 || (i == 6 || i == 9 || i == 10) && (j < 4 || j > 8) || (i == 7 || i == 8) && (j < 3 || j > 9))
{
tileset[i][j].setAsPit();
}
else
{
tileset[i][j].setAsFloor();
}
}
}[/csharp]
[QUOTE=bobthe2lol;28864705]Anyone know if its possible to get SFML working with mono(develop)? If not, are there other libraries that do? Sorry about the no-content/question post.[/QUOTE]Afaik it's possible. I think Blendo Games did it to develop Atom Zombie Smasher.
[img]http://f.anyhub.net/2kXm[/img]
[QUOTE=Tangara;28869302]I know I'm late, but 'less biased'? [b]Are you kidding?[/b]
Here's his Java:
[code]
import java.awt.event.ActionListener;
public class Form1 extends java.awt.Frame implements ActionListener {
java.awt.Button button1 = new Button();
public void actionPerformed(ActionEvent ae) {
System.out.println("button1 was clicked!");
}
button1.addActionListener(this);
...
}
[/code]
And here's his C#:
[csharp]
public delegate void EventHandler(object sender, System.EventArgs e);
public class Button
{
private EventHandler handler;
public event EventHandler Click {
add { handler += value; }
remove { handler -= value; }
}
}
public class Form1
{
public Form1() {
// Add Button1_Click as an event handler for Button1's Click event
Button1.Click += new EventHandler(Button1_Click);
}
Button Button1 = new Button();
void Button1_Click(object sender, EventArgs e) {
Console.WriteLine("Button1 was clicked!");
}
public void Disconnect() {
Button1.Click -= new EventHandler(Button1_Click);
}
}
[/csharp]
:wtc:
[url]http://www.javacamp.org/javavscsharp/eventhandler.html[/url][/QUOTE]
Wow, that's unbelievably biased.
Just bought a suite of new domains to develop over the next few days, browsing VPS and dedicated solutions currently.
Also added adwords to my site to see how that goes.
[QUOTE=SCopE5000;28871318]Just bought a suite of new domains to develop over the next few days, browsing VPS and dedicated solutions currently.
Also added adwords to my site to see how that goes.[/QUOTE]
Wrong thread?
[QUOTE=ZenX2;28866281]C:\ is deloc.[/QUOTE]
shit, i guess i didn't make it obvious enough.
Sorry, you need to Log In to post a reply to this thread.