Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - combatking0

Pages: [1] 2 3 4 5 6
1
Game Coding / Online Chess Project (I'm Back!)
« on: December 07, 2017 »
Hi everyone,

Long time no see. I hope everyone is well.
I've decided to take a break from writing books to create an online chess game, so I thought I'd stop by to see how everyone's doing.

The chess game is currently built on the Wire Frame Rain demo I did a while ago, but it'll use flat shaded polygons when it's done.

So far I've got every piece finished apart from the King: http://fx.barcodebattler.co.uk/wf/Chess.htm

The individual chess pieces are object oriented and the 3d-2d rendering has become a lot more streamlined than the original demo, so I've definitely improved over time.

When it's done, the game will be a fine blend of HTML5 Canvas / Ajax / PHP / MySQL, so in theory anyone can play low-poly chess against anyone else in the world. Mwahahahaaaa!

2
Projects / Project I don't have time for - yet
« on: September 19, 2016 »
I'm just putting this out here. Maybe when I retire I can pick it up, or maybe somebody else can run away with it.

Any way, there's been a recent rise in visual programming languages as a tool for teaching programming concepts to children.
Minecraft is also a popular game. So I've been thinking of merging the two to create Code Cubes.

The idea is to have a selection of pre-programmed cubes. Each face represents an input, output or not connected, and can be rotated to suit the positions of surrounding cubes.
Custom cubes can also be built, and compressed into a single cube to create definable functions.

Images and sounds can be assigned to a cube, and I think I need to think this through a bit more. I'm tired.

3
Projects / Text Mode Ray Caster
« on: May 28, 2016 »
I'm working on a text mode raycaster! Not the prettiest thing in the world, but so far it's working.
At the moment you can turn left and right with the arrow keys, but you can't move backwards or forwards yet.

I'm using Nino's raycaster as a starting point, so hopefully I'll have motion working soon.

4
Projects / Sphere-o-dots
« on: February 26, 2016 »
OK, time for me to start on a new project. It's still in the planning phase, but I plan to put together a "futuristic map" of the internet, comprising of a wireframe sphere with dots on the surface representing computers and other nodes.

Lines connecting the nodes flash in and out of existence, representing data transmission.
Obviously the real internet is currently comprised of over 4 billion nodes (since IPV4 is fast running out of addresses), but I plan to just have a few hundred so as not to make a slow JavaScript program.

Sounds fairly simple, considering I have a few sphere based programs already, so I should be able to use one of those as a starting point.

5
I hope this isn't too late.

Amiga Sphere uses a variant of my JavaScript glowb function, which draws a blocky sphere.
The illuminated sections are synched to a separate audio channel from "Kasta Sten" by Slagsmålsklubben.
The colour palette is limited to 4096 colours, hopefully close to those of the Amiga systems.

My apologies if this appears to be rushed, because September was a busy month - hopefully the music will at least be enjoyable.

You will need to extract the entire folder and run the AmigaSphere.htm file in a HTML5 capable browser, such as the latest versions of FireFox, Chrome and Internet Explorer / Edge.

Best of luck to everyone else who has entered - may the best code win!

The zip file is here: http://fx.barcodebattler.co.uk/AmigaSphere.zip

6
Other languages / [JavaScript] Glowb
« on: May 20, 2015 »
Sorry for the pun in the title, but I'm thinking of rendering a light sourced sphere in JavaScript on the canvas.

After looking at some generic methods for light sourcing, I've figured out how to calculate the brightness for each polygon in a fast way:

1. Calculate the distance of each point on the sphere from the light source in 3D space.
2. Assign each point a brightness value.
3. For each polygon, add up the brightness value for each point on that polygon.
4. Multiply that brightness value by the RGB colour for that polygon.
5. Draw the polygon, subject to backface culling.

It's a shame gouraud shading natively supported under JS.

Wish me luck!

7
:sunny:Weather Competition 2015 :sunny:

VOTING


It's time to choose your favourite entry!

We have 4 entries, so please pick your favourite.

I hope we all had fun coding this time around - I'll try to end the next comp on a Sunday night to encourage more entries.
However, only one entry can rain supreme. Who will blow away the competition? Don't let your judgment be clouded by your favourite coder - you're voting for your favourite program!


To keep things fair, here are the rules for voting and votes are checked by administrators.



Voting rules:

  • Please vote for 1 entry.
  • Please do not vote for yourself or you will be disqualified.
  • Voting is open for 7 days from now.
  • In the event of a tie break, there will be a vote-off.
  • Please view all the entries before voting.

Good luck everyone!

8
C / C++ /C# / [C#] TCP Port Listener
« on: May 06, 2015 »
I've been thinking of experimenting with network transmission for various things, including requests from work for an alert system and recreating the Snipes game.

After looking at some code samples for using sockets and port listeners, I'm feeling a bit overwhelmed, but I'll throw some code together over the next few days and post back with the results.

Who knows - I could even make some demos using network data!

9
Hi everyone!

Here's my entry for the competition, Wire Frame Rain: http://www.barcodebattler.co.uk/fx/wf/wfrain.htm


I can't wait to see what you all have up your sleeves!

10
:sunny:Weather Competition 2015:sunny:


:sunny:Get your barometers ready!:sunny:

The second of this year's quaterly contests, here is our Weather Comp 2015!


There's tons of this stuff out there to be inspired by.




So, time to get inspired and start making your entry, and have fun!

Note: If you are too old to code (;D), put a video camera into a snow storm, be creative!




:sunny:Here are the rules!:sunny:

  • Your Demo must include at least one of the following weather effects:
    • snow
    • sun beams
    • rain
    • fog
    • wind
    • hail
    But it may include other effects which are not on this list.
  • You can use any platform that is compatible with windows XP, Vista, Win7 or Win8.
  • You may write something for web browsers as long as it works in IE9+, Chrome or FF (on current stable version).
  • Wild (Video / Animated) entries are allowed.
  • The following emulators are welcome: Vice, Winuae, Saint, PS2 Yabasic
  • Please give credit if you use ripped sound/gfx, or even better credit the original artist.
  • Please write something new for the challenge, no previously released stuff.
  • Do not use ripped routines. (dlls, libs, fmod, sdl, frameworks etc are fine but say what you used please!).
  • One entry per person maximum.
  • Entries to be posted in this forum please with the title [Weather_2015] entry name
  • Entries may be posted between NOW and Midnight of 15th May 2015
  • The winner [S?] will be decided by a poll of forum users
  • If 1st place is tied there will be a vote-off to decide the winner.
  • Late entries will not be counted for voting.
  • Please PM any correspondance regarding rules to me, don't discuss them here such posts will be removed and not answered.
  • Please include a screenshot of your entry in your post.
  • Please only post finished work, if you update your entry the final one will be voted on.
  • After the submission deadline You may NOT post ANY further attachments to final or other versions of your entry ANYWHERE on this forum until voting has closed.
  • You may post a video of the entry along with the binaries (useful if you use shaders etc).
  • The prizes will be in form of good "Karma" ;)



