Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 230 231 [232] 233 234 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 906954 times)

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3465 on: November 12, 2012, 07:42:40 am »

Correct... That's what a pseudo-rng is, I guess. I'm just not often looking for sequences. Maybe just a "really large lookup table with random numbers"-simulator? :)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #3466 on: November 12, 2012, 07:59:53 am »

LCG? Seeding those is just setting an integer. They actually do reseed themselves with the previous value generated after every call...

Twister usually works by generating and caching chains of numbers at once.
« Last Edit: November 12, 2012, 10:14:39 am by MorleyDev »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3467 on: November 12, 2012, 08:28:35 am »

See, that's why I post here :) Thanks!
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #3468 on: November 12, 2012, 06:17:31 pm »

Lord, look what I found. Dug up an old university project to make an online prospectus for a fake university...well, the website part of the project anyway. I vaguely remember smashing it out in a caffeine-fuelled haze in an afternoon. Good thing we weren't marked on design, the website was just a "prototype" (the majority of the points were write-up). I even made a mock log-in and edit pages (which don't work).

And to be fair the code is good as far as php goes and it does show the features...actually uses a fake database (with the actual content hard-coded massive arrays that represent tables) to load content. Editing doesn't work (couldn't get sessions working, and since it was just a prototype those features weren't actually needed to be implemented) but it's there and looks like it could. Of course if I were doing this proper I could of got something "real" out and working...especially if the university hosting I originally had that code on allowed for things other than PHP. Like ASP.NET or Ruby...

It's mostly the colour scheme that I wouldn't wish upon my worst enemies...seriously, I should not be allowed to design the look of things. Zero artistic skills.

