[code] m_pGColor = CreateTexture();
m_pGColor->FillData(800, 600, TEXTURE_TYPE_BYTE, TEXTURE_FORMAT_RGB);
m_pGNormal = CreateTexture();
m_pGNormal->FillData(800, 600, TEXTURE_TYPE_BYTE, TEXTURE_FORMAT_RGB);
m_pGPosition = CreateTexture();
m_pGPosition->FillData(800, 600, TEXTURE_TYPE_FLOAT, TEXTURE_FORMAT_RGB);
m_pRTRender = CreateRenderTarget();
m_pRTRender->BindTexture(0, m_pGColor);
m_pRTRender->BindTexture(1, m_pGNormal);
m_pRTRender->BindTexture(2, m_pGPosition);[/code]
Does this look too messy other than the variable names? The resolution wont be hardcoded when I finish some other stuff
[QUOTE=Pucilowski;37412315][img]http://www.facepunch.com/fp/ratings/rainbow.png[/img] [b]Chunky traces[/b]
[img]http://puu.sh/YVOw[/img][/QUOTE]
This is for wires that are connected, the other one is for wires that are simply passing eachother.
[lua]
local functions={
["getHighscoreCount"]=function()
local query = db:CreateQuery("SELECT COUNT(*) AS count FROM highScores WHERE apiKey = ?")
[/lua]
Progress
[QUOTE=Pucilowski;37412315]I'm being productive for the first time in weeks. Working on my 'magical electric circuit' simulator where the traces carry data and the power source is unknown. Like wiremod.
I have two types of traces. Trying to decide which I like better.
Slim vs [b]Chunky[/b]
[img]http://puu.sh/YVJj[/img]
[img]http://www.facepunch.com/fp/ratings/wrench.png[/img] Slim traces
[img]http://puu.sh/YVOe[/img]
[img]http://www.facepunch.com/fp/ratings/rainbow.png[/img] [b]Chunky traces[/b]
[img]http://puu.sh/YVOw[/img][/QUOTE]
Make them chunky when they lines cross each other.
[QUOTE=Tobba;37412445][code] m_pGColor = CreateTexture();
m_pGColor->FillData(800, 600, TEXTURE_TYPE_BYTE, TEXTURE_FORMAT_RGB);
m_pGNormal = CreateTexture();
m_pGNormal->FillData(800, 600, TEXTURE_TYPE_BYTE, TEXTURE_FORMAT_RGB);
m_pGPosition = CreateTexture();
m_pGPosition->FillData(800, 600, TEXTURE_TYPE_FLOAT, TEXTURE_FORMAT_RGB);
m_pRTRender = CreateRenderTarget();
m_pRTRender->BindTexture(0, m_pGColor);
m_pRTRender->BindTexture(1, m_pGNormal);
m_pRTRender->BindTexture(2, m_pGPosition);[/code]
Does this look too messy other than the variable names? The resolution wont be hardcoded when I finish some other stuff[/QUOTE]
i feel like CreateTexture() should have an overloaded version so you don't have to call FillData() everytime. Looks great otherwise.
Done for the day:
[code]
# of High-Scores: 2
Congrats on your new score(152600)! Enter a name to submit it(or use the name 'list' to list high scores)!
>banana smoothie
# of High-Scores: 3
Congrats on your new score(90220)! Enter a name to submit it(or use the name 'list' to list high scores)!
>hikers
# of High-Scores: 4
Congrats on your new score(101263)! Enter a name to submit it(or use the name 'list' to list high scores)!
>killer monkey
# of High-Scores: 5
Congrats on your new score(173927)! Enter a name to submit it(or use the name 'list' to list high scores)!
>list
Name: sam, score: 137839, data: null
Name: cheese pizza, score: 39907, data: null
Name: banana smoothie, score: 152600, data: null
Name: hikers, score: 90220, data: null
Name: killer monkey, score: 101263, data: null
# of High-Scores: 5
Congrats on your new score(26171)! Enter a name to submit it(or use the name 'list' to list high scores)!
>rape
# of High-Scores: 6
Congrats on your new score(195298)! Enter a name to submit it(or use the name 'list' to list high scores)!
>list
Name: sam, score: 137839, data: null
Name: cheese pizza, score: 39907, data: null
Name: banana smoothie, score: 152600, data: null
Name: hikers, score: 90220, data: null
Name: killer monkey, score: 101263, data: null
Name: rape, score: 26171, data: null
# of High-Scores: 6
Congrats on your new score(39482)! Enter a name to submit it(or use the name 'list' to list high scores)!
[/code]
Code that results this:
[code]
public static void main(String[] args) throws IOException{
init("892BA7C0A53D729B6DF0BAFEF7DF7D28");
while(true){
System.out.println("# of High-Scores: "+getHighScoreCount());
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
long score = (long)(Math.random()*200000);
System.out.println("Congrats on your new score("+score+")! Enter a name to submit it(or use the name 'list' to list high scores)!");
String name=in.readLine();
if(name.trim().isEmpty())
continue;
if(name.equalsIgnoreCase("list")){
HighScoreEntry[] entries=getHighScores(0, 30);
for(int I=0;I<entries.length;I++){
System.out.println(entries[I]);
}
}else{
addHighScore(name, score);
}
}
}
[/code]
[QUOTE=Pucilowski;37412315]I'm being productive for the first time in weeks. Working on my 'magical electric circuit' simulator where the traces carry data and the power source is unknown. Like wiremod.
I have two types of traces. Trying to decide which I like better.
Slim vs [b]Chunky[/b]
[img]http://puu.sh/YVJj[/img]
[img]http://www.facepunch.com/fp/ratings/wrench.png[/img] Slim traces
[img]http://puu.sh/YVOe[/img]
[img]http://www.facepunch.com/fp/ratings/rainbow.png[/img] [b]Chunky traces[/b]
[img]http://puu.sh/YVOw[/img][/QUOTE]
I like the chunky, but only where there's a junction. Make it slim where there's just a corner.
Or have an option using a clever set of a dual combination of two checkboxes.
I'm probably missing something here, but shouldn't it be clear whether they are connected or not?
In which case you'd need bridge-type crosses. Then use chunky ones for connected and slim for any corner.
[img]http://i.imgur.com/Koqkz.png[/img]
See, in the top right nothing's connected, but in the bottom left there is (even though that would make no sense, but whatever).
[QUOTE=Maurice;37412859]I'm probably missing something here, but shouldn't it be clear whether they are connected or not?
In which case you'd need bridge-type crosses. Then use chunky ones for connected and slim for any corner.
See, in the top right nothing's connected, but in the bottom left there is (even though that would make no sense, but whatever).[/QUOTE]
All I did was drag around some traces for demo purposes so it's not a very legitimate circuit and there's not an awful lot of simulation going on yet, purely cosmetic so far.
Although I have not given thought to whether or not traces will end up having to cross each other without connecting. I'll have to rethink how traces will work if this is a necessary feature, and I imagine it is because without it wiring the components will be a challenge in itself.
Anyway I started working on following the traceways to inputs and removing traces if they lead to another output cause that's pretty bad.
[url=https://alfps.wordpress.com/2011/12/08/unicode-part-2-utf-8-stream-mode/#utf8_mode_narrow_fail_fixed]How to output UTF-8 text on a Windows console.[/url]
...
Windows is interesting, and if you don't agree you can fuck off.
windows is not interesting. windows is pure shit
[QUOTE=Jookia;37414053][url=https://alfps.wordpress.com/2011/12/08/unicode-part-2-utf-8-stream-mode/#utf8_mode_narrow_fail_fixed]How to output UTF-8 text on a Windows console.[/url]
...
Windows is interesting, and if you don't agree you can fuck off.[/QUOTE]
[code]2:29 PM - Dlaor: sb define unicode
2:29 PM - SweetiBot: Here you go
Word: unicode
*jookia joke here*
By: Dlaor on 06/22/2012 22:46:40[/code]
[QUOTE=swift and shift;37414088]windows is pure shit[/QUOTE]
Just because something is a terrible mess you wouldn't want to touch with a barge pole doesn't mean it can't hold a certain kind of disgusted fascination to outside observers.
EDIT: Is it really that time again?
Have a totally-not-faked screenshot of a surprised guard then.
[IMG]http://i.imgur.com/4tqVl.png[/IMG]
Windows is awesome :(
[QUOTE=Tobba;37414119][code]2:29 PM - Dlaor: sb define unicode
2:29 PM - SweetiBot: Here you go
Word: unicode
*jookia joke here*
By: Dlaor on 06/22/2012 22:46:40[/code][/QUOTE]
That's the second time that's happened to me on the Internet.
[editline]26th August 2012[/editline]
[QUOTE=Lexic;37414218]Just because something is a terrible mess you wouldn't want to touch with a barge pole doesn't mean it can't hold a certain kind of disgusted fascination to outside observers.[/QUOTE]
Exactly. There's a special kind of interest when your C implementation is directly wired to cmd.exe's IO buffer.
[QUOTE=Darwin226;37414276]Windows is awesome :([/QUOTE]
Its low-level APIs aren't.
Does... does anyone want to remake Spore with the 2005 demo features? I've been watching gameplay videos and it's making me want to cry.
Why? It's the same game with gore, more wall types, and water mode.
It's not much but i feel good about it since i am a beginner in c++
[IMG]http://puu.sh/YZLh[/IMG]
[QUOTE=Nigey Nige;37414504]Does... does anyone want to remake Spore with the 2005 demo features? I've been watching gameplay videos and it's making me want to cry.[/QUOTE]
I'm working towards something similar to the cell stage, but you can't play. You can only watch cells devouring each-other and evolving by means of selection. You'll also be able to edit their DNA.
That's my goal anyhow.
On a side-note, I just found [URL="http://code.google.com/p/cistron/"]this library[/URL] while browsing stackoverflow. I got tired from fixing artemis-cpp (which is full of shit), and was looking for alternatives. The library is called [B]Cistron[/B], and my project is called [B]Cilium[/B], I decided to use it immediately.
[editline]26th August 2012[/editline]
It was love at first sight.
[QUOTE=voodooattack;37415368]I'm working towards something similar to the cell stage, but you can't play. You can only watch cells devouring each-other and evolving by means of selection. You'll also be able to edit their DNA.
That's my goal anyhow.
On a side-note, I just found [URL="http://code.google.com/p/cistron/"]this library[/URL] while browsing stackoverflow. I got tired from fixing artemis-cpp (which is full of shit), and was looking for alternatives. The library is called [B]Cistron[/B], and my project is called [B]Cilium[/B], I decided to use it immediately.
[editline]26th August 2012[/editline]
It was love at first sight.[/QUOTE]
Oh my god that looks so cool.
I might implement it, I'd have to redesign a lot of my engine though. (But a lot of it is crap so it's okay)
[QUOTE=Jookia;37414053][url=https://alfps.wordpress.com/2011/12/08/unicode-part-2-utf-8-stream-mode/#utf8_mode_narrow_fail_fixed]How to output UTF-8 text on a Windows console.[/url]
...
Windows is interesting, and if you don't agree you can fuck off.[/QUOTE]
This is how it should work in C#:
[csharp]Console.OutputEncoding = Encoding.UTF8;
var outStream = Console.OpenStandardOutput();
Console.SetOut(new StreamWriter(outStream, Encoding.UTF8) { AutoFlush = true });
Console.WriteLine("太陽は昇る。");
Console.ReadLine();[/csharp]
Should because the console doesn't display the characters properly, even though copying them into Writer with the same font works. What.
[QUOTE=Lexic;37414424]Its low-level APIs aren't.[/QUOTE]
guess you've never heard of the remote memory functions
guess you've never heard of io completion ports
guess you've never heard of the threadpool api
guess you've never heard of fibers
guess you've never heard of user mode scheduling
guess you've never heard of guard pages
guess you've just worked with user32
[QUOTE=Lexic;37414218]Just because something is a terrible mess you wouldn't want to touch with a barge pole doesn't mean it can't hold a certain kind of disgusted fascination to outside observers.
EDIT: Is it really that time again?
Have a totally-not-faked screenshot of a surprised guard then.
[/QUOTE]
What is fake in this screenshot?, do you use 2D raycasting for the wall rendering?
Edit:
Ive been working a bit more on my s3m tracker/player, got all the loading sorted and started working on the mixing although I got bored last night so i started on a simple 2d project.
[img]http://img43.imageshack.us/img43/9256/capturepxs.png[/img]
Loads the map data from an xml file thats created using in Tile Mapper.
Supports multiple layers, tilesheets etc,
The characters animations are also loaded from xml but got no fancy editor for that yet. atm I only have the 4 walk directions loaded.
Feels good to do some mindless coding for a change :D
[QUOTE=Ramdac;37415801]What is fake in this screenshot?, do you use 2D raycasting for the wall rendering?[/QUOTE]
The Enemies::Guard class doesn't support moving sequences yet, so I just changed the default value from 0 to 46 and then looked around the level until I found the one that looked the most surprised.
[QUOTE=dajoh;37415720]guess you've never heard of the remote memory functions
guess you've never heard of io completion ports
guess you've never heard of the threadpool api
guess you've never heard of fibers
guess you've never heard of user mode scheduling
guess you've never heard of guard pages
guess you've just worked with user32[/QUOTE]
You're right, I haven't.
I've just occasionally poked the windows.h with a stick, gone "Aeeuughh!" and run away.
All my low-level work has been with POSIX so v:v:v
Window's is great from a low technical level, it's more how it present's it's self to a C\C++ programmer. Some things are really easy and well made ( Like Desktop switching ), others are over complicated compared to other modern systems (GUI).
I've only done a little bit of win32 GUI programming, but so far I still think Xlib is a lot better.
Sorry, you need to Log In to post a reply to this thread.