Here are the prizes!

  • 1st Place  - 20 Karma
  • 2nd Place - 15 Karma
  • 3rd Place  - 10 Karma
  • All entries get 1 Karma

Good Luck!

11
Other languages / JavaScript Purple Portal Effect
« on: March 23, 2015 »
I think I'm happy with my purple portal effect now - it uses 128 particles which whizz around a circular area after exploding out from the centre.

An additive blending mode is used to achieve the glow and the particles leave behind a trail which fades out to prevent the effect from turning into a white circle.

I've put it onto my Stormbringer page: http://www.barcodebattler.co.uk/stormbringer/

12
:trans:Symmetry Competition 2014 :trans:

VOTING


It's time to choose your favourite entry!

We have 3 entries, so please pick your favourite

I hope everyone who entered this comp have learned something new, being it in coding, graphics, music, symmetry or reflection!

 
To keep things fair, here are the rules for voting and votes are checked by administrators.



Voting rules:

  • Please vote for 1 entry.
  • Please do not vote for yourself or you will be disqualified.
  • Voting is open for 7 days from now.
  • In the event of a tie break, there will be a vote-off.
  • Please view all the entries before voting.

Good luck everyone!

13
I've crammed this entry with 5 different effects - there's no scroller, but I couldn't find a way to make it look readable.