My earlier first year introduction to website development project is a little better for design in that it's only the background that's horrendous. Again, code is good but I just can't design for shit. If someone were to give me the designs I'd be fine, but when I have to come up with one for myself....yeeeeah.

 The CSS switching (top right let's you click between two different style sheets) is actually stupider than the original implementation. I actually had to dumb it down because PHP wasn't a part of the syllabus and Javascript not a part of that coursework (it had it's own separate coursework) >.<
« Last Edit: November 12, 2012, 07:10:48 pm by MorleyDev »
Logged

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3469 on: November 13, 2012, 12:09:29 am »

Anyone here familiar with PircBot? I'm having some issues with it, namely, it not connecting when it says it is.

cerapa

  • Bay Watcher
  • It wont bite....unless you are the sun.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3470 on: November 13, 2012, 03:38:47 pm »

HELL YES!

I just made my game(in the loosest sense of the term, you can move left and right) read an image file and compose a map out of it. It's pretty much infinitely scaleable in terms of size, and colour can hold a ton of data, and I arent even using the alpha layer yet. Its also the first proper thing I have made without a tutorial showing me how.

Only problem is that *takes a second look* I make a lot of typos friggin c and r. Anyway, I made purple denote the starting location of the player, and now it even works!

An interesting thing to note is that this is pretty much the seventh time I have tried to tell you about a bug, and then during the process of writing about it finding the bug and thus not having to post. Such is the power of this thread.

EDIT:
Spoiler: Have a screenshot (click to show/hide)
« Last Edit: November 13, 2012, 03:49:05 pm by cerapa »
Logged

Tick, tick, tick the time goes by,
tick, tick, tick the clock blows up.

Twiggie

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3471 on: November 13, 2012, 03:50:49 pm »

HELL YES!

I just made my game(in the loosest sense of the term, you can move left and right) read an image file and compose a map out of it. It's pretty much infinitely scaleable in terms of size, and colour can hold a ton of data, and I arent even using the alpha layer yet. Its also the first proper thing I have made without a tutorial showing me how.

Only problem is that *takes a second look* I make a lot of typos friggin c and r. Anyway, I made purple denote the starting location of the player, and now it even works!

An interesting thing to note is that this is pretty much the seventh time I have tried to tell you about a bug, and then during the process of writing about it finding the bug and thus not having to post. Such is the power of this thread.

is there any advantage to using colours other than the fact you can open a save and have it look cool?
and wouldnt it be better to use the colour of each pixel as a bitfield? surely using purple just for starting location is using 4 bytes when you could be using a single bit, as well as preventing you from storing other tile data there?

sorry to be a bit negative, this sounds like something i'd love to be able to do :D
Logged

cerapa

  • Bay Watcher
  • It wont bite....unless you are the sun.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3472 on: November 13, 2012, 04:04:46 pm »

is there any advantage to using colours other than the fact you can open a save and have it look cool?
and wouldnt it be better to use the colour of each pixel as a bitfield? surely using purple just for starting location is using 4 bytes when you could be using a single bit, as well as preventing you from storing other tile data there?

sorry to be a bit negative, this sounds like something i'd love to be able to do :D
The plus side of using colours is that you can open the map up with any image editor and just mess around with it. No looking at esoteric text files or needing a specialized level editor.

The bitfield is an excellent idea, but I have no idea how to do that. Plus it sorta contradicts the "just open it in paint" aspect of level editing. I think I might encode just the alpha, and maybe extreme highs and lows of colours.
« Last Edit: November 13, 2012, 04:10:34 pm by cerapa »
Logged

Tick, tick, tick the time goes by,
tick, tick, tick the clock blows up.

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #3473 on: November 14, 2012, 03:14:47 pm »

So I realised my build process for what I'm playing with involves manually running scripts for testing and moving the built project around to a library folder for linking and then bringing it all together at the end for packaging. Naturally, this is something stuff already exists to automate. Continuous Integration and all that.

So I download and install Jenkins, do some doo-dah to get it building and kick a build of one of the libraries off before leaving for work in the morning. Come back, build failed on the integration tests because I forgot to include a file in the git repository. Oh well. Then I look at how long it took to build that library: 2 hours.

This build when ran straight from the command line takes 2 minutes (building both Debug and Release, which take 1 minute each).

What the hell?
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #3474 on: November 14, 2012, 03:19:28 pm »

never heard of "Jenkins" before. Consider using ant or maven instead.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: if self.isCoder(): post() #Programming Thread
« Reply #3475 on: November 14, 2012, 03:37:51 pm »

Jenkins can use Ant or Maven. But it also automates the building so all I could need to do to get a build and deploy is push to git and the latest version gets built and deployed (if successful) automatically for me.

Jenkins used to be called Hudson, then Oracle happened and it broke off and changes it's name. It is used by a lot of companies that have a Continuous Integration system, we use it at work and it's good at work for this exact kind of thing: Automated building and testing. But then again at work it has a much better set-up with it's own dedicated machine and some slave VMs...

EDIT: Fixed it. Seems Services in Windows 7 may have some...interesting performance limitations imposed upon them. Running Jenkins from command prompt instead of as a Service seems to function adequately.
« Last Edit: November 14, 2012, 05:48:30 pm by MorleyDev »
Logged

olemars

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3476 on: November 14, 2012, 06:14:15 pm »

Whatwhatwhat? Hudson got forked? Hope it hasn't caused too much community split. Used to use Hudson a lot a couple of years ago and it's fucking great. Never had much trouble with build times, but I never ran it as a service (except perhaps on the slaves) and I integrated it with Incredibuild anyway. The PClint tasks were a tad slow, but that's always slow.

never heard of "Jenkins" before. Consider using ant or maven instead.
Luddite.
« Last Edit: November 14, 2012, 06:17:22 pm by olemars »
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: if self.isCoder(): post() #Programming Thread
« Reply #3477 on: November 14, 2012, 06:37:34 pm »

Ah. I use cruise control for continuous integration whenever I feel like fooling around with it, wich is not that often because my only non-gaming computer at the moment is only a 200mhz arm something NAS running stripped down linux, all it really does is run svn and serve files.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

GlyphGryph

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3478 on: November 14, 2012, 08:01:13 pm »

Oracle breaks everything it touches. This is why openOffice forked (and why OpenOffice is now dead), and it's pretty much the same thing for a good chunk of their relatively recent acquisitions.
Logged

olemars

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3479 on: November 15, 2012, 04:28:16 am »

Virtualbox is still going strong, although it seems like Oracle hasn't butted in much there, and I haven't paid enough attention to know if there are any politics going on.
Logged
Pages: 1 ... 230 231 [232] 233 234 ... 796