[QUOTE=sim642;28908709]I just remembered that there were Facepunch Code Golf Competitions a while ago. I wish they continued...[/QUOTE]
suggestions are appreciated. i remember some idea about simulating a certain number of steps of a game of life state.
Woo! Finally! I had been trying to implement lua for some time now, and get a decent system in place that allowed for awesome modability with decent speeds.
Before I had implemented the basics of lua, but had a hard time getting an entity system in place, since I hadn't really had an extensive knowledge in lua.
But I finally got that done, but very high entity counts, upwards of 20,000, were very VERY slow, so I had to dip my hands into multi-threading for the very first time, I think I understand it, but I'm still a little nervous using it. But what I did get done GREATLY increased my speeds from 3 - 11 FPS to 1900 - 2000 FPS, where my average, with nothing on the screen, was about 2100 - 2400. Not bad I'd say.
Here's what a simple entity with movement looks like in my implementation:
[code]
-- Player
Player = System_Entity_Type()
function Create(sender, e)
sender:SetPosition(200, 100)
sender:SetTexture("player")
end
function Destroy(sender, e)
sender:SetColor(255, 0, 0, 255)
end
function Update(sender, e)
if Key(119) then sender:SetVelocity(sender:GetVelocity().X, -0.001)
elseif Key(115) then sender:SetVelocity(sender:GetVelocity().X, 0.001)
else sender:SetVelocity(sender:GetVelocity().X, 0) end
if Key(97) then sender:SetVelocity(-0.001, sender:GetVelocity().Y)
elseif Key(100) then sender:SetVelocity(0.001, sender:GetVelocity().Y)
else sender:SetVelocity(0, sender:GetVelocity().Y) end
if Key(277) then sender:ModHealth(-0.01) end
end
Player.Created:Add(Create)
Player.Destroyed:Add(Destroy)
Player.Updated:Add(Update)
Add(0, Player)
[/code]
[QUOTE=Spacetech;28910702]I've been working on something for the past couple days and thought some of you might like it.
I basically coded a program that allows you to use steam chat from your phone via text messages. It uses Google Voice that acts as a relay to send the messages between your phone and steam chat.
[img_thumb]http://img690.imageshack.us/img690/2346/img0009jm.jpg[/img_thumb]
[img_thumb]http://img43.imageshack.us/img43/7743/img0007efs.jpg[/img_thumb]
[img_thumb]http://img840.imageshack.us/img840/9169/img0006gq.jpg[/img_thumb]
[img_thumb]http://img710.imageshack.us/img710/2079/img0005yi.jpg[/img_thumb]
I coded it in C++ with the boost, jsoncpp, curl, tinyxml, and Open Steamworks libraries, plus my own Google Voice library. This was my first time actually compiling and making my own libraries so learned a lot and I'm happy with the results. All you need is a Google Voice account (which is free) and a cell phone with text messaging.
Right now I have it reading the account info and the cell phone number you want to use it with from a simple text file. I'm still testing it and I plan on releasing it soon.[/QUOTE]
xmpp bridge would be a wiser idea.
I've been learning C++ using the xoax.net C++ video tutorials. It was pretty easy at first making 'Tic Tac Toe' games and learning basic functions and stuff. Now, on the tutorial right after 'Basic Functions' I've got 'Perceptron Training'.
:suicide:
He started talking about neural networks and vectors and drawing complex-looking graphs. I don't even understand the math involved yet. :supaburn: Am I missing something? Am I the only one who doesn't understand this? Here's the link to the tutorial: [url]http://xoax.net/comp/cpp/console/Lesson13.php[/url]
Can anyone give me any hints?
[QUOTE=DeadKiller987;28915078]I've been learning C++ using the xoax.net C++ video tutorials. It was pretty easy at first making 'Tic Tac Toe' games and learning basic functions and stuff. Now, on the tutorial right after 'Basic Functions' I've got 'Perceptron Training'.
:suicide:
He started talking about neural networks and vectors and drawing complex-looking graphs. I don't even understand the math involved yet. :supaburn: Am I missing something? Am I the only one who doesn't understand this? Here's the link to the tutorial: [url]http://xoax.net/comp/cpp/console/Lesson13.php[/url]
Can anyone give me any hints?[/QUOTE]
Looks like the simple stuff continues after that, just skip it.
[QUOTE=esalaka;28915241]Looks like the simple stuff continues after that, just skip it.[/QUOTE]
But... Won't I lose important knowledge? Or should I just come back to it later?
[QUOTE=DeadKiller987;28915284]But... Won't I lose important knowledge? Or should I just come back to it later?[/QUOTE]
Understanding Perceptrons, neural networks and training algorithms arn't important if your goal is to learn C++. Implementing them is just being used as an example project like any other (tic tac toe).
[QUOTE=DeadKiller987;28915284]come back to it later[/QUOTE]
Object orientation works:
[img]http://i55.tinypic.com/vf9jrm.png[/img]
Next up, inheritance. Shouldn't be hard to do.
Then add some drawing bindings.
Another venture into perlin noise, and my image library ive been writing
[IMG]http://i54.tinypic.com/2mopdw2.png[/IMG]
Edit:
I should probably have edited out the blackness, but this is just a screenshot
Edit 2:
A little background might help, this is meant to be a planet for some sort of spacey thing im doing, where the brown represents some form of usable mineral (probably iron)
I need to fix it a little :v:
Edit 3: (really necessary?)
Fixed it a little :v:
[IMG]http://i56.tinypic.com/288p5k2.png[/IMG]
[img]http://i56.tinypic.com/96gh05.png[/img]
Hurrah!
[editline]31st March 2011[/editline]
[img_thumb]http://i51.tinypic.com/29pxhtt.png[/img_thumb]
This also works. How nice :D
[QUOTE=Darwin226;28917140][img_thumb]http://i56.tinypic.com/96gh05.png[/img_thumb]
Hurrah!
[editline]31st March 2011[/editline]
[img_thumb]http://i51.tinypic.com/29pxhtt.png[/img_thumb]
This also works. How nice :D[/QUOTE]
What are we looking at?
[QUOTE=Jallen;28918356]What are we looking at?[/QUOTE]
His scripting language I believe.
[QUOTE=somescripter;28918447]His scripting language I believe.[/QUOTE]
I thought that, but we haven't seen anything of it (I think) and it looks a bit advanced to have been started very recently.
Started and finished the CS exporter for my editor today
Not much to show as its mainly all code, iguess i could post the output to a simple map if anyone is interested.
[QUOTE=Jallen;28918500]I thought that, but we haven't seen anything of it (I think) and it looks a bit advanced to have been started very recently.[/QUOTE]
He's been documenting his progress to us for the past few days. He first mentioned it 5 days ago [url=http://www.facepunch.com/threads/1062318-What-are-you-working-on-v16?p=28814787&viewfull=1#post28814787]here, if you're interested.[/url]
[editline]31st March 2011[/editline]
I implemented an OptionBox control, so now you can change the grid size in the level editor for Sidelined.
[img]http://i.imgur.com/v7nZ3.jpg[/img]
[QUOTE=Icedshot;28916876]
[img_thumb]http://i56.tinypic.com/288p5k2.png[/img_thumb][/QUOTE]
That's the very same way how planets in Eve Online look, which is silly, because there aren't any logic geographical features in it, it's just a random pattern of islands.
[img]http://dl.dropbox.com/u/1085379/infix.png[/img]
Calculator, written in Haskell, which takes infix notation. Converts a string to infix, then converts that to reverse polish notation using the shunting-yard algorithm, then processes the RPN into the final result.
[QUOTE=Staneh;28911243]Man I really want to make a game. Too bad I suck at programming.
Anyone knows any good books? or online tutorials, perhaps? I would like to work with Java.[/QUOTE]
I keep getting books and stuff, and all they're teaching to do is copy what they've written in their book, and not learn what the fuck it means.
And then I try a different book and they insist that I cant use Eclipse, I have to use JCreator, or vice versa, and I have to go download some .zip file full of examples.
[img]http://img585.imageshack.us/img585/8056/ss20110401002758.png[/img]
Not much to see yet, but i'm proud of it :v:
[QUOTE=MedicWine;28920093]I keep getting books and stuff, and all they're teaching to do is copy what they've written in their book, and not learn what the fuck it means.
And then I try a different book and they insist that I cant use Eclipse, I have to use JCreator, or vice versa, and I have to go download some .zip file full of examples.[/QUOTE]
thenewboston.com? Just take everything he says with a pinch of salt and name your classes logically. Also try your own stuff as you learn.
[editline]1st April 2011[/editline]
Also Stanford Programming Methodology (CS106A) on youtube with Mehran Sahami. Less useful for directly learning how to code, but very useful to learn good programming practice.
[editline]1st April 2011[/editline]
but that's just like, my opinion, man
[QUOTE=knighty;28890840]
[img_thumb]http://i.imgur.com/aGA2m.jpg[/img_thumb]
[/QUOTE]
Is that Ivory Tower from Halo 2?
Edit: It seems that I'm late.
Pile me in the clocks I deserve.
[QUOTE=Nigey Nige;28920252]Also Stanford Programming Methodology (CS106A) on youtube with Mehran Sahami. Less useful for directly learning how to code, but very useful to learn good programming practice.[/QUOTE]
It teaches you how to program and does not teach you a programming language (it does, but that's inevitable, but it's not the goal), the way it should be.
Woohoo.. finally got the [url=http://www.gnu.org/software/gnuprologjava/]GNU Prolog for Java[/url] running under Android :D
Also wrote a small interface/wrapper for easier usage.. since the way it's made isn't THAT nice to use.. too much code :c
Yayz:
[img]http://u.cubeupload.com/borsty/androidProlog.png[/img]
All it takes now:
[cpp]
public void runPrologTests() {
try {
// create environment
final PrologBox box = new PrologBox();
// let it parse and run "test.pro"
box.runInPrologEnv( getAssets().open( "test.pro" ) );
// initialize interpreter instance
box.initializeInterpreter();
runAndPrint( "above(block1,block2).", box ); // true
runAndPrint( "above(block1,block4).", box ); // false
runAndPrint( "above(block3,table1).", box ); // true
runAndPrint( "above(What,table1).", box ); // should list all 4 blocks
} catch (Exception e) {
e.printStackTrace();
}
}
public static void runAndPrint( String queryString, PrologBox inst ) throws ParseException, PrologException {
// parse term, scan for variables and prepare for execution
final PrologQuery query = new PrologQuery( queryString, inst );
// execute term and grab results (internal backtracking limit set to 10)
final PrologQueryResultList res = inst.execute( query );
// output results
for ( final PrologQueryResult result : res ) {
Log.i( "PROLOG", "Result: " + result );
}
}
[/cpp]
test.pro:
[code]
block( block1 ).
block( block2 ).
block( block3 ).
block( block4 ).
table( table1 ).
ontop( block1, block2 ).
ontop( block3, block4 ).
ontop( block2, table1 ).
ontop( block4, table1 ).
above( X, Y ) :- ontop( X, Y ).
above( X, Y ) :- ontop( X, Z ), above( Z, Y ).
[/code]
Now to get a simple GUI done..
[b]:Edit:[/b]
Oh and for those who never heard of Prolog... check [url]http://en.wikipedia.org/wiki/Prolog[/url] :)
I'm having so much fun with this new lua system, I have it so you can make entities on the fly in the map as well as pick from already made entity obligations (basically just preset responses to events, like: move up if I press up), so if I have an Obligation from this:
[code]
Player = Game_Entity_Obligation()
function Player_OnCreate(sender, e)
io.write("Created Player\n")
end
function Player_OnDestroy(sender, e)
io.write("Destroyed Player\n")
end
function Player_OnKeyDown(sender, e)
if Key(e, "W") then
sender:Move(0, -1)
elseif Key(e, "S") then
sender:Move(0, 1)
end
end
function Player_OnKeyUp(sender, e)
if Key(e, "Space") then
io.write("I win!")
end
end
Player.OnCreate:Add(Player_OnCreate)
Player.OnDestroy:Add(Player_OnDestroy)
Player.OnKeyDown:Add(Player_OnKeyDown)
Player.OnKeyUp:Add(Player_OnKeyUp)
Player:Upload("Player")
[/code]
I can then use that, but override one of those methods when creating a quick entity:
[code]
Entity = Game_Entity("Player")
Entity.Name = "Test Entity"
Entity.Description = "RADICAL FUCKING TITS DUDE"
function Bettercreate(sender, e)
io.write("Better Output\n")
end
Entity.Obligation:Clear("OnCreate")
Entity.Obligation.OnCreate:Add(Bettercreate)
Entity:Upload()
[/code]
[QUOTE=Shanethe13;28911560]You could try taking a look here: [url]http://www.java-gaming.org/index.php/topic,23958.0.html[/url][/QUOTE]
I tried the first tutorial of the list (first three links) and it seemed nice. He explained things well, I understood what things meant. I read through the Hello World section, and he was using different functions (if thats what they're called) than I was used to. I didnt actually attempt the hello world program. I went on the next section, where he started to code a version of Pong. I got up to a point where he said "if you compile this you'll see" when I looked up and realized I had a shitload of errors. I triple checked to make sure I spelled/capitalized everything right, but I still had errors. I ran it and a got a blank window pop up and errors in the console box at the bottom (I'm using eclipse)
Is there something I'm doing wrong? He claims that he's just coding this in notepad and directly running them using cmd. Should I be doing that too? Would it matter?
[QUOTE=Dj-J3;28920243][img_thumb]http://img585.imageshack.us/img585/8056/ss20110401002758.png[/img_thumb]
Not much to see yet, but i'm proud of it :v:[/QUOTE]
Ini files?
So last night my friends and I presented a nearly completed version of our game, Circuit Crawler... we decided not to use a powerpoint like all the other groups, spent almost no time on the presentation itself. Most Service Learning groups (our school's equivalent of community service, but we get to form groups and take on a project that we want to take on, instead of cleaning up the beach a few times a year) spent much less time than we did on the actual project and more time on the presentation. In fact, we winged the presentation.
We wrapped up all outstanding bugs and created 3 playable levels and had a completed, working game 23 minutes before we had to check in for the opening ceremony. We would have put it up on the Android market by now, but we're waiting on the charity we're working with, the [url=http://www.youthfortechnology.org/]Youth for Technology Foundation[/url], to set up the Google Merchant account in a shared google account that we have.
The game will be on the Android Market by Monday, and 100% of the profits will be going directly to them, we won't even be handling the money as a middleman. We're going to price it at either $0.99 or $1.49. I'll post a QR code here with a link to the game when it's up.
[editline]31st March 2011[/editline]
oops, almost forgot to post an image of the completed game, with our very first demo level that takes about 30 seconds to complete (we have 2 really awesome levels after this, may do a video demo of one of them over the weekend)
[img]http://i.imgur.com/NWzsV.png[/img]
Cool, but personally I preferred the debug graphics :v:
I wing every single presentation, it's the way to go man
Sorry, you need to Log In to post a reply to this thread.