Anyway, please enjoy MirrororriM:
http://fx.barcodebattler.co.uk/mirrororrim/

The music is called "Stickerbrush Symphony" and was composed by David Wise for Donkey Kong Country 2.

14
Challenges & Competitions / Symmetry Competition 2014
« on: February 23, 2014 »
:trans:Symmetry Competition 2014:trans:


:trans:Get your kaleidoscope ready!:trans:

Out of the blue, here is our Symmetry Comp 2014!


There's tons of this stuff out there to be inspired by.




So, time to get inspired and start making your entry, and have fun!

Note: If you are too old to code (;D), put a video camera into a kaleidoscope, be creative!




:trans:Here are the rules!:trans:

  • Your Demo must contain significant symmetrical sections.
  • You can use any platform that is compatible with windows XP+Win7.
  • You may write something for web browsers as long as it works in IE9, Chrome or FF (on current stable version).
  • Wild (Video / Animated) entries are allowed.
  • The following emulators are welcome: Vice, Winuae, Saint, PS2 Yabasic
  • Please give credit if you use ripped sound/gfx, or even better credit the original artist.
  • Please write something new for the challenge, no previously released stuff.
  • Do not use ripped routines. (dlls, libs, fmod, sdl, frameworks etc are fine but say what you used please!).
  • One entry per person maximum.
  • Entries to be posted in this forum please with the title [Symmetry_2014] entry name
  • Entries may be posted between NOW and Midnight of [23rd April 2014]
  • The winner [S?] will be decided by a poll of forum users
  • If 1st place is tied there will be a vote-off to decide the winner.
  • Late entries will not be counted for voting.
  • Please PM any correspondance regarding rules to me, don't discuss them here such posts will be removed and not answered.
  • Please include a screenshot of your entry in your post.
  • Please only post finished work, if you update your entry the final one will be voted on.
  • After the submission deadline You may NOT post ANY further attachments to final or other versions of your entry ANYWHERE on this forum until voting has closed.
  • You may post a video of the entry along with the binaries (useful if you use shaders etc).
  • The prizes will be in form of good "Karma" ;)



Here are the prizes!

  • 1st Place  - 20 Karma
  • 2nd Place - 15 Karma
  • 3rd Place  - 10 Karma
  • All entries get 1 Karma

 Good Luck!

15
General chat / Source Code in TV and Films
« on: January 24, 2014 »
I've just been looking up some of the posts on http://moviecode.tumblr.com/?utm_source=twitterfeed&utm_medium=twitter and there are some really funny examples of computer programming language in films and TV shows.

I find it amusing just how many killing machines are run on BASIC and the government databases which can be hacked with JavaScript.

Some of the entries show how the designers have gone to great lengths to use legitimate looking code, rather than cutting and pasting it from the internet.

16
Challenges & Competitions / [XMAS_2013] Virtual Advent
« on: November 29, 2013 »
I have started work on a PHP / JavaScript monster that I call "Virtual Advent".

Every day from the 1st of December until Christmas Day, the PHP on my server will reveal a little bit more of the JavaScript code. The JavaScript will code for either a demo effect or a piece of scenery, depending on the day.

You will also be treated to a different tune each day, just to mix things up.

The Virtual Advent Calendar is available here: http://fx.barcodebattler.co.uk/virtual_advent/


17
General coding questions / Contrast
« on: November 27, 2013 »
I've been working on an ice-cube scroller for a demo, and I'm wondering - is the text in the attached image readable?

Please let me know what you think.

18
Other languages / Messing with Languages
« on: November 15, 2013 »
I've been putting a Flash game together for a Christmas Fayre, and it needed a score table. The easiest way to have done it would have been as follows:

Actionscript sends the High Score data to an ASP page on a local IIS installation, which either saves it to a database or a text file.

However, I didn't want to install a webserver on my laptop, so I have taken the following route:

Actionscript sends the High Score data to JavaScript running in IE8, which uses ActiveX to call a Batch Script which appends the data to a text file.

It involves turning the security off for various things, but it runs only on one computer and can be easily reversed.

19
Other languages / Python to JavaScript port
« on: October 12, 2013 »
Hi guys,

I have recently come across an old excel spreadsheet which I created a long time ago. It contained a list of my past addresses and jobs, and as it contained such confidential information, I put a password on it, but I can't remember what it was.

To remedy this, I have found a Python source code which contains the following:
Code: [Select]
import OleFileIO_PL
from struct import unpack
import hashlib
import sys

def rc4_crypt(key, data):
# prepare key
S = range(256)
j = 0
for i in range(256):
j = (j + S[i] + ord(key[i % len(key)])) % 256
S[i], S[j] = S[j],S[i]

# encrypt/decrypt
i = j = 0
out = ""
for c in data:
i = (i + 1) % 256
j = (j + S[i]) % 256
S[i], S[j] = S[j],S[i]
out += chr(ord(c) ^ S[(S[i] + S[j]) % 256])
return out

def find_rc4_passinfo(stream):
while True:
pos = stream.tell()
if pos >= stream.size:
break # eof
type = unpack("<h", stream.read(2))[0]
length = unpack("<h", stream.read(2))[0]
data = stream.read(length)

if type == 0x2f: # FILEPASS
if data[0:6] == '\x01\x00\x01\x00\x01\x00':
#print "found rc4 structure"
data = data[6:]
salt = data[:16]
verifier = data[16:32]
verifierHash = data[32:48]
return (salt, verifier, verifierHash)

return None

def gen_excel_real_key(pwd, salt):
h0 = hashlib.md5(pwd).digest()
h1 = hashlib.md5((h0[:5] + salt) * 16).digest()
return h1[:5]

def test_pass(pwd, salt, verifier, verifierHash):
real_key = gen_excel_real_key(pwd, salt)
key = hashlib.md5(real_key + '\x00\x00\x00\x00').digest()
dec = rc4_crypt(key, verifier + verifierHash)
if hashlib.md5(dec[:16]).digest() == dec[16:]:
print "valid pass"
else:
print "invalid pass"


if len(sys.argv) != 3:
print "Usage: %s <xls file> <password>" % sys.argv[0]
sys.exit(1)

xlsfile = sys.argv[1]

# Test if a file is an OLE container:
if not OleFileIO_PL.isOleFile(xlsfile):
print "Invalid XLS file"
sys.exit(1)

# Open OLE file:
ole = OleFileIO_PL.OleFileIO(xlsfile)

workbookStream = ole.openstream('Workbook')
if workbookStream == None:
print "Invalid XLS file"
sys.exit(1)

passinfo = find_rc4_passinfo(workbookStream)
if passinfo == None:
print "Cannot find RC4 pass info"
else:
pwd = sys.argv[2].encode('utf-16')[2:]
test_pass(pwd, *passinfo)
workbookStream.close()

There's certain sections in this original code that I don't understand - specifically, what do the lines
S = range(256)
and
for i in range(256):
do?

I'm guessing the second line is a type of for loop.

If I can figure this out, I'll be closer to getting a new job.

Any help you can provide will be much appreciated.

20
Projects / Wire Fair
« on: August 14, 2013 »
I've just started to get my Wire Fair off the ground.

So far there's a Merry Go Round, but no horses on it. I'll add those soon before working on a ferris wheel.

http://fx.barcodebattler.co.uk/wf/WireFair.htm

Pages: [1] 2 3 4 5 6